#coding: utf8
import meta.shockley.threshold
import builtins
import meta.shockley.thermoelectric


class ThermoElectric2D(meta.shockley.thermoelectric.ThermoElectric):
    """
        Thermo-electric calculations solver without the optical part.
    
        This solver performs under-threshold thermo-electrical computations.
        It computes electric current flow and temperature distribution in a self-
        consistent loop until desired convergence is reached.
    
        The computations can be executed using `compute` method, after which
        the results may be save to the HDF5 file with `save` or presented visually
        using ``plot_...`` methods. If ``save`` parameter of the :meth:`compute` method
        is *True* the fields are saved automatically after the computations.
        The file name is based on the name of the executed script with suffix denoting
        either the launch time or the identifier of a batch job if a batch system
        (like SLURM, OpenPBS, or SGE) is used.
    """
    _Electrical = Shockley2D # class alias

    _Thermal = Static2D # class alias

    _ThermoElectric__reconnect = __reconnect # function alias

    def _get_defines_info(*args, **kwargs):
        pass


    def _get_info(*args, **kwargs):
        pass


    def _iter_levels(*args, **kwargs):
        pass


    def _parse_xpl(*args, **kwargs):
        pass


    def _plot_hbounds(*args, **kwargs):
        pass


    def _read_attr(*args, **kwargs):
        pass


    def _save_thermoelectric(*args, **kwargs):
        pass


    def compute(*args, **kwargs):
        """
                Run calculations.
        
                In the beginning the solvers are invalidated and next, the thermo-
                electric algorithm is executed until both solvers converge to the
                value specified in their configuration in the `maxerr` property.
        
                Args:
                    save (bool or str): If `True` the computed fields are saved to the
                        HDF5 file named after the script name with the suffix denoting
                        either the batch job id or the current time if no batch system
                        is used. The filename can be overridden by setting this parameter
                        as a string.
        
                    invalidate (bool): If this flag is set, solvers are invalidated
                                       in the beginning of the computations.
        
                    group (str): HDF5 group to save the data under.
        """

    electrical = meta.shockley.thermoelectric.attribute()
    
    def get_junction_currents(*args, **kwargs):
        """
                Get current densities at the active regions.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_temperature(*args, **kwargs):
        """
                Get temperature on a thermal mesh.
        """

    def get_total_current(*args, **kwargs):
        """
                Get total current flowing through active region [mA]
        """

    def get_vertical_voltage(*args, **kwargs):
        """
                Get computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        """

    def get_voltage(*args, **kwargs):
        """
                Get voltage on an electrical mesh.
        """

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

    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*.
        """

    def load_xpl(*args, **kwargs):
        pass


    def on_initialize(*args, **kwargs):
        pass


    def on_invalidate(*args, **kwargs):
        pass


    outConductivity = None
    """
    Provider of the computed electrical conductivity [S/m].
    
    
    outConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electrical conductivity on the specified mesh **[S/m]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inConductivity = solver.outConductivity
    
       Obtain the provided field:
    
       >>> solver.outConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ConductivityProvider2D`
    
       Receciver class: :class:`plask.flow.ConductivityReceiver2D`
    """

    outCurrentDensity = None
    """
    Provider of the computed current density [kA/cm²].
    
    
    outCurrentDensity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the current density on the specified mesh **[kA/cm²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inCurrentDensity = solver.outCurrentDensity
    
       Obtain the provided field:
    
       >>> solver.outCurrentDensity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.CurrentDensityProvider2D`
    
       Receciver class: :class:`plask.flow.CurrentDensityReceiver2D`
    """

    outHeat = None
    """
    Provider of the computed heat sources density [W/m³].
    
    
    outHeat(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat sources density on the specified mesh **[W/m³]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeat = solver.outHeat
    
       Obtain the provided field:
    
       >>> solver.outHeat(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatProvider2D`
    
       Receciver class: :class:`plask.flow.HeatReceiver2D`
    """

    outHeatFlux = None
    """
    Provider of the computed heat flux [W/m²].
    
    
    outHeatFlux(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat flux on the specified mesh **[W/m²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeatFlux = solver.outHeatFlux
    
       Obtain the provided field:
    
       >>> solver.outHeatFlux(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatFluxProvider2D`
    
       Receciver class: :class:`plask.flow.HeatFluxReceiver2D`
    """

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

    outThermalConductivity = None
    """
    Provider of the computed thermal conductivity [W/(m×K)].
    
    
    outThermalConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the thermal conductivity on the specified mesh **[W/(m×K)]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inThermalConductivity = solver.outThermalConductivity
    
       Obtain the provided field:
    
       >>> solver.outThermalConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ThermalConductivityProvider2D`
    
       Receciver class: :class:`plask.flow.ThermalConductivityReceiver2D`
    """

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

    def plot_junction_current(*args, **kwargs):
        """
                Plot current density at the active region.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_temperature(*args, **kwargs):
        """
                Plot computed temperature to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification for
                        the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def plot_vertical_voltage(*args, **kwargs):
        """
                Plot computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_voltage(*args, **kwargs):
        """
                Plot computed voltage to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the :func:`plask.plot_field`.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def reconnect(*args, **kwargs):
        """
                Reconnect all internal solvers.
        
                This method should be called if some of the internal solvers were changed manually.
        """

    def save(*args, **kwargs):
        """
                Save the computation results to the HDF5 file.
        
                Args:
                    filename (str): The file name to save to.
                        If omitted, the file name is generated automatically based on
                        the script name with suffix denoting either the batch job id or
                        the current time if no batch system is used.
        
                    group (str): HDF5 group to save the data under.
        """

    tfreq = 6.0
    thermal = meta.shockley.thermoelectric.attribute()
    


class ThermoElectric3D(meta.shockley.thermoelectric.ThermoElectric):
    """
        Thermo-electric calculations solver without the optical part.
    
        This solver performs under-threshold thermo-electrical computations.
        It computes electric current flow and tempereture distribution in a self-
        consistent loop until desired convergence is reached.
    
        The computations can be executed using `compute` method, after which
        the results may be save to the HDF5 file with `save` or presented visually
        using ``plot_...`` methods. If ``save`` parameter of the :meth:`compute` method
        is *True* the fields are saved automatically after the computations.
        The file name is based on the name of the executed script with suffix denoting
        either the launch time or the identifier of a batch job if a batch system
        (like SLURM, OpenPBS, or SGE) is used.
    """
    _Electrical = Shockley3D # class alias

    _Thermal = Static3D # class alias

    _ThermoElectric__reconnect = __reconnect # function alias

    def _get_defines_info(*args, **kwargs):
        pass


    def _get_info(*args, **kwargs):
        pass


    def _iter_levels(*args, **kwargs):
        pass


    def _parse_xpl(*args, **kwargs):
        pass


    def _plot_hbounds(*args, **kwargs):
        pass


    def _read_attr(*args, **kwargs):
        pass


    def _save_thermoelectric(*args, **kwargs):
        pass


    def compute(*args, **kwargs):
        """
                Run calculations.
        
                In the beginning the solvers are invalidated and next, the thermo-
                electric algorithm is executed until both solvers converge to the
                value specified in their configuration in the `maxerr` property.
        
                Args:
                    save (bool or str): If `True` the computed fields are saved to the
                        HDF5 file named after the script name with the suffix denoting
                        either the batch job id or the current time if no batch system
                        is used. The filename can be overridden by setting this parameter
                        as a string.
        
                    invalidate (bool): If this flag is set, solvers are invalidated
                                       in the beginning of the computations.
        
                    group (str): HDF5 group to save the data under.
        """

    electrical = meta.shockley.thermoelectric.attribute()
    
    def get_junction_currents(*args, **kwargs):
        """
                Get current densities at the active regions.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_temperature(*args, **kwargs):
        """
                Get temperature on a thermal mesh.
        """

    def get_total_current(*args, **kwargs):
        """
                Get total current flowing through active region [mA]
        """

    def get_vertical_voltage(*args, **kwargs):
        """
                Get computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        """

    def get_voltage(*args, **kwargs):
        """
                Get voltage on an electrical mesh.
        """

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

    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*.
        """

    def load_xpl(*args, **kwargs):
        pass


    def on_initialize(*args, **kwargs):
        pass


    def on_invalidate(*args, **kwargs):
        pass


    outConductivity = None
    """
    Provider of the computed electrical conductivity [S/m].
    
    
    outConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electrical conductivity on the specified mesh **[S/m]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inConductivity = solver.outConductivity
    
       Obtain the provided field:
    
       >>> solver.outConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ConductivityProvider3D`
    
       Receciver class: :class:`plask.flow.ConductivityReceiver3D`
    """

    outCurrentDensity = None
    """
    Provider of the computed current density [kA/cm²].
    
    
    outCurrentDensity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the current density on the specified mesh **[kA/cm²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inCurrentDensity = solver.outCurrentDensity
    
       Obtain the provided field:
    
       >>> solver.outCurrentDensity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.CurrentDensityProvider3D`
    
       Receciver class: :class:`plask.flow.CurrentDensityReceiver3D`
    """

    outHeat = None
    """
    Provider of the computed heat sources density [W/m³].
    
    
    outHeat(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat sources density on the specified mesh **[W/m³]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeat = solver.outHeat
    
       Obtain the provided field:
    
       >>> solver.outHeat(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatProvider3D`
    
       Receciver class: :class:`plask.flow.HeatReceiver3D`
    """

    outHeatFlux = None
    """
    Provider of the computed heat flux [W/m²].
    
    
    outHeatFlux(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat flux on the specified mesh **[W/m²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeatFlux = solver.outHeatFlux
    
       Obtain the provided field:
    
       >>> solver.outHeatFlux(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatFluxProvider3D`
    
       Receciver class: :class:`plask.flow.HeatFluxReceiver3D`
    """

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

    outThermalConductivity = None
    """
    Provider of the computed thermal conductivity [W/(m×K)].
    
    
    outThermalConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the thermal conductivity on the specified mesh **[W/(m×K)]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inThermalConductivity = solver.outThermalConductivity
    
       Obtain the provided field:
    
       >>> solver.outThermalConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ThermalConductivityProvider3D`
    
       Receciver class: :class:`plask.flow.ThermalConductivityReceiver3D`
    """

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

    def plot_junction_current(*args, **kwargs):
        """
                Plot current density at the active region.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_temperature(*args, **kwargs):
        """
                Plot computed temperature to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification for
                        the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def plot_vertical_voltage(*args, **kwargs):
        """
                Plot computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_voltage(*args, **kwargs):
        """
                Plot computed voltage to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the :func:`plask.plot_field`.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def reconnect(*args, **kwargs):
        """
                Reconnect all internal solvers.
        
                This method should be called if some of the internal solvers were changed manually.
        """

    def save(*args, **kwargs):
        """
                Save the computation results to the HDF5 file.
        
                Args:
                    filename (str): The file name to save to.
                        If omitted, the file name is generated automatically based on
                        the script name with suffix denoting either the batch job id or
                        the current time if no batch system is used.
        
                    group (str): HDF5 group to save the data under.
        """

    tfreq = 6.0
    thermal = meta.shockley.thermoelectric.attribute()
    


