# PLaSK User Manual

#### Page Contents

- ThresholdSearchFourier2D Class
  - `ThresholdSearchFourier2D`
  - Methods
  - Attributes
    - Providers
    - Other
  - Descriptions
    - Method Details
      - `ThresholdSearchFourier2D.compute()`
      - `ThresholdSearchFourier2D.compute_thermoelectric()`
      - `ThresholdSearchFourier2D.get_gain_spectrum()`
      - `ThresholdSearchFourier2D.get_junction_concentrations()`
      - `ThresholdSearchFourier2D.get_junction_currents()`
      - `ThresholdSearchFourier2D.get_junction_gains()`
      - `ThresholdSearchFourier2D.get_lam()`
      - `ThresholdSearchFourier2D.get_nng()`
      - `ThresholdSearchFourier2D.get_optical_determinant()`
      - `ThresholdSearchFourier2D.get_optical_field()`
      - `ThresholdSearchFourier2D.get_optical_field_horizontal()`
      - `ThresholdSearchFourier2D.get_optical_field_vertical()`
      - `ThresholdSearchFourier2D.get_temperature()`
      - `ThresholdSearchFourier2D.get_total_current()`
      - `ThresholdSearchFourier2D.get_vertical_voltage()`
      - `ThresholdSearchFourier2D.get_voltage()`
      - `ThresholdSearchFourier2D.initialize()`
      - `ThresholdSearchFourier2D.invalidate()`
      - `ThresholdSearchFourier2D.plot_gain_spectrum()`
      - `ThresholdSearchFourier2D.plot_junction_concentration()`
      - `ThresholdSearchFourier2D.plot_junction_current()`
      - `ThresholdSearchFourier2D.plot_junction_gain()`
      - `ThresholdSearchFourier2D.plot_optical_determinant()`
      - `ThresholdSearchFourier2D.plot_optical_field()`
      - `ThresholdSearchFourier2D.plot_optical_field_horizontal()`
      - `ThresholdSearchFourier2D.plot_optical_field_vertical()`
      - `ThresholdSearchFourier2D.plot_temperature()`
      - `ThresholdSearchFourier2D.plot_vert_optical_determinant()`
      - `ThresholdSearchFourier2D.plot_vertical_voltage()`
      - `ThresholdSearchFourier2D.plot_voltage()`
      - `ThresholdSearchFourier2D.reconnect()`
      - `ThresholdSearchFourier2D.save()`
      - `ThresholdSearchFourier2D.step()`
    - Provider Details
      - `ThresholdSearchFourier2D.outCarriersConcentration`
      - `ThresholdSearchFourier2D.outConductivity`
      - `ThresholdSearchFourier2D.outCurrentDensity`
      - `ThresholdSearchFourier2D.outEpsilon`
      - `ThresholdSearchFourier2D.outGain`
      - `ThresholdSearchFourier2D.outHeat`
      - `ThresholdSearchFourier2D.outHeatFlux`
      - `ThresholdSearchFourier2D.outLightE`
      - `ThresholdSearchFourier2D.outLightMagnitude`
      - `ThresholdSearchFourier2D.outNeff`
      - `ThresholdSearchFourier2D.outTemperature`
      - `ThresholdSearchFourier2D.outThermalConductivity`
      - `ThresholdSearchFourier2D.outVoltage`
    - Attribute Details
      - `ThresholdSearchFourier2D.diffusion`
      - `ThresholdSearchFourier2D.dneff`
      - `ThresholdSearchFourier2D.electrical`
      - `ThresholdSearchFourier2D.gain`
      - `ThresholdSearchFourier2D.id`
      - `ThresholdSearchFourier2D.initialized`
      - `ThresholdSearchFourier2D.maxiter`
      - `ThresholdSearchFourier2D.mn`
      - `ThresholdSearchFourier2D.optical`
      - `ThresholdSearchFourier2D.optical_resolution`
      - `ThresholdSearchFourier2D.quick`
      - `ThresholdSearchFourier2D.skip_thermal`
      - `ThresholdSearchFourier2D.tfreq`
      - `ThresholdSearchFourier2D.thermal`
      - `ThresholdSearchFourier2D.vmax`
      - `ThresholdSearchFourier2D.vmin`
      - `ThresholdSearchFourier2D.vtol`
      - `ThresholdSearchFourier2D.wavelength`

