#coding: utf8
import plask


class Fermi2D(plask.Solver):
    """
    Fermi2D(name="")
    
    Gain solver based on Fermi Golden Rule for Cartesian 2D geometry.
    """
    class Spectrum(object):
        """
        Gain spectrum class. You can call it like a function to get gains for different vavelengths.
        """
        def __call__(self, arg2):
            """
            __call__(self, arg2)
            """


    cond_shift = None
    """
    Additional conduction band shift for QW [eV].
    """

    def determine_levels(self, T, n):
        """
        determine_levels(self, T, n)
        
            Determine quasi-Fermi levels and carriers levels inside QW
        """

    geometry = None
    """
    Geometry provided to the solver
    """

    id = None
    """
    Id of the solver object. (read only)
    
    Example:
        >>> mysolver.id
        mysolver:category.type
    """

    inCarriersConcentration = None
    """
    Receiver of the carriers concentration required for computations [1/cm³].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.CarriersConcentrationReceiver2D`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inCarriersConcentration = other_solver.outCarriersConcentration
    
    See also:
    
       Receciver class: :class:`plask.flow.CarriersConcentrationReceiver2D`
    
       Provider class: :class:`plask.flow.CarriersConcentrationProvider2D`
    
       Data filter: :class:`plask.filter.CarriersConcentrationFilter2D`
    """

    inTemperature = None
    """
    Receiver of the temperature required for computations [K].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.TemperatureReceiver2D`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inTemperature = other_solver.outTemperature
    
    See also:
    
       Receciver class: :class:`plask.flow.TemperatureReceiver2D`
    
       Provider class: :class:`plask.flow.TemperatureProvider2D`
    
       Data filter: :class:`plask.filter.TemperatureFilter2D`
    """

    def initialize(self):
        """
        initialize(self)
        
            Initialize solver.
            
            This method manually initialized the solver and sets :attr:`initialized` to
            *True*. Normally calling it is not necessary, as each solver automatically
            initializes itself when needed.
            
            Returns:
                bool: solver :attr:`initialized` state prior to this method call.
        """

    initialized = None
    """
    True if the solver has been initialized. (read only)
    
    Solvers usually get initialized at the beginning of the computations.
    You can clean the initialization state and free the memory by calling
    the :meth:`invalidate` method.
    """

    def invalidate(self):
        """
        invalidate(self)
        
            Set the solver back to uninitialized state.
            
            This method frees the memory allocated by the solver and sets
            :attr:`initialized` to *False*.
        """

    lifetime = None
    """
    Stimulated emission lifetime [ps]
    """

    def load_xpl(self, xpl, manager):
        """
        load_xpl(self, xpl, manager)
        
            Load configuration from XPL reader.
            
            This method should be overriden in custom Python solvers.
            
            Example:
              .. code-block:: python
            
                 def load_xpl(self, xpl, manager):
                     for tag in xpl:
                         if tag == 'config':
                             self.a = tag['a']
                             self.b = tag.get('b', 0)
                             if 'c' in tag:
                                 self.c = tag['c']
                         if tag == 'combined':
                             for subtag in tag:
                                 if subtag == 'withtext':
                                     self.data = subtag.attrs
                                     # Text must be read last
                                     self.text = subtag.text
                         elif tag == 'geometry':
                             self.geometry = tag.getitem(manager.geo, 'ref')
        """

    matrix_elem = None
    """
    Optical matrix element [m0*eV]
    """

    matrix_elem_scaling = None
    """
    Scale factor for optical matrix element [-]
    """

    mesh = None
    """
    Mesh provided to the solver
    """

    outGain = None
    """
    Provider of the computed material gain [1/cm].
    
    
    outGain(n=0, mesh, wavelength, interpolation='default')
    
    :param str deriv: Gain derivative to return. can be '' (empty) or 'conc'.
                      In the latter case, the gain derivative over carriers
                      concentration is returned.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    :param float wavelength: The wavelength at which the gain is computed [nm].
    
    :return: Data with the material gain on the specified mesh **[1/cm]**.
    
    You may obtain the number of different values this provider can return by
    testing its length.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inGain = solver.outGain
    
       Obtain the provided field:
    
       >>> solver.outGain(0, mesh, wavelength)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outGain)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.GainProvider2D`
    
       Receciver class: :class:`plask.flow.GainReceiver2D`
    """

    def set_levels(*args, **kwargs):
        """
        object set_levels(tuple args, dict kwds) :
            Set quasi-Fermi levels and carriers levels inside QW.
        """

    def spectrum(*args, **kwargs):
        """
        spectrum(self, point)
        spectrum(self, c0, c1)
        
            Get gain spectrum at given point
        
            Get gain spectrum at given point
        """

    strained = None
    """
    Consider strain in QW? (True or False)
    """

    vale_shift = None
    """
    Additional valence band shift for QW [eV].
    """