class ThermoElectricCyl(meta.shockley.thermoelectric.ThermoElectric):
    """
        Thermo-electric calculations solver without the optical part.
    
        This solver performs under-threshold thermo-electrical computations.
        It computes electric current flow and tempereture distribution in a self-
        consistent loop until desired convergence is reached.
    
        The computations can be executed using `compute` method, after which
        the results may be save to the HDF5 file with `save` or presented visually
        using ``plot_...`` methods. If ``save`` parameter of the :meth:`compute` method
        is *True* the fields are saved automatically after the computations.
        The file name is based on the name of the executed script with suffix denoting
        either the launch time or the identifier of a batch job if a batch system
        (like SLURM, OpenPBS, or SGE) is used.
    """
    _Electrical = ShockleyCyl # class alias

    _Thermal = StaticCyl # class alias

    _ThermoElectric__reconnect = __reconnect # function alias

    def _get_defines_info(*args, **kwargs):
        pass


    def _get_info(*args, **kwargs):
        pass


    def _iter_levels(*args, **kwargs):
        pass


    def _parse_xpl(*args, **kwargs):
        pass


    def _plot_hbounds(*args, **kwargs):
        pass


    def _read_attr(*args, **kwargs):
        pass


    def _save_thermoelectric(*args, **kwargs):
        pass


    def compute(*args, **kwargs):
        """
                Run calculations.
        
                In the beginning the solvers are invalidated and next, the thermo-
                electric algorithm is executed until both solvers converge to the
                value specified in their configuration in the `maxerr` property.
        
                Args:
                    save (bool or str): If `True` the computed fields are saved to the
                        HDF5 file named after the script name with the suffix denoting
                        either the batch job id or the current time if no batch system
                        is used. The filename can be overridden by setting this parameter
                        as a string.
        
                    invalidate (bool): If this flag is set, solvers are invalidated
                                       in the beginning of the computations.
        
                    group (str): HDF5 group to save the data under.
        """

    electrical = meta.shockley.thermoelectric.attribute()
    
    def get_junction_currents(*args, **kwargs):
        """
                Get current densities at the active regions.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_temperature(*args, **kwargs):
        """
                Get temperature on a thermal mesh.
        """

    def get_total_current(*args, **kwargs):
        """
                Get total current flowing through active region [mA]
        """

    def get_vertical_voltage(*args, **kwargs):
        """
                Get computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        """

    def get_voltage(*args, **kwargs):
        """
                Get voltage on an electrical mesh.
        """

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

    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*.
        """

    def load_xpl(*args, **kwargs):
        pass


    def on_initialize(*args, **kwargs):
        pass


    def on_invalidate(*args, **kwargs):
        pass


    outConductivity = None
    """
    Provider of the computed electrical conductivity [S/m].
    
    
    outConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electrical conductivity on the specified mesh **[S/m]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inConductivity = solver.outConductivity
    
       Obtain the provided field:
    
       >>> solver.outConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ConductivityProviderCyl`
    
       Receciver class: :class:`plask.flow.ConductivityReceiverCyl`
    """

    outCurrentDensity = None
    """
    Provider of the computed current density [kA/cm²].
    
    
    outCurrentDensity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the current density on the specified mesh **[kA/cm²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inCurrentDensity = solver.outCurrentDensity
    
       Obtain the provided field:
    
       >>> solver.outCurrentDensity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.CurrentDensityProviderCyl`
    
       Receciver class: :class:`plask.flow.CurrentDensityReceiverCyl`
    """

    outHeat = None
    """
    Provider of the computed heat sources density [W/m³].
    
    
    outHeat(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat sources density on the specified mesh **[W/m³]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeat = solver.outHeat
    
       Obtain the provided field:
    
       >>> solver.outHeat(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatProviderCyl`
    
       Receciver class: :class:`plask.flow.HeatReceiverCyl`
    """

    outHeatFlux = None
    """
    Provider of the computed heat flux [W/m²].
    
    
    outHeatFlux(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat flux on the specified mesh **[W/m²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeatFlux = solver.outHeatFlux
    
       Obtain the provided field:
    
       >>> solver.outHeatFlux(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatFluxProviderCyl`
    
       Receciver class: :class:`plask.flow.HeatFluxReceiverCyl`
    """

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

    outThermalConductivity = None
    """
    Provider of the computed thermal conductivity [W/(m×K)].
    
    
    outThermalConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the thermal conductivity on the specified mesh **[W/(m×K)]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inThermalConductivity = solver.outThermalConductivity
    
       Obtain the provided field:
    
       >>> solver.outThermalConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ThermalConductivityProviderCyl`
    
       Receciver class: :class:`plask.flow.ThermalConductivityReceiverCyl`
    """

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

    def plot_junction_current(*args, **kwargs):
        """
                Plot current density at the active region.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_temperature(*args, **kwargs):
        """
                Plot computed temperature to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification for
                        the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def plot_vertical_voltage(*args, **kwargs):
        """
                Plot computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_voltage(*args, **kwargs):
        """
                Plot computed voltage to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the :func:`plask.plot_field`.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def reconnect(*args, **kwargs):
        """
                Reconnect all internal solvers.
        
                This method should be called if some of the internal solvers were changed manually.
        """

    def save(*args, **kwargs):
        """
                Save the computation results to the HDF5 file.
        
                Args:
                    filename (str): The file name to save to.
                        If omitted, the file name is generated automatically based on
                        the script name with suffix denoting either the batch job id or
                        the current time if no batch system is used.
        
                    group (str): HDF5 group to save the data under.
        """

    tfreq = 6.0
    thermal = meta.shockley.thermoelectric.attribute()
    