# ThresholdSearchFourier2D Class

class meta.shockley.ThresholdSearchFourier2D(name='')

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

## Methods

`compute`([save, invalidate, group, stepsave]) | Execute the algorithm.
`compute_thermoelectric`() | Perform thermo-electric calculations.
`get_gain_spectrum`(lams[, pos, junction]) | Get gain spectrum for specified junction.
`get_junction_concentrations`([interpolation]) | Get carriers concentration at the active regions.
`get_junction_currents`([refine, interpolation]) | Get current densities at the active regions.
`get_junction_gains`([axis, interpolation]) | Get gain at the active regions.
`get_lam`() |
`get_nng`() | Get approximate effective index for optical computations.
`get_optical_determinant`(neff) | Function computing determinant of the optical solver.
`get_optical_field`([resolution]) | Get computed optical mode field at threshold.
`get_optical_field_horizontal`([resolution, ...]) | Get horizontal distribution of the computed optical mode field at threshold.
`get_optical_field_vertical`([pos, offset, ...]) | Plot vertical distribution of the computed optical mode field at threshold and refractive index profile.
`get_temperature`() | Get temperature on a thermal mesh.
`get_total_current`([nact]) | Get total current flowing through active region (mA)
`get_vertical_voltage`([at]) | Get computed voltage along the vertical axis.
`get_voltage`() | Get voltage on an electrical mesh.
`initialize`() | Initialize solver.
`invalidate`() | Set the solver back to uninitialized state.
`plot_gain_spectrum`(lams[, pos, junction, comp]) | Plot gain spectrum for specified junction.
`plot_junction_concentration`([bounds, ...]) | Plot carriers concentration at the active region.
`plot_junction_current`([refine, bounds, ...]) | Plot current density at the active region.
`plot_junction_gain`([axis, bounds, ...]) | Plot gain at the active region.
`plot_optical_determinant`(neffs, **kwargs) | Function plotting determinant of the optical solver.
`plot_optical_field`([resolution, ...]) | Plot computed optical mode field at threshold.
`plot_optical_field_horizontal`([resolution, ...]) | Plot horizontal distribution of the computed optical mode field at threshold.
`plot_optical_field_vertical`([pos, offset, ...]) | Plot vertical distribution of the computed optical mode field at threshold and refractive index profile.
`plot_temperature`([geometry_color, ...]) | Plot computed temperature to the current axes.
`plot_vert_optical_determinant`(vneffs, **kwargs) | Function plotting ‘vertical determinant’ of the optical solver.
`plot_vertical_voltage`([at]) | Plot computed voltage along the vertical axis.
`plot_voltage`([geometry_color, mesh_color, ...]) | Plot computed voltage to the current axes.
`reconnect`() | Reconnect all internal solvers.
`save`([filename, group, optical_resolution]) | Save the computation results to the HDF5 file.
`step`(volt[, save]) | Function performing one step of the threshold search.

## Attributes

### Providers

`outCarriersConcentration` | Provider of the computed carriers concentration [1/cm³].
`outConductivity` | Provider of the computed electrical conductivity [S/m].
`outCurrentDensity` | Provider of the computed current density [kA/cm²].
`outEpsilon` | Provider of the computed permittivity tensor (-).
`outGain` | Provider of the computed material gain [1/cm].
`outHeat` | Provider of the computed heat sources density [W/m³].
`outHeatFlux` | Provider of the computed heat flux [W/m²].
`outLightE` | Provider of the computed electric field [V/m].
`outLightMagnitude` | Provider of the computed optical field magnitude [W/m²].
`outNeff` | Provider of the computed effective index (-).
`outTemperature` | Provider of the computed temperature [K].
`outThermalConductivity` | Provider of the computed thermal conductivity [W/(m×K)].
`outVoltage` | Provider of the computed voltage [V].