class FermiCyl(plask.Solver):
    """
    FermiCyl(name="")
    
    Gain solver based on Fermi Golden Rule for Cylindrical 2D geometry.
    """
    class Spectrum(object):
        """
        Gain spectrum class. You can call it like a function to get gains for different vavelengths.
        """
        def __call__(self, arg2):
            """
            __call__(self, arg2)
            """


    cond_shift = None
    """
    Additional conduction band shift for QW [eV]
    """

    def determine_levels(self, T, n):
        """
        determine_levels(self, T, n)
        
            Determine quasi-Fermi levels and carriers levels inside QW
        """

    geometry = None
    """
    Geometry provided to the solver
    """

    id = None
    """
    Id of the solver object. (read only)
    
    Example:
        >>> mysolver.id
        mysolver:category.type
    """

    inCarriersConcentration = None
    """
    Receiver of the carriers concentration required for computations [1/cm³].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.CarriersConcentrationReceiverCyl`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inCarriersConcentration = other_solver.outCarriersConcentration
    
    See also:
    
       Receciver class: :class:`plask.flow.CarriersConcentrationReceiverCyl`
    
       Provider class: :class:`plask.flow.CarriersConcentrationProviderCyl`
    
       Data filter: :class:`plask.filter.CarriersConcentrationFilterCyl`
    """

    inTemperature = None
    """
    Receiver of the temperature required for computations [K].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.TemperatureReceiverCyl`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inTemperature = other_solver.outTemperature
    
    See also:
    
       Receciver class: :class:`plask.flow.TemperatureReceiverCyl`
    
       Provider class: :class:`plask.flow.TemperatureProviderCyl`
    
       Data filter: :class:`plask.filter.TemperatureFilterCyl`
    """

    def initialize(self):
        """
        initialize(self)
        
            Initialize solver.
            
            This method manually initialized the solver and sets :attr:`initialized` to
            *True*. Normally calling it is not necessary, as each solver automatically
            initializes itself when needed.
            
            Returns:
                bool: solver :attr:`initialized` state prior to this method call.
        """

    initialized = None
    """
    True if the solver has been initialized. (read only)
    
    Solvers usually get initialized at the beginning of the computations.
    You can clean the initialization state and free the memory by calling
    the :meth:`invalidate` method.
    """

    def invalidate(self):
        """
        invalidate(self)
        
            Set the solver back to uninitialized state.
            
            This method frees the memory allocated by the solver and sets
            :attr:`initialized` to *False*.
        """

    lifetime = None
    """
    Stimulated emission lifetime [ps]
    """

    def load_xpl(self, xpl, manager):
        """
        load_xpl(self, xpl, manager)
        
            Load configuration from XPL reader.
            
            This method should be overriden in custom Python solvers.
            
            Example:
              .. code-block:: python
            
                 def load_xpl(self, xpl, manager):
                     for tag in xpl:
                         if tag == 'config':
                             self.a = tag['a']
                             self.b = tag.get('b', 0)
                             if 'c' in tag:
                                 self.c = tag['c']
                         if tag == 'combined':
                             for subtag in tag:
                                 if subtag == 'withtext':
                                     self.data = subtag.attrs
                                     # Text must be read last
                                     self.text = subtag.text
                         elif tag == 'geometry':
                             self.geometry = tag.getitem(manager.geo, 'ref')
        """

    matrix_elem = None
    """
    Optical matrix element [m0*eV]
    """

    matrix_elem_scaling = None
    """
    Scale factor for optical matrix element [-]
    """

    mesh = None
    """
    Mesh provided to the solver
    """

    outGain = None
    """
    Provider of the computed material gain [1/cm].
    
    
    outGain(n=0, mesh, wavelength, interpolation='default')
    
    :param str deriv: Gain derivative to return. can be '' (empty) or 'conc'.
                      In the latter case, the gain derivative over carriers
                      concentration is returned.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    :param float wavelength: The wavelength at which the gain is computed [nm].
    
    :return: Data with the material gain on the specified mesh **[1/cm]**.
    
    You may obtain the number of different values this provider can return by
    testing its length.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inGain = solver.outGain
    
       Obtain the provided field:
    
       >>> solver.outGain(0, mesh, wavelength)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outGain)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.GainProviderCyl`
    
       Receciver class: :class:`plask.flow.GainReceiverCyl`
    """

    def set_levels(*args, **kwargs):
        """
        object set_levels(tuple args, dict kwds) :
            Determine quasi-Fermi levels and carriers levels inside QW.
        """

    def spectrum(*args, **kwargs):
        """
        spectrum(self, point)
        spectrum(self, c0, c1)
        
            Get gain spectrum at given point
        """

    strained = None
    """
    Consider strain in QW? (True or False)
    """

    vale_shift = None
    """
    Additional valence band shift for QW [eV]
    """



