#coding: utf8
import plask


class EffectiveFrequencyCyl(plask.Solver):
    """
    EffectiveFrequencyCyl(name="")
    
    Calculate optical modes and optical field distribution using the effective
    frequency method in two-dimensional cylindrical space.
    """
    class Mode(object):
        """
        Detailed information about the mode.
        """
        gain_integral = None
        """
        Total gain for the mode [mW].
        """

        lam = None
        """
        Alias for :attr:`~optical.effective.EffectiveFrequencyCyl.Mode.wavelength`.
        """

        loss = None
        """
        Mode losses [1/cm].
        """

        m = None
        """
        LP_mn mode parameter describing angular dependence.
        """

        power = None
        """
        Total power emitted into the mode.
        """

        total_absorption = None
        """
        Cumulated absorption for the mode [mW].
        
        This property combines gain in active region and absorption in the whole
        structure.
        """

        wavelength = None
        """
        Mode wavelength [nm].
        """


    def clear_modes(self):
        """
        clear_modes(self)
        
            Clear all computed modes.
        """

    determinant_mode = None
    """
    Radial determinant mode.
    
    This parameter determines the method used to compute radial determinant.
    If it is set to 'transfer', 2x2 transfer matrix is used to ensure field
    continuity at the interfaces. For the 'full' value, one single matrix is
    constructed for all the interfaces and its determinant is returned.
    """

    emission = None
    """
    Emission direction.
    """

    def find_mode(self, lam, m=0):
        """
        find_mode(self, lam, m=0)
        
            Compute the mode near the specified wavelength.
            
            Args:
                lam (complex): Initial wavelength to for root finging algorithm.
                m (int): Angular mode number (O for LP0x, 1 for LP1x, etc.).
            
            Returns:
                integer: Index in the :attr:`modes` list of the found mode.
        """

    def find_modes(self, start=0, end=0, m=0, resteps=256, imsteps=64, eps=(1e-06+1e-09j)):
        """
        find_modes(self, start=0, end=0, m=0, resteps=256, imsteps=64, eps=(1e-06+1e-09j))
        
            Find the modes within the specified range using global method.
            
            Args:
                m (int): Angular mode number (O for LP0x, 1 for LP1x, etc.).
            
                start (complex): Start of the search range (0 means automatic).
                end (complex): End of the search range (0 means automatic).
                resteps (integer): Number of steps on the real axis during the search.
                imsteps (integer): Number of steps on the imaginary axis during the search.
                eps (complex): required precision of the search.
            
            Returns:
                list of integers: List of the indices in the :attr:`modes` list of the found
                modes.
        """

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

    def get_delta_neff(self, pos):
        """
        get_delta_neff(self, pos)
        
            Return effective index part for lateral propagation at specified radial
            position.
            
            Args:
                pos (float or array of floats): Radial position to get the effective index.
        """

    def get_determinant(self, lam, m=0):
        """
        get_determinant(self, lam, m=0)
        
            Get modal determinant.
            
            Args:
                lam (complex of numeric array of complex): wavelength to compute the
                                                           determinant at.
                m (int): Angular mode number (O for LP0x, 1 for LP1x, etc.).
        """

    def get_gain_integral(self, num=0):
        """
        get_gain_integral(self, num=0)
        
            Get total energy generated in the gain region to a mode in unit time.
            
            Args:
                num (int): number of the mode.
            
            Returns:
                Total generated energy [mW].
        """

    def get_nng(self, pos):
        """
        get_nng(self, pos)
        
            Return average index at specified radial position.
            
            Args:
                pos (float or array of floats): Radial position to get the effective index.
        """

    def get_total_absorption(self, num=0):
        """
        get_total_absorption(self, num=0)
        
            Get total energy absorbed from a mode in unit time.
            
            Args:
                num (int): number of the mode.
            
            Returns:
                Total absorbed energy [mW].
        """

    def get_vert_determinant(self, vlam):
        """
        get_vert_determinant(self, vlam)
        
            Get vertical modal determinant for debugging purposes.
            
            Args:
                vlam (complex of numeric array of complex): Vertical wavelength value
                to compute the determinant at.
            
            Returns:
                complex or list of complex: Determinant at the vertical wavelength *vlam* or
                an array matching its size.
        """

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

    inGain = None
    """
    Receiver of the material gain required for computations [1/cm].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.GainReceiverCyl`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inGain = other_solver.outGain
    
    See also:
    
       Receciver class: :class:`plask.flow.GainReceiverCyl`
    
       Provider class: :class:`plask.flow.GainProviderCyl`
    
       Data filter: :class:`plask.filter.GainFilterCyl`
    """

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

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

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

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

    k0 = None
    """
    Reference normalized frequency.
    """

    lam0 = None
    """
    Reference wavelength.
    """

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

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

    @property
    def modes():
        """
        List of the computed modes.
        
        .. rubric:: Item Attributes
        
        .. autosummary::
        
           ~optical.effective.EffectiveFrequencyCyl.Mode.m
           ~optical.effective.EffectiveFrequencyCyl.Mode.lam
           ~optical.effective.EffectiveFrequencyCyl.Mode.wavelength
           ~optical.effective.EffectiveFrequencyCyl.Mode.power
           ~optical.effective.EffectiveFrequencyCyl.Mode.total_absorption
           ~optical.effective.EffectiveFrequencyCyl.Mode.gain_integral
        :rtype: Mode
        """

    outElectricField = None
    """
    Alias for :attr:`outLightE`.
    """

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

    outLightE = None
    """
    Provider of the computed electric field [V/m].
    
    
    outLightE(n=0, mesh, interpolation='default')
    
    :param int n: Number of the mode found with :meth:`find_mode`.
    :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.inModeLightE = 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.ModeLightEProviderCyl`
    
       Receciver class: :class:`plask.flow.ModeLightEReceiverCyl`
    """

    outLightMagnitude = None
    """
    Provider of the computed optical field magnitude [W/m²].
    
    
    outLightMagnitude(n=0, mesh, interpolation='default')
    
    :param int n: Number of the mode found with :meth:`find_mode`.
    :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.inModeLightMagnitude = 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.ModeLightMagnitudeProviderCyl`
    
       Receciver class: :class:`plask.flow.ModeLightMagnitudeReceiverCyl`
    """

    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.inModeLoss = 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.ModeLossProvider`
    
       Receciver class: :class:`plask.flow.ModeLossReceiver`
    """

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

    outWavelength = None
    """
    Provider of the computed wavelength [nm].
    
    
    outWavelength(n=0)
    
    :param int n: Value 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.inModeWavelength = 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.ModeWavelengthProvider`
    
       Receciver class: :class:`plask.flow.ModeWavelengthReceiver`
    """

    @property
    def root():
        """
        Configuration of the root searching algorithm for horizontal component of the
        mode.
        
        .. rubric:: Attributes:
        
        .. autosummary::
        
           ~optical.effective.RootParams.alpha
           ~optical.effective.RootParams.lambd
           ~optical.effective.RootParams.initial_range
           ~optical.effective.RootParams.maxiter
           ~optical.effective.RootParams.maxstep
           ~optical.effective.RootParams.method
           ~optical.effective.RootParams.tolf_max
           ~optical.effective.RootParams.tolf_min
           ~optical.effective.RootParams.tolx
        
           ~optical.effective.RootParams.stairs
        
        :rtype: RootParams
        """

    def set_mode(*args, **kwargs):
        """
        set_mode(self, lam, m=0)
        set_mode(self, lam, loss, m=0)
        
            Set the current mode the specified wavelength.
            
            Args:
                lam (float of complex): Mode wavelength.
                loss (float): Mode losses. Allowed only if *lam* is a float.
                m (int): Angular mode number (O for LP0x, 1 for LP1x, etc.).
        """

    def set_simple_mesh(self):
        """
        set_simple_mesh(self)
        
            Set simple mesh based on the geometry objects bounding boxes.
        """

    @property
    def stripe_root():
        """
        Configuration of the root searching algorithm for vertical component of the mode
        in a single stripe.
        
        .. rubric:: Attributes:
        
        .. autosummary::
        
           ~optical.effective.RootParams.alpha
           ~optical.effective.RootParams.lambd
           ~optical.effective.RootParams.initial_range
           ~optical.effective.RootParams.maxiter
           ~optical.effective.RootParams.maxstep
           ~optical.effective.RootParams.method
           ~optical.effective.RootParams.tolf_max
           ~optical.effective.RootParams.tolf_min
           ~optical.effective.RootParams.tolx
        
           ~optical.effective.RootParams.stairs
        
        :rtype: RootParams
        """

    vat = None
    """
    Radial position of at which the vertical part of the field is calculated.
    
    Should be a float number or ``None`` to compute effective frequencies for all
    the stripes.
    """

    vlam = None
    """
    'Vertical wavelength' used as a helper for searching vertical modes.
    """



class EffectiveIndex2D(plask.Solver):
    """
    EffectiveIndex2D(name="")
    
    Calculate optical modes and optical field distribution using the effective index
    method in two-dimensional Cartesian space.
    """
    class Mode(object):
        """
        Detailed information about the mode.
        """
        loss = None
        """
        Mode losses [1/cm].
        """

        neff = None
        """
        Mode effective index.
        """

        power = None
        """
        Total power emitted into the mode [mW].
        """

        symmetry = None
        """
        Mode symmetry ('positive', 'negative', or None).
        """

        total_absorption = None
        """
        Cumulated absorption for the mode [mW].
        
        This property combines gain in active region and absorption in the whole
        structure.
        """


    def clear_modes(self):
        """
        clear_modes(self)
        
            Clear all computed modes.
        """

    emission = None
    """
    Emission direction.
    """

    def find_mode(self, neff, symmetry=None):
        """
        find_mode(self, neff, symmetry=None)
        
            Compute the mode near the specified effective index.
            
            Args:
                neff (complex): Starting point of the root search.
                symmetry ('+' or '-'): Symmetry of the mode to search. If this parameter
                                       is not specified, the default symmetry is used:
                                       positive mode symmetry fir symmetrical geometries
                                       and no symmetry for asymmetrical geometries.
            
            Returns:
                integer: Index in the :attr:`modes` list of the found mode.
        """

    def find_modes(self, start=0, end=0, symmetry=None, resteps=256, imsteps=64, eps=(1e-06+1e-09j)):
        """
        find_modes(self, start=0, end=0, symmetry=None, resteps=256, imsteps=64, eps=(1e-06+1e-09j))
        
            Find the modes within the specified range using global method.
            
            Args:
                start (complex): Start of the search range (0 means automatic).
                end (complex): End of the search range (0 means automatic).
                resteps (integer): Number of steps on the real axis during the search.
                imsteps (integer): Number of steps on the imaginary axis during the search.
                eps (complex): required precision of the search.
            
            Returns:
                list of integers: List of the indices in the :attr:`modes` list of the found
                modes.
        """

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

    def get_delta_neff(self, pos):
        """
        get_delta_neff(self, pos)
        
            Return effective index part for lateral propagation at specified horizontal
            position.
            
            Args:
                pos (float or array of floats): Horizontal position to get the effective
                                                index.
        """

    def get_determinant(self, neff):
        """
        get_determinant(self, neff)
        
            Get modal determinant.
            
            Args:
                neff (complex or array of complex): effective index value
                to compute the determinant at.
            
            Returns:
                complex or list of complex: Determinant at the effective index *neff* or
                an array matching its size.
        """

    def get_total_absorption(self, num=0):
        """
        get_total_absorption(self, num=0)
        
            Get total energy absorbed by from a mode in unit time.
            
            Args:
                num (int): number of the mode.
            
            Returns:
                Total absorbed energy [mW].
        """

    def get_vert_determinant(self, neff):
        """
        get_vert_determinant(self, neff)
        
            Get vertical modal determinant for debugging purposes.
            
            Args:
                neff (complex of numeric array of complex): Vertical effective index value
                to compute the determinant at.
            
            Returns:
                complex or list of complex: Determinant at the vertical effective index
                *neff* or an array matching its size.
        """

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

    inGain = None
    """
    Receiver of the material gain required for computations [1/cm].
    
    
    You will find usage details in the documentation of the receiver class
    :class:`~plask.flow.GainReceiver2D`.
    
    Example:
       Connect the reveiver to a provider from some other solver:
    
       >>> solver.inGain = other_solver.outGain
    
    See also:
    
       Receciver class: :class:`plask.flow.GainReceiver2D`
    
       Provider class: :class:`plask.flow.GainProvider2D`
    
       Data filter: :class:`plask.filter.GainFilter2D`
    """

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

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

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

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

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

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

    mirrors = None
    """
    Mirror reflectivities. If None then they are automatically estimated from theFresnel equations.
    """

    @property
    def modes():
        """
        List of the computed modes.
        
        .. rubric:: Item Attributes
        
        .. autosummary::
        
           ~optical.effective.EffectiveIndex2D.Mode.neff
           ~optical.effective.EffectiveIndex2D.Mode.symmetry
           ~optical.effective.EffectiveIndex2D.Mode.power
           ~optical.effective.EffectiveIndex2D.Mode.total_absorption
        :rtype: Mode
        """

    outElectricField = None
    """
    Alias for :attr:`outLightE`.
    """

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

    outLightE = None
    """
    Provider of the computed electric field [V/m].
    
    
    outLightE(n=0, mesh, interpolation='default')
    
    :param int n: Number of the mode found with :meth:`find_mode`.
    :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.inModeLightE = 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.ModeLightEProvider2D`
    
       Receciver class: :class:`plask.flow.ModeLightEReceiver2D`
    """

    outLightMagnitude = None
    """
    Provider of the computed optical field magnitude [W/m²].
    
    
    outLightMagnitude(n=0, mesh, interpolation='default')
    
    :param int n: Number of the mode found with :meth:`find_mode`.
    :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.inModeLightMagnitude = 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.ModeLightMagnitudeProvider2D`
    
       Receciver class: :class:`plask.flow.ModeLightMagnitudeReceiver2D`
    """

    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.inModeEffectiveIndex = 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.ModeEffectiveIndexProvider`
    
       Receciver class: :class:`plask.flow.ModeEffectiveIndexReceiver`
    """

    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.RefractiveIndexProvider2D`
    
       Receciver class: :class:`plask.flow.RefractiveIndexReceiver2D`
    """

    polarization = None
    """
    Polarization of the searched modes.
    """

    @property
    def root():
        """
        Configuration of the root searching algorithm for horizontal component of the
        mode.
        
        .. rubric:: Attributes:
        
        .. autosummary::
        
           ~optical.effective.RootParams.alpha
           ~optical.effective.RootParams.lambd
           ~optical.effective.RootParams.initial_range
           ~optical.effective.RootParams.maxiter
           ~optical.effective.RootParams.maxstep
           ~optical.effective.RootParams.method
           ~optical.effective.RootParams.tolf_max
           ~optical.effective.RootParams.tolf_min
           ~optical.effective.RootParams.tolx
        
           ~optical.effective.RootParams.stairs
        
        :rtype: RootParams
        """

    def search_vneff(self, start=0, end=0, resteps=256, imsteps=64, eps=(1e-06+1e-09j)):
        """
        search_vneff(self, start=0, end=0, resteps=256, imsteps=64, eps=(1e-06+1e-09j))
        
            Find the effective indices in the vertical direction within the specified range
            using global method.
            
            Args:
                start (complex): Start of the search range (0 means automatic).
                end (complex): End of the search range (0 means automatic).
                resteps (integer): Number of steps on the real axis during the search.
                imsteps (integer): Number of steps on the imaginary axis during the search.
                eps (complex): required precision of the search.
            
            Returns:
                list of floats: List of the found effective indices in the vertical
                direction.
        """

    def set_mode(self, arg2, symmetry=None):
        """
        set_mode(self, arg2, symmetry=None)
        
            Set the current mode the specified effective index.
            
            Args:
                neff (complex): Mode effective index.
                symmetry ('+' or '-'): Symmetry of the mode to search.
        """

    def set_simple_mesh(self):
        """
        set_simple_mesh(self)
        
            Set simple mesh based on the geometry objects bounding boxes.
        """

    @property
    def stripe_root():
        """
        Configuration of the root searching algorithm for vertical component of the mode
        in a single stripe.
        
        .. rubric:: Attributes:
        
        .. autosummary::
        
           ~optical.effective.RootParams.alpha
           ~optical.effective.RootParams.lambd
           ~optical.effective.RootParams.initial_range
           ~optical.effective.RootParams.maxiter
           ~optical.effective.RootParams.maxstep
           ~optical.effective.RootParams.method
           ~optical.effective.RootParams.tolf_max
           ~optical.effective.RootParams.tolf_min
           ~optical.effective.RootParams.tolx
        
           ~optical.effective.RootParams.stairs
        
        :rtype: RootParams
        """

    vat = None
    """
    Horizontal position of the main stripe (with dominant mode).
    """

    vneff = None
    """
    Effective index in the vertical direction.
    """

    wavelength = None
    """
    Current wavelength.
    """



class RootParams(object):
    """
    Configuration of the root finding algorithm.
    """
    alpha = None
    """
    Parameter ensuring sufficient decrease of determinant in each step
    (Broyden method only).
    """

    initial_range = None
    """
    Initial range size (Muller and Brent methods only).
    """

    lambd = None
    """
    Minimum decrease ratio of one step (Broyden method only).
    """

    maxiter = None
    """
    Maximum number of iterations.
    """

    maxstep = None
    """
    Maximum step in one iteration (Broyden method only).
    """

    method = None
    """
    Root finding method ('muller', 'broyden', or 'brent')
    """

    stairs = None
    """
    Number of staircase iterations (Brent method only).
    """

    tolf_max = None
    """
    Required tolerance on the function value.
    """

    tolf_min = None
    """
    Sufficient tolerance on the function value.
    """

    tolx = None
    """
    Absolute tolerance on the argument.
    """