### Other

`diffusion` | `electrical.diffusion.Diffusion2D` solver used for electrical calculations.
`dneff` | Effective index step.
`electrical` | `electrical.shockley.Shockley2D` solver used for electrical calculations.
`gain` | `gain.freecarrier.FreeCarrier2D` solver used for gain calculations.
`id` | Id of the solver object.
`initialized` | True if the solver has been initialized.
`maxiter` | Maximum number of root finding iterations.
`mn` | Lateral mode number $n$.
`optical` | `optical.modal.Fourier2D` solver used for optical calculations.
`optical_resolution` | Number of points along the horizontal and vertical axes for the saved and plotted optical field.
`quick` |
`skip_thermal` | Skip thermal computations.
`tfreq` | Number of electrical iterations per single thermal step.
`thermal` | `thermal.static.Static2D` solver used for thermal calculations.
`vmax` | Maximum voltage to search threshold for.
`vmin` | Minimum voltage to search threshold for.
`vtol` | Tolerance on voltage in the root search.
`wavelength` | Emission wavelength (nm).

## Descriptions

### Method Details

ThresholdSearchFourier2D.compute(save=True, invalidate=False, group='ThresholdSearch', stepsave=False)

  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.

  Parameters:

    - 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

ThresholdSearchFourier2D.compute_thermoelectric()

  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.

ThresholdSearchFourier2D.get_gain_spectrum(lams, pos=0.0, junction=0)

  Get gain spectrum for specified junction.

  Parameters:

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

  Returns:

    Gain spectrum.

  Return type:

    Data

ThresholdSearchFourier2D.get_junction_concentrations(interpolation='linear')

  Get carriers concentration at the active regions.

  Parameters:

    interpolation (str) – Interpolation used when retrieving current density.

  Returns:

    Dictionary of junction current density data.

      Keys are the junction number.

  Return type:

    dict

ThresholdSearchFourier2D.get_junction_currents(refine=16, interpolation='linear')

  Get current densities at the active regions.

  Parameters:

    - refine (int) – Number of points in the plot between each two points in the computational mesh.

    - interpolation (str) – Interpolation used when retrieving current density.

  Returns:

    Dictionary of junction current density data.

      Keys are the junction number.

  Return type:

    dict

ThresholdSearchFourier2D.get_junction_gains(axis=None, interpolation='linear')

  Get gain at the active regions.

  Parameters:

    axis – Points along horizontal axis to plot gain at. Defaults to the optical mesh.

  Returns:

    Dictionary of junction current density data.

      Keys are the junction number.

  Return type:

    dict

ThresholdSearchFourier2D.get_lam()

ThresholdSearchFourier2D.get_nng()

  Get approximate effective index for optical computations.

  This method returns approximate wavelength for optical computations. By default if browses the wavelength range starting from `maxneff`, decreasing it by `dneff` until lateral mode `mn` is found.

  You can override this method to use custom mode approximation.

  Example

      >>> solver = ThresholdSearchFourier2D()
      >>> solver.get_nng = lambda: 3.5
      >>> solver.compute()

ThresholdSearchFourier2D.get_optical_determinant(neff)

  Function computing determinant of the optical solver.

  Parameters:

    neff (float or array) – Effective index to compute the determinant for.

  Returns:

    Optical determinant.

  Return type:

    float or array

ThresholdSearchFourier2D.get_optical_field(resolution=None)

  Get computed optical mode field at threshold.

  Parameters:

    resolution (tuple of ints) – Number of points in horizontal and vertical directions.

ThresholdSearchFourier2D.get_optical_field_horizontal(resolution=None, interpolation='linear')

  Get horizontal distribution of the computed optical mode field at threshold.

  Parameters:

    - resolution (int) – Number of points in horizontal direction.

    - interpolation (str) – Interpolation used when retrieving current density.