class FermiNew2D(plask.Solver):
    """
    FermiNew2D(name="")
    
    Gain solver based on Fermi Golden Rule for Cartesian 2D geometry.
    """
    class LuminescenceSpectrum(object):
        """
        Luminescence spectrum class. You can call it like a function to get luminescences for different vavelengths.
        """
        def __call__(self, arg2):
            """
            __call__(self, arg2)
            """


    class Spectrum(object):
        """
        Gain spectrum class. You can call it like a function to get gains for different vavelengths.
        """
        def __call__(self, arg2):
            """
            __call__(self, arg2)
            """


    Tref = None
    """
    Reference temperature. If *fast_levels* is True, this is the temperature used
    for initial computation of the energy levels [K].
    """

    adjust_layers = None
    """
    Adjust thicknesses of quantum wells?
    
    Setting this to True, allows to adjust the widths of the gain region layers
    by few angstroms to improve numerical stability.
    """

    cond_shift = None
    """
    Additional conduction band shift for QW [eV]
    """

    fast_levels = None
    """
    Compute levels only once and simply shift for different temperatures?
    
    Setting this to True stongly increases computation speed, but makes the results
    less accurate for high gains.
    """

    geometry = None
    """
    Geometry provided to the solver
    """

    def get_levels(self, arg2, T=None):
        """
        get_levels(self, arg2, T=None)
        """

    id = None
    """
    Id of the solver object. (read only)
    
    Example:
        >>> mysolver.id
        mysolver:category.type
    """

    inCarriersConcentration = None
    """
    Receiver of the carriers concentration required for computations [1/cm³].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.CarriersConcentrationReceiver2D`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inCarriersConcentration = other_solver.outCarriersConcentration
    
    See also:
    
       Receciver class: :class:`plask.flow.CarriersConcentrationReceiver2D`
    
       Provider class: :class:`plask.flow.CarriersConcentrationProvider2D`
    
       Data filter: :class:`plask.filter.CarriersConcentrationFilter2D`
    """

    inTemperature = None
    """
    Receiver of the temperature required for computations [K].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.TemperatureReceiver2D`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inTemperature = other_solver.outTemperature
    
    See also:
    
       Receciver class: :class:`plask.flow.TemperatureReceiver2D`
    
       Provider class: :class:`plask.flow.TemperatureProvider2D`
    
       Data filter: :class:`plask.filter.TemperatureFilter2D`
    """

    def initialize(self):
        """
        initialize(self)
        
            Initialize solver.
            
            This method manually initialized the solver and sets :attr:`initialized` to
            *True*. Normally calling it is not necessary, as each solver automatically
            initializes itself when needed.
            
            Returns:
                bool: solver :attr:`initialized` state prior to this method call.
        """

    initialized = None
    """
    True if the solver has been initialized. (read only)
    
    Solvers usually get initialized at the beginning of the computations.
    You can clean the initialization state and free the memory by calling
    the :meth:`invalidate` method.
    """

    def invalidate(self):
        """
        invalidate(self)
        
            Set the solver back to uninitialized state.
            
            This method frees the memory allocated by the solver and sets
            :attr:`initialized` to *False*.
        """

    lifetime = None
    """
    Carriers lifetime [ps].
    """

    def load_xpl(self, xpl, manager):
        """
        load_xpl(self, xpl, manager)
        
            Load configuration from XPL reader.
            
            This method should be overriden in custom Python solvers.
            
            Example:
              .. code-block:: python
            
                 def load_xpl(self, xpl, manager):
                     for tag in xpl:
                         if tag == 'config':
                             self.a = tag['a']
                             self.b = tag.get('b', 0)
                             if 'c' in tag:
                                 self.c = tag['c']
                         if tag == 'combined':
                             for subtag in tag:
                                 if subtag == 'withtext':
                                     self.data = subtag.attrs
                                     # Text must be read last
                                     self.text = subtag.text
                         elif tag == 'geometry':
                             self.geometry = tag.getitem(manager.geo, 'ref')
        """

    def luminescence_spectrum(*args, **kwargs):
        """
        luminescence_spectrum(self, point)
        luminescence_spectrum(self, c0, c1)
        
            Get luminescence spectrum at given point
        
            Get luminescence spectrum at given point
        """

    matrix_elem = None
    """
    Optical matrix element [m0*eV]
    """

    matrix_elem_scaling = None
    """
    Scale factor for optical matrix element [-]
    """

    mesh = None
    """
    Mesh provided to the solver
    """

    outGain = None
    """
    Provider of the computed material gain [1/cm].
    
    
    outGain(n=0, mesh, wavelength, interpolation='default')
    
    :param str deriv: Gain derivative to return. can be '' (empty) or 'conc'.
                      In the latter case, the gain derivative over carriers
                      concentration is returned.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    :param float wavelength: The wavelength at which the gain is computed [nm].
    
    :return: Data with the material gain on the specified mesh **[1/cm]**.
    
    You may obtain the number of different values this provider can return by
    testing its length.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inGain = solver.outGain
    
       Obtain the provided field:
    
       >>> solver.outGain(0, mesh, wavelength)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outGain)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.GainProvider2D`
    
       Receciver class: :class:`plask.flow.GainReceiver2D`
    """

    outLuminescence = None
    """
    Provider of the computed luminescence [a.u.].
    
    
    outLuminescence(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the luminescence on the specified mesh **[a.u.]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inLuminescence = solver.outLuminescence
    
       Obtain the provided field:
    
       >>> solver.outLuminescence(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.LuminescenceProvider2D`
    
       Receciver class: :class:`plask.flow.LuminescenceReceiver2D`
    """

    roughness = None
    """
    Roughness of the layers [-].
    """

    def spectrum(*args, **kwargs):
        """
        spectrum(self, point)
        spectrum(self, c0, c1)
        
            Get gain spectrum at given point
        
            Get gain spectrum at given point
        """

    strained = None
    """
    Consider strain in QW and barriers? (True or False).
    """

    vale_shift = None
    """
    Additional valence band shift for QW [eV]
    """