class ThresholdSearch2D(meta.shockley.threshold.ThresholdSearch):
    """
        Solver for threshold search of semiconductor laser.
    
        This solver performs thermo-electrical computations followed by
        determination ot threshold current and optical analysis in order to
        determine the threshold of a semiconductor laser. The search is
        performed by ``scipy`` root finding algorithm in order to determine
        the voltage and electric current ensuring no optical loss in the
        laser cavity.
    
        The computations can be executed using `compute` method, after which
        the results may be save to the HDF5 file with `save` or presented visually
        using ``plot_...`` methods. If ``save`` parameter of the :meth:`compute` method
        is *True* the fields are saved automatically after the computations.
        The file name is based on the name of the executed script with suffix denoting
        either the launch time or the identifier of a batch job if a batch system
        (like SLURM, OpenPBS, or SGE) is used.
    """
    _Diffusion = Diffusion2D # class alias

    _Electrical = Shockley2D # class alias

    _Gain = FreeCarrier2D # class alias

    _OPTICAL_ROOTS = builtins.dict()
    
    _Optical = None
    _Thermal = Static2D # class alias

    _ThermoElectric__reconnect = __reconnect # function alias

    _ThresholdSearch__reconnect = __reconnect # function alias

    def _get_defines_info(*args, **kwargs):
        pass


    def _get_in_junction(*args, **kwargs):
        pass


    def _get_info(*args, **kwargs):
        pass


    def _get_lam(*args, **kwargs):
        pass


    def _iter_levels(*args, **kwargs):
        pass


    _lam0 = 'wavelength'
    _optarg = 'neff'
    def _optargs(*args, **kwargs):
        pass


    def _parse_xpl(*args, **kwargs):
        pass


    def _plot_hbounds(*args, **kwargs):
        pass


    def _plot_in_junction(*args, **kwargs):
        pass


    def _quickstep(*args, **kwargs):
        """
                Function performing one step of the quick threshold search.
        
                Args:
                    arg (array): Array containing voltage on a specified boundary condition [V] and wavelength.
        
                Returns:
                    array: Imaginary and real part of a specified mode
        """

    def _read_attr(*args, **kwargs):
        pass


    def _save_thermoelectric(*args, **kwargs):
        pass


    def compute(*args, **kwargs):
        """
                Execute the algorithm.
        
                In the beginning the solvers are invalidated and next, the self-
                consistent loop of thermal, electrical, gain, and optical calculations
                are run within the root-finding algorithm until the mode is found
                with zero optical losses.
        
                Args:
                    save (bool or str): If `True` the computed fields are saved to the
                        HDF5 file named after the script name with the suffix denoting
                        either the batch job id or the current time if no batch system
                        is used. The filename can be overridden by setting this parameter
                        as a string.
        
                    invalidate (bool): If this flag is set, solvers are invalidated
                                       in the beginning of the computations.
        
                    group (str): HDF5 group to save the data under.
        
                    stepsave (bool): If `True` the computed fields are saved to the
                        HDF5 file after each computations step.
        
                Returns:
                    The voltage set to ``ivolt`` boundary condition for the threshold.
                    The threshold current can be then obtained by calling:
        
                    >>> solver.get_total_current()
                    123.0
        """

    def compute_thermoelectric(*args, **kwargs):
        """
                Perform thermo-electric calculations.
        
                This method may be called manually to perform thermo-electric calculations.
                Afterwards, one may investigate gain spectrum or verify settings of the optical
                solver.
        """

    diffusion = meta.shockley.thermoelectric.attribute()
    
    dneff = 0.02
    electrical = meta.shockley.thermoelectric.attribute()
    
    gain = meta.shockley.thermoelectric.attribute()
    
    def get_gain_spectrum(*args, **kwargs):
        """
                Get gain spectrum for specified junction.
        
                Args:
                    lams (array of floats): Wavelengths for which the spectrum should be plotted.
        
                    pos (float): Lateral position fo the point in which the spectrum is plotted.
        
                    junction (int): Junction number to take gain from.
        
                Return:
                    Data: Gain spectrum.
        """

    def get_junction_concentrations(*args, **kwargs):
        """
                Get carriers concentration at the active regions.
        
                Args:
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_junction_currents(*args, **kwargs):
        """
                Get current densities at the active regions.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_junction_gains(*args, **kwargs):
        """
                Get gain at the active regions.
        
                Args:
                    axis (mesh or sequence): Points along horizontal axis to plot gain at.
                                             Defaults to the optical mesh.
        
                   interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_lam(*args, **kwargs):
        pass


    def get_nng(*args, **kwargs):
        """
                Get approximate effective index for optical computations.
        
                This method returns approximate wavelength for optical computations.
                By default if browses the wavelength range starting from :attr:`maxneff`,
                decreasing it by :attr:`dneff` until lateral mode :attr:`mn` is found.
        
                You can override this method to use custom mode approximation.
        
                Example:
                     >>> solver = ThresholdSearch2D()
                     >>> solver.get_nng = lambda: 3.5
                     >>> solver.compute()
        """

    def get_optical_determinant(*args, **kwargs):
        """
                Function computing determinant of the optical solver.
        
                Args:
                     neff (float or array): Effective index to compute the determinant for.
        
                Returns:
                    float or array: Optical determinant.
        """

    def get_optical_field(*args, **kwargs):
        """
                Get computed optical mode field at threshold.
        
                Args:
                    resolution (tuple of ints): Number of points in horizontal and vertical directions.
        """

    def get_optical_field_horizontal(*args, **kwargs):
        """
                Get horizontal distribution of the computed optical mode field at threshold.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    interpolation (str): Interpolation used when retrieving current density.
        """

    def get_optical_field_vertical(*args, **kwargs):
        """
                Plot vertical distribution of the computed optical mode field at threshold and
                refractive index profile.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    pos (float): Horizontal position to get the field at.
        
                    offset (float): Distance above and below geometry boundary to include into
                                    the plot.
        
                    interpolation (str): Interpolation used when retrieving current density.
        """

    def get_temperature(*args, **kwargs):
        """
                Get temperature on a thermal mesh.
        """

    def get_total_current(*args, **kwargs):
        """
                Get total current flowing through active region [mA]
        """

    def get_vert_optical_determinant(*args, **kwargs):
        """
                Function computing ‘vertical determinant’ of the optical solver.
        
                Args:
                     vneff (float or array): Effective index to compute the vertical
                                             determinant for.
        
                Returns:
                    float or array: Optical determinant.
        """

    def get_vertical_voltage(*args, **kwargs):
        """
                Get computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        """

    def get_voltage(*args, **kwargs):
        """
                Get voltage on an electrical mesh.
        """

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

    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*.
        """

    def load_xpl(*args, **kwargs):
        pass


    maxiter = 50
    mn = 1
    def on_initialize(*args, **kwargs):
        pass


    def on_invalidate(*args, **kwargs):
        pass


    optical = meta.shockley.thermoelectric.attribute()
    
    optical_resolution = builtins.tuple()
    
    outCarriersConcentration = None
    """
    Provider of the computed carriers concentration [1/cm³].
    
    
    outCarriersConcentration(n=0, mesh, interpolation='default')
    
    :param str type: Detailed information which carriers are returned. It can be
                     'majority' to return majority carriers in given material,
                     'pairs' for the concentration of electron-hole pairs,
                     'electrons', or 'holes' for particular carriers type.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the carriers concentration 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.inCarriersConcentration = solver.outCarriersConcentration
    
       Obtain the provided field:
    
       >>> solver.outCarriersConcentration(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outCarriersConcentration)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.CarriersConcentrationProvider2D`
    
       Receciver class: :class:`plask.flow.CarriersConcentrationReceiver2D`
    """

    outConductivity = None
    """
    Provider of the computed electrical conductivity [S/m].
    
    
    outConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electrical conductivity on the specified mesh **[S/m]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inConductivity = solver.outConductivity
    
       Obtain the provided field:
    
       >>> solver.outConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ConductivityProvider2D`
    
       Receciver class: :class:`plask.flow.ConductivityReceiver2D`
    """

    outCurrentDensity = None
    """
    Provider of the computed current density [kA/cm²].
    
    
    outCurrentDensity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the current density on the specified mesh **[kA/cm²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inCurrentDensity = solver.outCurrentDensity
    
       Obtain the provided field:
    
       >>> solver.outCurrentDensity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.CurrentDensityProvider2D`
    
       Receciver class: :class:`plask.flow.CurrentDensityReceiver2D`
    """

    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`
    """

    outHeat = None
    """
    Provider of the computed heat sources density [W/m³].
    
    
    outHeat(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat sources density on the specified mesh **[W/m³]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeat = solver.outHeat
    
       Obtain the provided field:
    
       >>> solver.outHeat(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatProvider2D`
    
       Receciver class: :class:`plask.flow.HeatReceiver2D`
    """

    outHeatFlux = None
    """
    Provider of the computed heat flux [W/m²].
    
    
    outHeatFlux(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat flux on the specified mesh **[W/m²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeatFlux = solver.outHeatFlux
    
       Obtain the provided field:
    
       >>> solver.outHeatFlux(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatFluxProvider2D`
    
       Receciver class: :class:`plask.flow.HeatFluxReceiver2D`
    """

    outLightE = None
    """
    Provider of the computed electric field [V/m].
    
    
    outLightE(n=0, mesh, interpolation='default')
    
    :param int n: Value number.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electric field on the specified mesh **[V/m]**.
    
    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.inLightE = solver.outLightE
    
       Obtain the provided field:
    
       >>> solver.outLightE(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outLightE)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.LightEProvider2D`
    
       Receciver class: :class:`plask.flow.LightEReceiver2D`
    """

    outLightMagnitude = None
    """
    Provider of the computed optical field magnitude [W/m²].
    
    
    outLightMagnitude(n=0, mesh, interpolation='default')
    
    :param int n: Computed mode number.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the optical field magnitude on the specified mesh **[W/m²]**.
    
    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.inLightMagnitude = solver.outLightMagnitude
    
       Obtain the provided field:
    
       >>> solver.outLightMagnitude(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outLightMagnitude)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.LightMagnitudeProviderCyl`
    
       Receciver class: :class:`plask.flow.LightMagnitudeReceiverCyl`
    """

    outLoss = None
    """
    Provider of the computed modal extinction [1/cm].
    
    
    outLoss(n=0)
    
    :param int n: Value number.
    
    :return: Value of the modal extinction **[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.inModalLoss = solver.outLoss
    
       Obtain the provided value:
    
       >>> solver.outLoss(n=0)
       1000
    
       Test the number of provided values:
    
       >>> len(solver.outLoss)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.ModalLossProvider`
    
       Receciver class: :class:`plask.flow.ModalLossReceiver`
    """

    outNeff = None
    """
    Provider of the computed effective index [-].
    
    
    outNeff(n=0)
    
    :param int n: Value number.
    
    :return: Value of the effective index **[-]**.
    
    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.inEffectiveIndex = solver.outNeff
    
       Obtain the provided value:
    
       >>> solver.outNeff(n=0)
       1000
    
       Test the number of provided values:
    
       >>> len(solver.outNeff)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.EffectiveIndexProvider`
    
       Receciver class: :class:`plask.flow.EffectiveIndexReceiver`
    """

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

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

    outThermalConductivity = None
    """
    Provider of the computed thermal conductivity [W/(m×K)].
    
    
    outThermalConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the thermal conductivity on the specified mesh **[W/(m×K)]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inThermalConductivity = solver.outThermalConductivity
    
       Obtain the provided field:
    
       >>> solver.outThermalConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ThermalConductivityProvider2D`
    
       Receciver class: :class:`plask.flow.ThermalConductivityReceiver2D`
    """

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

    def plot_gain_spectrum(*args, **kwargs):
        """
                Plot gain spectrum for specified junction.
        
                Args:
                    lams (array of floats): Wavelengths for which the spectrum should be plotted.
        
                    pos (float): Lateral position fo the point in which the spectrum is plotted.
        
                    junction (int): Junction number to take gain from.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_concentration(*args, **kwargs):
        """
                Plot carriers concentration at the active region.
        
                Args:
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_current(*args, **kwargs):
        """
                Plot current density at the active region.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_gain(*args, **kwargs):
        """
                Plot gain at the active region.
        
                Args:
                    axis (mesh or sequence): Points along horizontal axis to plot gain at.
                                             Defaults to the optical mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_determinant(*args, **kwargs):
        """
                Function plotting determinant of the optical solver.
        
                Args:
                    neffs (array): Array of effective indices to plot the determinant for.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field(*args, **kwargs):
        """
                Plot computed optical mode field at threshold.
        
                Args:
                    resolution (tuple of ints): Number of points in horizontal and vertical directions.
        
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field_horizontal(*args, **kwargs):
        """
                Plot horizontal distribution of the computed optical mode field at threshold.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field_vertical(*args, **kwargs):
        """
                Plot vertical distribution of the computed optical mode field at threshold and
                refractive index profile.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    pos (float): Horizontal position to get the field at.
        
                    offset (float): Distance above and below geometry boundary to include into
                                    the plot.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_temperature(*args, **kwargs):
        """
                Plot computed temperature to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification for
                        the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def plot_vert_optical_determinant(*args, **kwargs):
        """
                Function plotting ‘vertical determinant’ of the optical solver.
        
                Args:
                    vneffs (array): Array of effective indices to plot the vertical
                                    determinant for.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_vertical_voltage(*args, **kwargs):
        """
                Plot computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_voltage(*args, **kwargs):
        """
                Plot computed voltage to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the :func:`plask.plot_field`.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    quick = False
    def reconnect(*args, **kwargs):
        """
                Reconnect all internal solvers.
        
                This method should be called if some of the internal solvers were changed manually.
        """

    def save(*args, **kwargs):
        """
                Save the computation results to the HDF5 file.
        
                Args:
                    filename (str): The file name to save to.
                        If omitted, the file name is generated automatically based on
                        the script name with suffix denoting either the batch job id or
                        the current time if no batch system is used.
        
                    group (str): HDF5 group to save the data under.
        
                    optical_resolution (tuple of ints): Number of points in horizontal and vertical directions
                        for optical field.
        """

    skip_thermal = False
    def step(*args, **kwargs):
        """
                Function performing one step of the threshold search.
        
                Args:
                    volt (float): Voltage on a specified boundary condition [V].
        
                    save (bool): If `True` the computed fields are saved to the
                        HDF5 file after each computations step.
        
                Returns:
                    float: Loss of a specified mode
        """

    tfreq = 6.0
    thermal = meta.shockley.thermoelectric.attribute()
    
    vmax = None
    vmin = None
    vtol = 1e-05
    wavelength = None


class ThresholdSearchBesselCyl(meta.shockley.threshold.ThresholdSearch):
    """
        Solver for threshold search of semiconductor laser with vector optical solver.
    
        This solver performs thermo-electrical computations followed by
        determination ot threshold current and optical analysis in order to
        determine the threshold of a semiconductor laser. The search is
        performed by ``scipy`` root finding algorithm in order to determine
        the voltage and electric current ensuring no optical loss in the
        laser cavity.
    
        This solver uses vector optical solver :class:`~plask.optical.slab.BesselCyl`.
    
        The computations can be executed using `compute` method, after which
        the results may be save to the HDF5 file with `save` or presented visually
        using ``plot_...`` methods. If ``save`` parameter of the :meth:`compute` method
        is *True* the fields are saved automatically after the computations.
        The file name is based on the name of the executed script with suffix denoting
        either the launch time or the identifier of a batch job if a batch system
        (like SLURM, OpenPBS, or SGE) is used.
    """
    _Diffusion = DiffusionCyl # class alias

    _Electrical = ShockleyCyl # class alias

    _Gain = FreeCarrierCyl # class alias

    _OPTICAL_ROOTS = builtins.dict()
    
    _Optical = None
    _Thermal = StaticCyl # class alias

    _ThermoElectric__reconnect = __reconnect # function alias

    _ThresholdSearch__reconnect = __reconnect # function alias

    def _get_defines_info(*args, **kwargs):
        pass


    def _get_in_junction(*args, **kwargs):
        pass


    def _get_info(*args, **kwargs):
        pass


    def _get_lam(*args, **kwargs):
        pass


    def _iter_levels(*args, **kwargs):
        pass


    _lam0 = 'lam0'
    _optarg = 'lam'
    def _optargs(*args, **kwargs):
        pass


    def _parse_xpl(*args, **kwargs):
        pass


    def _plot_hbounds(*args, **kwargs):
        pass


    def _plot_in_junction(*args, **kwargs):
        pass


    def _quickstep(*args, **kwargs):
        """
                Function performing one step of the quick threshold search.
        
                Args:
                    arg (array): Array containing voltage on a specified boundary condition [V] and wavelength.
        
                Returns:
                    array: Imaginary and real part of a specified mode
        """

    def _read_attr(*args, **kwargs):
        pass


    def _save_thermoelectric(*args, **kwargs):
        pass


    def compute(*args, **kwargs):
        """
                Execute the algorithm.
        
                In the beginning the solvers are invalidated and next, the self-
                consistent loop of thermal, electrical, gain, and optical calculations
                are run within the root-finding algorithm until the mode is found
                with zero optical losses.
        
                Args:
                    save (bool or str): If `True` the computed fields are saved to the
                        HDF5 file named after the script name with the suffix denoting
                        either the batch job id or the current time if no batch system
                        is used. The filename can be overridden by setting this parameter
                        as a string.
        
                    invalidate (bool): If this flag is set, solvers are invalidated
                                       in the beginning of the computations.
        
                    group (str): HDF5 group to save the data under.
        
                    stepsave (bool): If `True` the computed fields are saved to the
                        HDF5 file after each computations step.
        
                Returns:
                    The voltage set to ``ivolt`` boundary condition for the threshold.
                    The threshold current can be then obtained by calling:
        
                    >>> solver.get_total_current()
                    123.0
        """

    def compute_thermoelectric(*args, **kwargs):
        """
                Perform thermo-electric calculations.
        
                This method may be called manually to perform thermo-electric calculations.
                Afterwards, one may investigate gain spectrum or verify settings of the optical
                solver.
        """

    diffusion = meta.shockley.thermoelectric.attribute()
    
    dlam = 0.05
    electrical = meta.shockley.thermoelectric.attribute()
    
    gain = meta.shockley.thermoelectric.attribute()
    
    def get_gain_spectrum(*args, **kwargs):
        """
                Get gain spectrum for specified junction.
        
                Args:
                    lams (array of floats): Wavelengths for which the spectrum should be plotted.
        
                    pos (float): Lateral position fo the point in which the spectrum is plotted.
        
                    junction (int): Junction number to take gain from.
        
                Return:
                    Data: Gain spectrum.
        """

    def get_junction_concentrations(*args, **kwargs):
        """
                Get carriers concentration at the active regions.
        
                Args:
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_junction_currents(*args, **kwargs):
        """
                Get current densities at the active regions.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_junction_gains(*args, **kwargs):
        """
                Get gain at the active regions.
        
                Args:
                    axis (mesh or sequence): Points along horizontal axis to plot gain at.
                                             Defaults to the optical mesh.
        
                   interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_lam(*args, **kwargs):
        """
                Get approximate wavelength for optical computations.
        
                This method returns approximate wavelength for optical computations.
                By default if browses the wavelength range starting from :attr:`maxlam`,
                decreasing it by :attr:`dlam` until radial mode :attr:`hen` is found.
        
                You can override this method or set it to a a fixed value to use custom
                mode approximation.
        
                Example:
                     >>> solver = ThresholdSearchBesselCyl()
                     >>> solver.get_lam = 980.
                     >>> solver.compute()
        """

    def get_optical_determinant(*args, **kwargs):
        """
                Function computing determinant of the optical solver.
        
                Args:
                     lam (float or array): Wavelength to compute the determinant for [nm].
        
                Returns:
                    float or array: Optical determinant.
        """

    def get_optical_field(*args, **kwargs):
        """
                Get computed optical mode field at threshold.
        
                Args:
                    resolution (tuple of ints): Number of points in horizontal and vertical directions.
        """

    def get_optical_field_horizontal(*args, **kwargs):
        """
                Get horizontal distribution of the computed optical mode field at threshold.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    interpolation (str): Interpolation used when retrieving current density.
        """

    def get_optical_field_vertical(*args, **kwargs):
        """
                Plot vertical distribution of the computed optical mode field at threshold and
                refractive index profile.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    pos (float): Horizontal position to get the field at.
        
                    offset (float): Distance above and below geometry boundary to include into
                                    the plot.
        
                    interpolation (str): Interpolation used when retrieving current density.
        """

    def get_temperature(*args, **kwargs):
        """
                Get temperature on a thermal mesh.
        """

    def get_total_current(*args, **kwargs):
        """
                Get total current flowing through active region [mA]
        """

    def get_vertical_voltage(*args, **kwargs):
        """
                Get computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        """

    def get_voltage(*args, **kwargs):
        """
                Get voltage on an electrical mesh.
        """

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

    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*.
        """

    lam = None
    def load_xpl(*args, **kwargs):
        pass


    maxiter = 50
    maxlam = meta.shockley.thermoelectric.attribute()
    
    def on_initialize(*args, **kwargs):
        pass


    def on_invalidate(*args, **kwargs):
        pass


    optical = meta.shockley.thermoelectric.attribute()
    
    optical_resolution = builtins.tuple()
    
    outCarriersConcentration = None
    """
    Provider of the computed carriers concentration [1/cm³].
    
    
    outCarriersConcentration(n=0, mesh, interpolation='default')
    
    :param str type: Detailed information which carriers are returned. It can be
                     'majority' to return majority carriers in given material,
                     'pairs' for the concentration of electron-hole pairs,
                     'electrons', or 'holes' for particular carriers type.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the carriers concentration 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.inCarriersConcentration = solver.outCarriersConcentration
    
       Obtain the provided field:
    
       >>> solver.outCarriersConcentration(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outCarriersConcentration)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.CarriersConcentrationProviderCyl`
    
       Receciver class: :class:`plask.flow.CarriersConcentrationReceiverCyl`
    """

    outConductivity = None
    """
    Provider of the computed electrical conductivity [S/m].
    
    
    outConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electrical conductivity on the specified mesh **[S/m]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inConductivity = solver.outConductivity
    
       Obtain the provided field:
    
       >>> solver.outConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ConductivityProviderCyl`
    
       Receciver class: :class:`plask.flow.ConductivityReceiverCyl`
    """

    outCurrentDensity = None
    """
    Provider of the computed current density [kA/cm²].
    
    
    outCurrentDensity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the current density on the specified mesh **[kA/cm²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inCurrentDensity = solver.outCurrentDensity
    
       Obtain the provided field:
    
       >>> solver.outCurrentDensity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.CurrentDensityProviderCyl`
    
       Receciver class: :class:`plask.flow.CurrentDensityReceiverCyl`
    """

    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`
    """

    outHeat = None
    """
    Provider of the computed heat sources density [W/m³].
    
    
    outHeat(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat sources density on the specified mesh **[W/m³]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeat = solver.outHeat
    
       Obtain the provided field:
    
       >>> solver.outHeat(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatProviderCyl`
    
       Receciver class: :class:`plask.flow.HeatReceiverCyl`
    """

    outHeatFlux = None
    """
    Provider of the computed heat flux [W/m²].
    
    
    outHeatFlux(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat flux on the specified mesh **[W/m²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeatFlux = solver.outHeatFlux
    
       Obtain the provided field:
    
       >>> solver.outHeatFlux(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatFluxProviderCyl`
    
       Receciver class: :class:`plask.flow.HeatFluxReceiverCyl`
    """

    outLightE = None
    """
    Provider of the computed electric field [V/m].
    
    
    outLightE(n=0, mesh, interpolation='default')
    
    :param int n: Value number.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electric field on the specified mesh **[V/m]**.
    
    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.inLightE = solver.outLightE
    
       Obtain the provided field:
    
       >>> solver.outLightE(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outLightE)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.LightEProvider2D`
    
       Receciver class: :class:`plask.flow.LightEReceiver2D`
    """

    outLightMagnitude = None
    """
    Provider of the computed optical field magnitude [W/m²].
    
    
    outLightMagnitude(n=0, mesh, interpolation='default')
    
    :param int n: Computed mode number.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the optical field magnitude on the specified mesh **[W/m²]**.
    
    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.inLightMagnitude = solver.outLightMagnitude
    
       Obtain the provided field:
    
       >>> solver.outLightMagnitude(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outLightMagnitude)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.LightMagnitudeProviderCyl`
    
       Receciver class: :class:`plask.flow.LightMagnitudeReceiverCyl`
    """

    outLoss = None
    """
    Provider of the computed modal extinction [1/cm].
    
    
    outLoss(n=0)
    
    :param int n: Value number.
    
    :return: Value of the modal extinction **[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.inModalLoss = solver.outLoss
    
       Obtain the provided value:
    
       >>> solver.outLoss(n=0)
       1000
    
       Test the number of provided values:
    
       >>> len(solver.outLoss)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.ModalLossProvider`
    
       Receciver class: :class:`plask.flow.ModalLossReceiver`
    """

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

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

    outThermalConductivity = None
    """
    Provider of the computed thermal conductivity [W/(m×K)].
    
    
    outThermalConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the thermal conductivity on the specified mesh **[W/(m×K)]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inThermalConductivity = solver.outThermalConductivity
    
       Obtain the provided field:
    
       >>> solver.outThermalConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ThermalConductivityProviderCyl`
    
       Receciver class: :class:`plask.flow.ThermalConductivityReceiverCyl`
    """

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

    outWavelength = None
    """
    Provider of the computed wavelength [nm].
    
    
    outWavelength(n=0)
    
    :param int n: Computed mode number.
    
    :return: Value of the wavelength **[nm]**.
    
    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.inWavelength = solver.outWavelength
    
       Obtain the provided value:
    
       >>> solver.outWavelength(n=0)
       1000
    
       Test the number of provided values:
    
       >>> len(solver.outWavelength)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.WavelengthProvider`
    
       Receciver class: :class:`plask.flow.WavelengthReceiver`
    """

    def plot_gain_spectrum(*args, **kwargs):
        """
                Plot gain spectrum for specified junction.
        
                Args:
                    lams (array of floats): Wavelengths for which the spectrum should be plotted.
        
                    pos (float): Lateral position fo the point in which the spectrum is plotted.
        
                    junction (int): Junction number to take gain from.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_concentration(*args, **kwargs):
        """
                Plot carriers concentration at the active region.
        
                Args:
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_current(*args, **kwargs):
        """
                Plot current density at the active region.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_gain(*args, **kwargs):
        """
                Plot gain at the active region.
        
                Args:
                    axis (mesh or sequence): Points along horizontal axis to plot gain at.
                                             Defaults to the optical mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_determinant(*args, **kwargs):
        """
                Function plotting determinant of the optical solver.
        
                Args:
                    lams (array): Wavelengths to plot the determinant for [nm].
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field(*args, **kwargs):
        """
                Plot computed optical mode field at threshold.
        
                Args:
                    resolution (tuple of ints): Number of points in horizontal and vertical directions.
        
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field_horizontal(*args, **kwargs):
        """
                Plot horizontal distribution of the computed optical mode field at threshold.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field_vertical(*args, **kwargs):
        """
                Plot vertical distribution of the computed optical mode field at threshold and
                refractive index profile.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    pos (float): Horizontal position to get the field at.
        
                    offset (float): Distance above and below geometry boundary to include into
                                    the plot.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_temperature(*args, **kwargs):
        """
                Plot computed temperature to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification for
                        the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def plot_vertical_voltage(*args, **kwargs):
        """
                Plot computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_voltage(*args, **kwargs):
        """
                Plot computed voltage to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the :func:`plask.plot_field`.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    quick = False
    def reconnect(*args, **kwargs):
        """
                Reconnect all internal solvers.
        
                This method should be called if some of the internal solvers were changed manually.
        """

    def save(*args, **kwargs):
        """
                Save the computation results to the HDF5 file.
        
                Args:
                    filename (str): The file name to save to.
                        If omitted, the file name is generated automatically based on
                        the script name with suffix denoting either the batch job id or
                        the current time if no batch system is used.
        
                    group (str): HDF5 group to save the data under.
        
                    optical_resolution (tuple of ints): Number of points in horizontal and vertical directions
                        for optical field.
        """

    skip_thermal = False
    def step(*args, **kwargs):
        """
                Function performing one step of the threshold search.
        
                Args:
                    volt (float): Voltage on a specified boundary condition [V].
        
                    save (bool): If `True` the computed fields are saved to the
                        HDF5 file after each computations step.
        
                Returns:
                    float: Loss of a specified mode
        """

    tfreq = 6.0
    thermal = meta.shockley.thermoelectric.attribute()
    
    vmax = None
    vmin = None
    vtol = 1e-05


class ThresholdSearchCyl(meta.shockley.threshold.ThresholdSearch):
    """
        Solver for threshold search of semiconductor laser.
    
        This solver performs thermo-electrical computations followed by
        determination ot threshold current and optical analysis in order to
        determine the threshold of a semiconductor laser. The search is
        performed by ``scipy`` root finding algorithm in order to determine
        the voltage and electric current ensuring no optical loss in the
        laser cavity.
    
        The computations can be executed using `compute` method, after which
        the results may be save to the HDF5 file with `save` or presented visually
        using ``plot_...`` methods. If ``save`` parameter of the :meth:`compute` method
        is *True* the fields are saved automatically after the computations.
        The file name is based on the name of the executed script with suffix denoting
        either the launch time or the identifier of a batch job if a batch system
        (like SLURM, OpenPBS, or SGE) is used.
    """
    _Diffusion = DiffusionCyl # class alias

    _Electrical = ShockleyCyl # class alias

    _Gain = FreeCarrierCyl # class alias

    _OPTICAL_ROOTS = builtins.dict()
    
    _Optical = None
    _Thermal = StaticCyl # class alias

    _ThermoElectric__reconnect = __reconnect # function alias

    _ThresholdSearch__reconnect = __reconnect # function alias

    def _get_defines_info(*args, **kwargs):
        pass


    def _get_in_junction(*args, **kwargs):
        pass


    def _get_info(*args, **kwargs):
        pass


    def _get_lam(*args, **kwargs):
        pass


    def _iter_levels(*args, **kwargs):
        pass


    _lam0 = 'lam0'
    _optarg = 'lam'
    def _optargs(*args, **kwargs):
        pass


    def _parse_xpl(*args, **kwargs):
        pass


    def _plot_hbounds(*args, **kwargs):
        pass


    def _plot_in_junction(*args, **kwargs):
        pass


    def _quickstep(*args, **kwargs):
        """
                Function performing one step of the quick threshold search.
        
                Args:
                    arg (array): Array containing voltage on a specified boundary condition [V] and wavelength.
        
                Returns:
                    array: Imaginary and real part of a specified mode
        """

    def _read_attr(*args, **kwargs):
        pass


    def _save_thermoelectric(*args, **kwargs):
        pass


    def compute(*args, **kwargs):
        """
                Execute the algorithm.
        
                In the beginning the solvers are invalidated and next, the self-
                consistent loop of thermal, electrical, gain, and optical calculations
                are run within the root-finding algorithm until the mode is found
                with zero optical losses.
        
                Args:
                    save (bool or str): If `True` the computed fields are saved to the
                        HDF5 file named after the script name with the suffix denoting
                        either the batch job id or the current time if no batch system
                        is used. The filename can be overridden by setting this parameter
                        as a string.
        
                    invalidate (bool): If this flag is set, solvers are invalidated
                                       in the beginning of the computations.
        
                    group (str): HDF5 group to save the data under.
        
                    stepsave (bool): If `True` the computed fields are saved to the
                        HDF5 file after each computations step.
        
                Returns:
                    The voltage set to ``ivolt`` boundary condition for the threshold.
                    The threshold current can be then obtained by calling:
        
                    >>> solver.get_total_current()
                    123.0
        """

    def compute_thermoelectric(*args, **kwargs):
        """
                Perform thermo-electric calculations.
        
                This method may be called manually to perform thermo-electric calculations.
                Afterwards, one may investigate gain spectrum or verify settings of the optical
                solver.
        """

    diffusion = meta.shockley.thermoelectric.attribute()
    
    dlam = 0.02
    electrical = meta.shockley.thermoelectric.attribute()
    
    gain = meta.shockley.thermoelectric.attribute()
    
    def get_gain_spectrum(*args, **kwargs):
        """
                Get gain spectrum for specified junction.
        
                Args:
                    lams (array of floats): Wavelengths for which the spectrum should be plotted.
        
                    pos (float): Lateral position fo the point in which the spectrum is plotted.
        
                    junction (int): Junction number to take gain from.
        
                Return:
                    Data: Gain spectrum.
        """

    def get_junction_concentrations(*args, **kwargs):
        """
                Get carriers concentration at the active regions.
        
                Args:
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_junction_currents(*args, **kwargs):
        """
                Get current densities at the active regions.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_junction_gains(*args, **kwargs):
        """
                Get gain at the active regions.
        
                Args:
                    axis (mesh or sequence): Points along horizontal axis to plot gain at.
                                             Defaults to the optical mesh.
        
                   interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_lam(*args, **kwargs):
        """
                Get approximate wavelength for optical computations.
        
                This method returns approximate wavelength for optical computations.
                By default if browses the wavelength range starting from :attr:`maxlam`,
                decreasing it by :attr:`dlam` until radial mode :attr:`lpn` is found.
        
                You can override this method or set it to a a fixed value to use custom
                mode approximation.
        
                Example:
                     >>> solver = ThresholdSearchCyl()
                     >>> solver.get_lam = 980.
                     >>> solver.compute()
        """

    def get_optical_determinant(*args, **kwargs):
        """
                Function computing determinant of the optical solver.
        
                Args:
                     lam (float or array): Wavelength to compute the determinant for [nm].
        
                Returns:
                    float or array: Optical determinant.
        """

    def get_optical_field(*args, **kwargs):
        """
                Get computed optical mode field at threshold.
        
                Args:
                    resolution (tuple of ints): Number of points in horizontal and vertical directions.
        """

    def get_optical_field_horizontal(*args, **kwargs):
        """
                Get horizontal distribution of the computed optical mode field at threshold.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    interpolation (str): Interpolation used when retrieving current density.
        """

    def get_optical_field_vertical(*args, **kwargs):
        """
                Plot vertical distribution of the computed optical mode field at threshold and
                refractive index profile.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    pos (float): Horizontal position to get the field at.
        
                    offset (float): Distance above and below geometry boundary to include into
                                    the plot.
        
                    interpolation (str): Interpolation used when retrieving current density.
        """

    def get_temperature(*args, **kwargs):
        """
                Get temperature on a thermal mesh.
        """

    def get_total_current(*args, **kwargs):
        """
                Get total current flowing through active region [mA]
        """

    def get_vert_optical_determinant(*args, **kwargs):
        """
                Function computing ‘vertical determinant’ of the optical solver.
        
                Args:
                     vlam (float or array): ‘Vertical wavelength’ to compute the vertical
                                             determinant for [nm].
        
                Returns:
                    float or array: Optical vertical determinant.
        """

    def get_vertical_voltage(*args, **kwargs):
        """
                Get computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        """

    def get_voltage(*args, **kwargs):
        """
                Get voltage on an electrical mesh.
        """

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

    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*.
        """

    def load_xpl(*args, **kwargs):
        pass


    lpm = 0
    lpn = 1
    maxiter = 50
    maxlam = meta.shockley.thermoelectric.attribute()
    
    def on_initialize(*args, **kwargs):
        pass


    def on_invalidate(*args, **kwargs):
        pass


    optical = meta.shockley.thermoelectric.attribute()
    
    optical_resolution = builtins.tuple()
    
    outCarriersConcentration = None
    """
    Provider of the computed carriers concentration [1/cm³].
    
    
    outCarriersConcentration(n=0, mesh, interpolation='default')
    
    :param str type: Detailed information which carriers are returned. It can be
                     'majority' to return majority carriers in given material,
                     'pairs' for the concentration of electron-hole pairs,
                     'electrons', or 'holes' for particular carriers type.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the carriers concentration 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.inCarriersConcentration = solver.outCarriersConcentration
    
       Obtain the provided field:
    
       >>> solver.outCarriersConcentration(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outCarriersConcentration)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.CarriersConcentrationProviderCyl`
    
       Receciver class: :class:`plask.flow.CarriersConcentrationReceiverCyl`
    """

    outConductivity = None
    """
    Provider of the computed electrical conductivity [S/m].
    
    
    outConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electrical conductivity on the specified mesh **[S/m]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inConductivity = solver.outConductivity
    
       Obtain the provided field:
    
       >>> solver.outConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ConductivityProviderCyl`
    
       Receciver class: :class:`plask.flow.ConductivityReceiverCyl`
    """

    outCurrentDensity = None
    """
    Provider of the computed current density [kA/cm²].
    
    
    outCurrentDensity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the current density on the specified mesh **[kA/cm²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inCurrentDensity = solver.outCurrentDensity
    
       Obtain the provided field:
    
       >>> solver.outCurrentDensity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.CurrentDensityProviderCyl`
    
       Receciver class: :class:`plask.flow.CurrentDensityReceiverCyl`
    """

    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`
    """

    outHeat = None
    """
    Provider of the computed heat sources density [W/m³].
    
    
    outHeat(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat sources density on the specified mesh **[W/m³]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeat = solver.outHeat
    
       Obtain the provided field:
    
       >>> solver.outHeat(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatProviderCyl`
    
       Receciver class: :class:`plask.flow.HeatReceiverCyl`
    """

    outHeatFlux = None
    """
    Provider of the computed heat flux [W/m²].
    
    
    outHeatFlux(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat flux on the specified mesh **[W/m²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeatFlux = solver.outHeatFlux
    
       Obtain the provided field:
    
       >>> solver.outHeatFlux(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatFluxProviderCyl`
    
       Receciver class: :class:`plask.flow.HeatFluxReceiverCyl`
    """

    outLightE = None
    """
    Provider of the computed electric field [V/m].
    
    
    outLightE(n=0, mesh, interpolation='default')
    
    :param int n: Value number.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electric field on the specified mesh **[V/m]**.
    
    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.inLightE = solver.outLightE
    
       Obtain the provided field:
    
       >>> solver.outLightE(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outLightE)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.LightEProvider2D`
    
       Receciver class: :class:`plask.flow.LightEReceiver2D`
    """

    outLightMagnitude = None
    """
    Provider of the computed optical field magnitude [W/m²].
    
    
    outLightMagnitude(n=0, mesh, interpolation='default')
    
    :param int n: Computed mode number.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the optical field magnitude on the specified mesh **[W/m²]**.
    
    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.inLightMagnitude = solver.outLightMagnitude
    
       Obtain the provided field:
    
       >>> solver.outLightMagnitude(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outLightMagnitude)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.LightMagnitudeProviderCyl`
    
       Receciver class: :class:`plask.flow.LightMagnitudeReceiverCyl`
    """

    outLoss = None
    """
    Provider of the computed modal extinction [1/cm].
    
    
    outLoss(n=0)
    
    :param int n: Value number.
    
    :return: Value of the modal extinction **[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.inModalLoss = solver.outLoss
    
       Obtain the provided value:
    
       >>> solver.outLoss(n=0)
       1000
    
       Test the number of provided values:
    
       >>> len(solver.outLoss)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.ModalLossProvider`
    
       Receciver class: :class:`plask.flow.ModalLossReceiver`
    """

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

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

    outThermalConductivity = None
    """
    Provider of the computed thermal conductivity [W/(m×K)].
    
    
    outThermalConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the thermal conductivity on the specified mesh **[W/(m×K)]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inThermalConductivity = solver.outThermalConductivity
    
       Obtain the provided field:
    
       >>> solver.outThermalConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ThermalConductivityProviderCyl`
    
       Receciver class: :class:`plask.flow.ThermalConductivityReceiverCyl`
    """

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

    outWavelength = None
    """
    Provider of the computed wavelength [nm].
    
    
    outWavelength(n=0)
    
    :param int n: Computed mode number.
    
    :return: Value of the wavelength **[nm]**.
    
    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.inWavelength = solver.outWavelength
    
       Obtain the provided value:
    
       >>> solver.outWavelength(n=0)
       1000
    
       Test the number of provided values:
    
       >>> len(solver.outWavelength)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.WavelengthProvider`
    
       Receciver class: :class:`plask.flow.WavelengthReceiver`
    """

    def plot_gain_spectrum(*args, **kwargs):
        """
                Plot gain spectrum for specified junction.
        
                Args:
                    lams (array of floats): Wavelengths for which the spectrum should be plotted.
        
                    pos (float): Lateral position fo the point in which the spectrum is plotted.
        
                    junction (int): Junction number to take gain from.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_concentration(*args, **kwargs):
        """
                Plot carriers concentration at the active region.
        
                Args:
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_current(*args, **kwargs):
        """
                Plot current density at the active region.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_gain(*args, **kwargs):
        """
                Plot gain at the active region.
        
                Args:
                    axis (mesh or sequence): Points along horizontal axis to plot gain at.
                                             Defaults to the optical mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_determinant(*args, **kwargs):
        """
                Function plotting determinant of the optical solver.
        
                Args:
                    lams (array): Wavelengths to plot the determinant for [nm].
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field(*args, **kwargs):
        """
                Plot computed optical mode field at threshold.
        
                Args:
                    resolution (tuple of ints): Number of points in horizontal and vertical directions.
        
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field_horizontal(*args, **kwargs):
        """
                Plot horizontal distribution of the computed optical mode field at threshold.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field_vertical(*args, **kwargs):
        """
                Plot vertical distribution of the computed optical mode field at threshold and
                refractive index profile.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    pos (float): Horizontal position to get the field at.
        
                    offset (float): Distance above and below geometry boundary to include into
                                    the plot.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_temperature(*args, **kwargs):
        """
                Plot computed temperature to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification for
                        the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def plot_vert_optical_determinant(*args, **kwargs):
        """
                Function plotting ‘vertical determinant’ of the optical solver.
        
                Args:
                    vlams (array): ‘Vertical wavelengths’ to plot the determinant for [nm].
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_vertical_voltage(*args, **kwargs):
        """
                Plot computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_voltage(*args, **kwargs):
        """
                Plot computed voltage to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the :func:`plask.plot_field`.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    quick = False
    def reconnect(*args, **kwargs):
        """
                Reconnect all internal solvers.
        
                This method should be called if some of the internal solvers were changed manually.
        """

    def save(*args, **kwargs):
        """
                Save the computation results to the HDF5 file.
        
                Args:
                    filename (str): The file name to save to.
                        If omitted, the file name is generated automatically based on
                        the script name with suffix denoting either the batch job id or
                        the current time if no batch system is used.
        
                    group (str): HDF5 group to save the data under.
        
                    optical_resolution (tuple of ints): Number of points in horizontal and vertical directions
                        for optical field.
        """

    skip_thermal = False
    def step(*args, **kwargs):
        """
                Function performing one step of the threshold search.
        
                Args:
                    volt (float): Voltage on a specified boundary condition [V].
        
                    save (bool): If `True` the computed fields are saved to the
                        HDF5 file after each computations step.
        
                Returns:
                    float: Loss of a specified mode
        """

    tfreq = 6.0
    thermal = meta.shockley.thermoelectric.attribute()
    
    vmax = None
    vmin = None
    vtol = 1e-05


class ThresholdSearchFourier2D(meta.shockley.threshold.ThresholdSearch):
    """
        Solver for threshold search of semiconductor laser.
    
        This solver performs thermo-electrical computations followed by
        determination ot threshold current and optical analysis in order to
        determine the threshold of a semiconductor laser. The search is
        performed by ``scipy`` root finding algorithm in order to determine
        the voltage and electric current ensuring no optical loss in the
        laser cavity.
    
        This solver uses vector optical solver :class:`~plask.optical.slab.Fourier2D`.
    
        The computations can be executed using `compute` method, after which
        the results may be save to the HDF5 file with `save` or presented visually
        using ``plot_...`` methods. If ``save`` parameter of the :meth:`compute` method
        is *True* the fields are saved automatically after the computations.
        The file name is based on the name of the executed script with suffix denoting
        either the launch time or the identifier of a batch job if a batch system
        (like SLURM, OpenPBS, or SGE) is used.
    """
    _Diffusion = Diffusion2D # class alias

    _Electrical = Shockley2D # class alias

    _Gain = FreeCarrier2D # class alias

    _OPTICAL_ROOTS = builtins.dict()
    
    _Optical = None
    _Thermal = Static2D # class alias

    _ThermoElectric__reconnect = __reconnect # function alias

    _ThresholdSearch__reconnect = __reconnect # function alias

    def _get_defines_info(*args, **kwargs):
        pass


    def _get_in_junction(*args, **kwargs):
        pass


    def _get_info(*args, **kwargs):
        pass


    def _get_lam(*args, **kwargs):
        pass


    def _iter_levels(*args, **kwargs):
        pass


    _lam0 = 'lam'
    _optarg = 'neff'
    def _optargs(*args, **kwargs):
        pass


    def _parse_xpl(*args, **kwargs):
        pass


    def _plot_hbounds(*args, **kwargs):
        pass


    def _plot_in_junction(*args, **kwargs):
        pass


    def _quickstep(*args, **kwargs):
        """
                Function performing one step of the quick threshold search.
        
                Args:
                    arg (array): Array containing voltage on a specified boundary condition [V] and wavelength.
        
                Returns:
                    array: Imaginary and real part of a specified mode
        """

    def _read_attr(*args, **kwargs):
        pass


    def _save_thermoelectric(*args, **kwargs):
        pass


    def compute(*args, **kwargs):
        """
                Execute the algorithm.
        
                In the beginning the solvers are invalidated and next, the self-
                consistent loop of thermal, electrical, gain, and optical calculations
                are run within the root-finding algorithm until the mode is found
                with zero optical losses.
        
                Args:
                    save (bool or str): If `True` the computed fields are saved to the
                        HDF5 file named after the script name with the suffix denoting
                        either the batch job id or the current time if no batch system
                        is used. The filename can be overridden by setting this parameter
                        as a string.
        
                    invalidate (bool): If this flag is set, solvers are invalidated
                                       in the beginning of the computations.
        
                    group (str): HDF5 group to save the data under.
        
                    stepsave (bool): If `True` the computed fields are saved to the
                        HDF5 file after each computations step.
        
                Returns:
                    The voltage set to ``ivolt`` boundary condition for the threshold.
                    The threshold current can be then obtained by calling:
        
                    >>> solver.get_total_current()
                    123.0
        """

    def compute_thermoelectric(*args, **kwargs):
        """
                Perform thermo-electric calculations.
        
                This method may be called manually to perform thermo-electric calculations.
                Afterwards, one may investigate gain spectrum or verify settings of the optical
                solver.
        """

    diffusion = meta.shockley.thermoelectric.attribute()
    
    dneff = 0.02
    electrical = meta.shockley.thermoelectric.attribute()
    
    gain = meta.shockley.thermoelectric.attribute()
    
    def get_gain_spectrum(*args, **kwargs):
        """
                Get gain spectrum for specified junction.
        
                Args:
                    lams (array of floats): Wavelengths for which the spectrum should be plotted.
        
                    pos (float): Lateral position fo the point in which the spectrum is plotted.
        
                    junction (int): Junction number to take gain from.
        
                Return:
                    Data: Gain spectrum.
        """

    def get_junction_concentrations(*args, **kwargs):
        """
                Get carriers concentration at the active regions.
        
                Args:
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_junction_currents(*args, **kwargs):
        """
                Get current densities at the active regions.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_junction_gains(*args, **kwargs):
        """
                Get gain at the active regions.
        
                Args:
                    axis (mesh or sequence): Points along horizontal axis to plot gain at.
                                             Defaults to the optical mesh.
        
                   interpolation (str): Interpolation used when retrieving current density.
        
                Return:
                    dict: Dictionary of junction current density data.
                          Keys are the junction number.
        """

    def get_lam(*args, **kwargs):
        pass


    def get_nng(*args, **kwargs):
        """
                Get approximate effective index for optical computations.
        
                This method returns approximate wavelength for optical computations.
                By default if browses the wavelength range starting from :attr:`maxneff`,
                decreasing it by :attr:`dneff` until lateral mode :attr:`mn` is found.
        
                You can override this method to use custom mode approximation.
        
                Example:
                     >>> solver = ThresholdSearchFourier2D()
                     >>> solver.get_nng = lambda: 3.5
                     >>> solver.compute()
        """

    def get_optical_determinant(*args, **kwargs):
        """
                Function computing determinant of the optical solver.
        
                Args:
                     neff (float or array): Effective index to compute the determinant for.
        
                Returns:
                    float or array: Optical determinant.
        """

    def get_optical_field(*args, **kwargs):
        """
                Get computed optical mode field at threshold.
        
                Args:
                    resolution (tuple of ints): Number of points in horizontal and vertical directions.
        """

    def get_optical_field_horizontal(*args, **kwargs):
        """
                Get horizontal distribution of the computed optical mode field at threshold.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    interpolation (str): Interpolation used when retrieving current density.
        """

    def get_optical_field_vertical(*args, **kwargs):
        """
                Plot vertical distribution of the computed optical mode field at threshold and
                refractive index profile.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    pos (float): Horizontal position to get the field at.
        
                    offset (float): Distance above and below geometry boundary to include into
                                    the plot.
        
                    interpolation (str): Interpolation used when retrieving current density.
        """

    def get_temperature(*args, **kwargs):
        """
                Get temperature on a thermal mesh.
        """

    def get_total_current(*args, **kwargs):
        """
                Get total current flowing through active region [mA]
        """

    def get_vertical_voltage(*args, **kwargs):
        """
                Get computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        """

    def get_voltage(*args, **kwargs):
        """
                Get voltage on an electrical mesh.
        """

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

    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*.
        """

    def load_xpl(*args, **kwargs):
        pass


    maxiter = 50
    mn = 1
    def on_initialize(*args, **kwargs):
        pass


    def on_invalidate(*args, **kwargs):
        pass


    optical = meta.shockley.thermoelectric.attribute()
    
    optical_resolution = builtins.tuple()
    
    outCarriersConcentration = None
    """
    Provider of the computed carriers concentration [1/cm³].
    
    
    outCarriersConcentration(n=0, mesh, interpolation='default')
    
    :param str type: Detailed information which carriers are returned. It can be
                     'majority' to return majority carriers in given material,
                     'pairs' for the concentration of electron-hole pairs,
                     'electrons', or 'holes' for particular carriers type.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the carriers concentration 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.inCarriersConcentration = solver.outCarriersConcentration
    
       Obtain the provided field:
    
       >>> solver.outCarriersConcentration(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outCarriersConcentration)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.CarriersConcentrationProvider2D`
    
       Receciver class: :class:`plask.flow.CarriersConcentrationReceiver2D`
    """

    outConductivity = None
    """
    Provider of the computed electrical conductivity [S/m].
    
    
    outConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electrical conductivity on the specified mesh **[S/m]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inConductivity = solver.outConductivity
    
       Obtain the provided field:
    
       >>> solver.outConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ConductivityProvider2D`
    
       Receciver class: :class:`plask.flow.ConductivityReceiver2D`
    """

    outCurrentDensity = None
    """
    Provider of the computed current density [kA/cm²].
    
    
    outCurrentDensity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the current density on the specified mesh **[kA/cm²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inCurrentDensity = solver.outCurrentDensity
    
       Obtain the provided field:
    
       >>> solver.outCurrentDensity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.CurrentDensityProvider2D`
    
       Receciver class: :class:`plask.flow.CurrentDensityReceiver2D`
    """

    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`
    """

    outHeat = None
    """
    Provider of the computed heat sources density [W/m³].
    
    
    outHeat(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat sources density on the specified mesh **[W/m³]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeat = solver.outHeat
    
       Obtain the provided field:
    
       >>> solver.outHeat(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatProvider2D`
    
       Receciver class: :class:`plask.flow.HeatReceiver2D`
    """

    outHeatFlux = None
    """
    Provider of the computed heat flux [W/m²].
    
    
    outHeatFlux(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the heat flux on the specified mesh **[W/m²]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inHeatFlux = solver.outHeatFlux
    
       Obtain the provided field:
    
       >>> solver.outHeatFlux(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.HeatFluxProvider2D`
    
       Receciver class: :class:`plask.flow.HeatFluxReceiver2D`
    """

    outLightE = None
    """
    Provider of the computed electric field [V/m].
    
    
    outLightE(n=0, mesh, interpolation='default')
    
    :param int n: Value number.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the electric field on the specified mesh **[V/m]**.
    
    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.inLightE = solver.outLightE
    
       Obtain the provided field:
    
       >>> solver.outLightE(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outLightE)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.LightEProvider2D`
    
       Receciver class: :class:`plask.flow.LightEReceiver2D`
    """

    outLightMagnitude = None
    """
    Provider of the computed optical field magnitude [W/m²].
    
    
    outLightMagnitude(n=0, mesh, interpolation='default')
    
    :param int n: Computed mode number.
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the optical field magnitude on the specified mesh **[W/m²]**.
    
    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.inLightMagnitude = solver.outLightMagnitude
    
       Obtain the provided field:
    
       >>> solver.outLightMagnitude(0, mesh)
       <plask.Data at 0x1234567>
    
       Test the number of provided values:
    
       >>> len(solver.outLightMagnitude)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.LightMagnitudeProviderCyl`
    
       Receciver class: :class:`plask.flow.LightMagnitudeReceiverCyl`
    """

    outNeff = None
    """
    Provider of the computed effective index [-].
    
    
    outNeff(n=0)
    
    :param int n: Value number.
    
    :return: Value of the effective index **[-]**.
    
    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.inEffectiveIndex = solver.outNeff
    
       Obtain the provided value:
    
       >>> solver.outNeff(n=0)
       1000
    
       Test the number of provided values:
    
       >>> len(solver.outNeff)
       3
    
    See also:
    
       Provider class: :class:`plask.flow.EffectiveIndexProvider`
    
       Receciver class: :class:`plask.flow.EffectiveIndexReceiver`
    """

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

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

    outThermalConductivity = None
    """
    Provider of the computed thermal conductivity [W/(m×K)].
    
    
    outThermalConductivity(mesh, interpolation='default')
    
    :param mesh mesh: Target mesh to get the field at.
    :param str interpolation: Requested interpolation method.
    
    :return: Data with the thermal conductivity on the specified mesh **[W/(m×K)]**.
    
    Example:
       Connect the provider to a receiver in some other solver:
    
       >>> other_solver.inThermalConductivity = solver.outThermalConductivity
    
       Obtain the provided field:
    
       >>> solver.outThermalConductivity(mesh)
       <plask.Data at 0x1234567>
    
    See also:
    
       Provider class: :class:`plask.flow.ThermalConductivityProvider2D`
    
       Receciver class: :class:`plask.flow.ThermalConductivityReceiver2D`
    """

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

    def plot_gain_spectrum(*args, **kwargs):
        """
                Plot gain spectrum for specified junction.
        
                Args:
                    lams (array of floats): Wavelengths for which the spectrum should be plotted.
        
                    pos (float): Lateral position fo the point in which the spectrum is plotted.
        
                    junction (int): Junction number to take gain from.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_concentration(*args, **kwargs):
        """
                Plot carriers concentration at the active region.
        
                Args:
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_current(*args, **kwargs):
        """
                Plot current density at the active region.
        
                Args:
                    refine (int): Number of points in the plot between each two points
                                  in the computational mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_junction_gain(*args, **kwargs):
        """
                Plot gain at the active region.
        
                Args:
                    axis (mesh or sequence): Points along horizontal axis to plot gain at.
                                             Defaults to the optical mesh.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    label (str or sequence): Label for each junction. It can be a sequence of
                                             consecutive labels for each junction, or a string
                                             in which case the same label is used for each
                                             junction. If omitted automatic label is generated.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_determinant(*args, **kwargs):
        """
                Function plotting determinant of the optical solver.
        
                Args:
                    neffs (array): Array of effective indices to plot the determinant for.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field(*args, **kwargs):
        """
                Plot computed optical mode field at threshold.
        
                Args:
                    resolution (tuple of ints): Number of points in horizontal and vertical directions.
        
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field_horizontal(*args, **kwargs):
        """
                Plot horizontal distribution of the computed optical mode field at threshold.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    bounds (bool): If *True* then the geometry objects boundaries are
                                   plotted.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_optical_field_vertical(*args, **kwargs):
        """
                Plot vertical distribution of the computed optical mode field at threshold and
                refractive index profile.
        
                Args:
                    resolution (int): Number of points in horizontal direction.
        
                    pos (float): Horizontal position to get the field at.
        
                    offset (float): Distance above and below geometry boundary to include into
                                    the plot.
        
                    interpolation (str): Interpolation used when retrieving current density.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_temperature(*args, **kwargs):
        """
                Plot computed temperature to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification for
                        the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the plot function.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    def plot_vert_optical_determinant(*args, **kwargs):
        """
                Function plotting ‘vertical determinant’ of the optical solver.
        
                Args:
                    vneffs (array): Array of effective indices to plot the vertical
                                    determinant for.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_vertical_voltage(*args, **kwargs):
        """
                Plot computed voltage along the vertical axis.
        
                Args:
                    at (float): Horizontal position of the axis at which the voltage
                                is plotted.
        
                    **kwargs: Keyword arguments passed to the plot function.
        """

    def plot_voltage(*args, **kwargs):
        """
                Plot computed voltage to the current axes.
        
                Args:
                    geometry_color (str or ``None``): Matplotlib color specification
                        for the geometry. If ``None``, structure is not plotted.
        
                    mesh_color (str or ``None``): Matplotlib color specification for
                        the mesh. If ``None``, the mesh is not plotted.
        
                    geometry_alpha (float): Geometry opacity (1 — fully opaque, 0 – invisible).
        
                    mesh_alpha (float): Mesh opacity (1 — fully opaque, 0 – invisible).
        
                    **kwargs: Keyword arguments passed to the :func:`plask.plot_field`.
        
                See also:
                    :func:`plask.plot_field` : Plot any field obtained from receivers
        """

    quick = False
    def reconnect(*args, **kwargs):
        """
                Reconnect all internal solvers.
        
                This method should be called if some of the internal solvers were changed manually.
        """

    def save(*args, **kwargs):
        """
                Save the computation results to the HDF5 file.
        
                Args:
                    filename (str): The file name to save to.
                        If omitted, the file name is generated automatically based on
                        the script name with suffix denoting either the batch job id or
                        the current time if no batch system is used.
        
                    group (str): HDF5 group to save the data under.
        
                    optical_resolution (tuple of ints): Number of points in horizontal and vertical directions
                        for optical field.
        """

    skip_thermal = False
    def step(*args, **kwargs):
        """
                Function performing one step of the threshold search.
        
                Args:
                    volt (float): Voltage on a specified boundary condition [V].
        
                    save (bool): If `True` the computed fields are saved to the
                        HDF5 file after each computations step.
        
                Returns:
                    float: Loss of a specified mode
        """

    tfreq = 6.0
    thermal = meta.shockley.thermoelectric.attribute()
    
    vmax = None
    vmin = None
    vtol = 1e-05
    wavelength = None

_doc = builtins.module()

thermoelectric = builtins.module()

threshold = builtins.module()