ThresholdSearchFourier2D.get_optical_field_vertical(pos=0.01, offset=0.5, resolution=None, interpolation='linear')

  Plot vertical distribution of the computed optical mode field at threshold and refractive index profile.

  Parameters:

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

ThresholdSearchFourier2D.get_temperature()

  Get temperature on a thermal mesh.

ThresholdSearchFourier2D.get_total_current(nact=0)

  Get total current flowing through active region (mA)

ThresholdSearchFourier2D.get_vertical_voltage(at=0)

  Get computed voltage along the vertical axis.

  Parameters:

    at (float) – Horizontal position of the axis at which the voltage is plotted.

ThresholdSearchFourier2D.get_voltage()

  Get voltage on an electrical mesh.

ThresholdSearchFourier2D.initialize()

  Initialize solver.

  This method manually initialized the solver and sets `initialized` to True. Normally calling it is not necessary, as each solver automatically initializes itself when needed.

  Returns:

    solver `initialized` state prior to this method call.

  Return type:

    bool

ThresholdSearchFourier2D.invalidate()

  Set the solver back to uninitialized state.

  This method frees the memory allocated by the solver and sets `initialized` to False.

ThresholdSearchFourier2D.plot_gain_spectrum(lams, pos=0.0, junction=0, comp=None, **kwargs)

  Plot gain spectrum for specified junction.

  Parameters:

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

    - comp (int or str) – Spectrum component to plot

    - **kwargs – Keyword arguments passed to the plot function.

ThresholdSearchFourier2D.plot_junction_concentration(bounds=True, interpolation='linear', label=None, **kwargs)

  Plot carriers concentration at the active region.

  Parameters:

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

ThresholdSearchFourier2D.plot_junction_current(refine=16, bounds=True, interpolation='linear', label=None, **kwargs)

  Plot current density at the active region.

  Parameters:

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

ThresholdSearchFourier2D.plot_junction_gain(axis=None, bounds=True, interpolation='linear', label=None, **kwargs)

  Plot gain at the active region.

  Parameters:

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

ThresholdSearchFourier2D.plot_optical_determinant(neffs, **kwargs)

  Function plotting determinant of the optical solver.

  Parameters:

    - neffs (array) – Array of effective indices to plot the determinant for.

    - **kwargs – Keyword arguments passed to the plot function.

ThresholdSearchFourier2D.plot_optical_field(resolution=None, geometry_color='0.75', geometry_alpha=0.35, geometry_lw=1.0, **kwargs)

  Plot computed optical mode field at threshold.

  Parameters:

    - 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).

    - geometry_lw (float) – Line width for geometry.

    - **kwargs – Keyword arguments passed to the plot function.

ThresholdSearchFourier2D.plot_optical_field_horizontal(resolution=None, bounds=True, interpolation='linear', **kwargs)

  Plot horizontal distribution of the computed optical mode field at threshold.

  Parameters:

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

ThresholdSearchFourier2D.plot_optical_field_vertical(pos=0.01, offset=0.5, resolution=None, interpolation='linear', **kwargs)

  Plot vertical distribution of the computed optical mode field at threshold and refractive index profile.

  Parameters:

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

ThresholdSearchFourier2D.plot_temperature(geometry_color='0.75', mesh_color=None, geometry_alpha=0.35, mesh_alpha=0.15, geometry_lw=1.0, mesh_lw=1.0, **kwargs)

  Plot computed temperature to the current axes.

  Parameters:

    - 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).

    - geometry_lw (float) – Line width for geometry.

    - mesh_lw (float) – Line width for mesh.

    - **kwargs – Keyword arguments passed to the plot function.

  See also

  `plask.plot_field()` : Plot any field obtained from receivers

ThresholdSearchFourier2D.plot_vert_optical_determinant(vneffs, **kwargs)

  Function plotting ‘vertical determinant’ of the optical solver.

  Parameters:

    - vneffs (array) – Array of effective indices to plot the vertical determinant for.

    - **kwargs – Keyword arguments passed to the plot function.