class FermiNewCyl(plask.Solver):
    """
    FermiNewCyl(name="")
    
    Gain solver based on Fermi Golden Rule for Cylindrical 2D geometry.
    """
    class LuminescenceSpectrum(object):
        """
        Luminescence spectrum class. You can call it like a function to get luminescences for different vavelengths.
        """
        def __call__(self, arg2):
            """
            __call__(self, arg2)
            """


    class Spectrum(object):
        """
        Gain spectrum class. You can call it like a function to get gains for different vavelengths.
        """
        def __call__(self, arg2):
            """
            __call__(self, arg2)
            """


    Tref = None
    """
    Reference temperature. If *fast_levels* is True, this is the temperature used
    for initial computation of the energy levels [K].
    """

    adjust_layers = None
    """
    Adjust thicknesses of quantum wells?
    
    Setting this to True, allows to adjust the widths of the gain region layers
    by few angstroms to improve numerical stability.
    """

    cond_shift = None
    """
    Additional conduction band shift for QW [eV]
    """

    fast_levels = None
    """
    Compute levels only once and simply shift for different temperatures?
    
    Setting this to True stongly increases computation speed, but makes the results
    less accurate for high gains.
    """

    geometry = None
    """
    Geometry provided to the solver
    """

    def get_levels(self, arg2, T=None):
        """
        get_levels(self, arg2, T=None)
        """

    id = None
    """
    Id of the solver object. (read only)
    
    Example:
        >>> mysolver.id
        mysolver:category.type
    """

    inCarriersConcentration = None
    """
    Receiver of the carriers concentration required for computations [1/cm³].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.CarriersConcentrationReceiverCyl`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inCarriersConcentration = other_solver.outCarriersConcentration
    
    See also:
    
       Receciver class: :class:`plask.flow.CarriersConcentrationReceiverCyl`
    
       Provider class: :class:`plask.flow.CarriersConcentrationProviderCyl`
    
       Data filter: :class:`plask.filter.CarriersConcentrationFilterCyl`
    """

    inTemperature = None
    """
    Receiver of the temperature required for computations [K].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.TemperatureReceiverCyl`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inTemperature = other_solver.outTemperature
    
    See also:
    
       Receciver class: :class:`plask.flow.TemperatureReceiverCyl`
    
       Provider class: :class:`plask.flow.TemperatureProviderCyl`
    
       Data filter: :class:`plask.filter.TemperatureFilterCyl`
    """

    def initialize(self):
        """
        initialize(self)
        
            Initialize solver.
            
            This method manually initialized the solver and sets :attr:`initialized` to
            *True*. Normally calling it is not necessary, as each solver automatically
            initializes itself when needed.
            
            Returns:
                bool: solver :attr:`initialized` state prior to this method call.
        """

    initialized = None
    """
    True if the solver has been initialized. (read only)
    
    Solvers usually get initialized at the beginning of the computations.
    You can clean the initialization state and free the memory by calling
    the :meth:`invalidate` method.
    """

    def invalidate(self):
        """
        invalidate(self)
        
            Set the solver back to uninitialized state.
            
            This method frees the memory allocated by the solver and sets
            :attr:`initialized` to *False*.
        """

    lifetime = None
    """
    Carriers lifetime [ps].
    """

    def load_xpl(self, xpl, manager):
        """
        load_xpl(self, xpl, manager)
        
            Load configuration from XPL reader.
            
            This method should be overriden in custom Python solvers.
            
            Example:
              .. code-block:: python
            
                 def load_xpl(self, xpl, manager):
                     for tag in xpl:
                         if tag == 'config':
                             self.a = tag['a']
                             self.b = tag.get('b', 0)
                             if 'c' in tag:
                                 self.c = tag['c']
                         if tag == 'combined':
                             for subtag in tag:
                                 if subtag == 'withtext':
                                     self.data = subtag.attrs
                                     # Text must be read last
                                     self.text = subtag.text
                         elif tag == 'geometry':
                             self.geometry = tag.getitem(manager.geo, 'ref')
        """

    def luminescencespectrum(*args, **kwargs):
        """
        luminescencespectrum(self, point)
        luminescencespectrum(self, c0, c1)
        
            Get luminescence spectrum at given point
        
            Get luminescence spectrum at given point
        """

    matrix_elem = None
    """
    optical matrix element [m0*eV]
    """

    matrix_elem_scaling = None
    """
    Scale factor for optical matrix element [-]
    """

    mesh = None
    """
    Mesh provided to the solver
    """

    outGain = None
    """
    Provider of the computed material gain [1/cm].
    
    
    outGain(n=0, mesh, wavelength, interpolation='default')
    
    :param str deriv: Gain derivative to return. can be '' (empty) or 'conc'.
                      In the latter case, the gain derivative over carriers
                      concentration is returned.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    :param float wavelength: The wavelength at which the gain is computed [nm].
    
    :return: Data with the material gain on the specified mesh **[1/cm]**.
    
    You may obtain the number of different values this provider can return by
    testing its length.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inGain = solver.outGain
    
       Obtain the provided field:
    
       >>> solver.outGain(0, mesh, wavelength)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outGain)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.GainProviderCyl`
    
       Receciver class: :class:`plask.flow.GainReceiverCyl`
    """

    outLuminescence = None
    """
    Provider of the computed luminescence [a.u.].
    
    
    outLuminescence(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the luminescence on the specified mesh **[a.u.]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inLuminescence = solver.outLuminescence
    
       Obtain the provided field:
    
       >>> solver.outLuminescence(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.LuminescenceProviderCyl`
    
       Receciver class: :class:`plask.flow.LuminescenceReceiverCyl`
    """

    roughness = None
    """
    Roughness of the layers [-].
    """

    def spectrum(*args, **kwargs):
        """
        spectrum(self, point)
        spectrum(self, c0, c1)
        
            Get gain spectrum at given point
        
            Get gain spectrum at given point
        """

    strained = None
    """
    Consider strain in QW and barriers? (True or False).
    """

    vale_shift = None
    """
    Additional valence band shift for QW [eV]
    """