ThresholdSearchFourier2D.plot_vertical_voltage(at=0.0, **kwargs)

  Plot computed voltage along the vertical axis.

  Parameters:

    - at (float) – Horizontal position of the axis at which the voltage is plotted.

    - **kwargs – Keyword arguments passed to the plot function.

ThresholdSearchFourier2D.plot_voltage(geometry_color='0.75', mesh_color=None, geometry_alpha=0.35, mesh_alpha=0.15, geometry_lw=1.0, mesh_lw=1.0, **kwargs)

  Plot computed voltage to the current axes.

  Parameters:

    - 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).

    - geometry_lw (float) – Line width for geometry.

    - mesh_lw (float) – Line width for mesh.

    - **kwargs – Keyword arguments passed to the `plask.plot_field()`.

  See also

  `plask.plot_field()` : Plot any field obtained from receivers

ThresholdSearchFourier2D.reconnect()

  Reconnect all internal solvers.

  This method should be called if some of the internal solvers were changed manually.

ThresholdSearchFourier2D.save(filename=None, group='ThresholdSearch', optical_resolution=None)

  Save the computation results to the HDF5 file.

  Parameters:

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

ThresholdSearchFourier2D.step(volt, save=False)

  Function performing one step of the threshold search.

  Parameters:

    - 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:

    Loss of a specified mode

  Return type:

    float

### Provider Details

ThresholdSearchFourier2D.outCarriersConcentration(n=0, mesh, interpolation='default') = <property object>

  Provider of the computed carriers concentration [1/cm³].

  Parameters:

    - type (str) – 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.

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.CarriersConcentrationProvider2D`

  Receciver class: `plask.flow.CarriersConcentrationReceiver2D`

ThresholdSearchFourier2D.outConductivity(mesh, interpolation='default') = <property object>

  Provider of the computed electrical conductivity [S/m].

  Parameters:

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.ConductivityProvider2D`

  Receciver class: `plask.flow.ConductivityReceiver2D`

ThresholdSearchFourier2D.outCurrentDensity(mesh, interpolation='default') = <property object>

  Provider of the computed current density [kA/cm²].

  Parameters:

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.CurrentDensityProvider2D`

  Receciver class: `plask.flow.CurrentDensityReceiver2D`

ThresholdSearchFourier2D.outEpsilon(mesh, interpolation='default') = <property object>

  Provider of the computed permittivity tensor (-).

  Parameters:

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    Data with the permittivity tensor on the specified mesh (-).

  Example

  Connect the provider to a receiver in some other solver:

      >>> other_solver.inEpsilon = solver.outEpsilon

  Obtain the provided field:

      >>> solver.outEpsilon(mesh)
      <plask.Data at 0x1234567>

  See also

  Provider class: `plask.flow.EpsilonProviderCyl`

  Receiver class: `plask.flow.EpsilonReceiverCyl`

ThresholdSearchFourier2D.outGain(n=0, mesh, lam, interpolation='default') = <property object>

  Provider of the computed material gain [1/cm].

  Parameters:

    - deriv (str) – Gain derivative to return. can be ‘’ (empty) or ‘conc’. In the latter case, the gain derivative over carriers concentration is returned.

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

    - lam (float) – The wavelength at which the gain is computed (nm).

  Returns:

    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, lam)
      <plask.Data at 0x1234567>

  Test the number of provided values:

      >>> len(solver.outGain)
      3

  See also

  Provider class: `plask.flow.GainProvider2D`

  Receciver class: `plask.flow.GainReceiver2D`

ThresholdSearchFourier2D.outHeat(mesh, interpolation='default') = <property object>

  Provider of the computed heat sources density [W/m³].

  Parameters:

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.HeatProvider2D`

  Receciver class: `plask.flow.HeatReceiver2D`

ThresholdSearchFourier2D.outHeatFlux(mesh, interpolation='default') = <property object>

  Provider of the computed heat flux [W/m²].

  Parameters:

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.HeatFluxProvider2D`

  Receciver class: `plask.flow.HeatFluxReceiver2D`

ThresholdSearchFourier2D.outLightE(n=0, mesh, interpolation='default') = <property object>

  Provider of the computed electric field [V/m].

  Parameters:

    - n (int) – Value number.

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.LightEProvider2D`

  Receiver class: `plask.flow.LightEReceiver2D`

ThresholdSearchFourier2D.outLightMagnitude(n=0, mesh, interpolation='default') = <property object>

  Provider of the computed optical field magnitude [W/m²].

  Parameters:

    - n (int) – Computed mode number.

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.LightMagnitudeProviderCyl`

  Receiver class: `plask.flow.LightMagnitudeReceiverCyl`

ThresholdSearchFourier2D.outNeff(n=0) = <property object>

  Provider of the computed effective index (-).

  Parameters:

    n (int) – Value number.

  Returns:

    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: `plask.flow.EffectiveIndexProvider`

  Receiver class: `plask.flow.EffectiveIndexReceiver`

ThresholdSearchFourier2D.outTemperature(mesh, interpolation='default') = <property object>

  Provider of the computed temperature [K].

  Parameters:

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.TemperatureProvider2D`

  Receciver class: `plask.flow.TemperatureReceiver2D`

ThresholdSearchFourier2D.outThermalConductivity(mesh, interpolation='default') = <property object>

  Provider of the computed thermal conductivity [W/(m×K)].

  Parameters:

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.ThermalConductivityProvider2D`

  Receciver class: `plask.flow.ThermalConductivityReceiver2D`

ThresholdSearchFourier2D.outVoltage(mesh, interpolation='default') = <property object>

  Provider of the computed voltage [V].

  Parameters:

    - mesh (mesh) – Target mesh to get the field at.

    - interpolation (str) – Requested interpolation method.

  Returns:

    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: `plask.flow.VoltageProvider2D`

  Receciver class: `plask.flow.VoltageReceiver2D`

### Attribute Details

ThresholdSearchFourier2D.diffusion = Diffusion2D()

  `electrical.diffusion.Diffusion2D` solver used for electrical calculations.

ThresholdSearchFourier2D.dneff = 0.02

  Effective index step.

  Step, by which the effective index is swept while searching for the approximate mode.

ThresholdSearchFourier2D.electrical = Shockley2D()

  `electrical.shockley.Shockley2D` solver used for electrical calculations.

ThresholdSearchFourier2D.gain = FreeCarrier2D()

  `gain.freecarrier.FreeCarrier2D` solver used for gain calculations.

ThresholdSearchFourier2D.id = <property object>

  Id of the solver object. (read only)

  Example

      >>> mysolver.id
      mysolver:category.type

ThresholdSearchFourier2D.initialized = <property object>

  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 `invalidate()` method.

ThresholdSearchFourier2D.maxiter = 50

  Maximum number of root finding iterations.

ThresholdSearchFourier2D.mn = 1

  Lateral mode number $n$.

ThresholdSearchFourier2D.optical = Fourier2D()

  `optical.modal.Fourier2D` solver used for optical calculations.

ThresholdSearchFourier2D.optical_resolution = (800, 600)

  Number of points along the horizontal and vertical axes for the saved and plotted optical field.

ThresholdSearchFourier2D.quick = False

ThresholdSearchFourier2D.skip_thermal = False

  Skip thermal computations.

  The structure is assumed to have a constant temperature. This can be used to look for the threshold under pulse laser operation.

ThresholdSearchFourier2D.tfreq = 6.0

  Number of electrical iterations per single thermal step.

  As temperature tends to converge faster, it is reasonable to repeat thermal solution less frequently.

ThresholdSearchFourier2D.thermal = Static2D()

  `thermal.static.Static2D` solver used for thermal calculations.

ThresholdSearchFourier2D.vmax = None

  Maximum voltage to search threshold for.

  It should be above the threshold.

ThresholdSearchFourier2D.vmin = None

  Minimum voltage to search threshold for.

  It should be below the threshold.

ThresholdSearchFourier2D.vtol = 1e-05

  Tolerance on voltage in the root search.

ThresholdSearchFourier2D.wavelength = None

  Emission wavelength (nm).