PLaSK library
|
Base class for all modal solvers. More...
#include <solvers/optical/modal/solver.hpp>
Public Member Functions | |
ModalSolver (const std::string &name="") | |
~ModalSolver () | |
double | getSmooth () const |
Get current smooth. | |
void | setSmooth (double value) |
Set current smooth. | |
Transfer::Method | getTransferMethod () const |
Get currently selected transfer method. | |
void | setTransferMethod (Transfer::Method method) |
Set new transfer method. | |
bool | getGroupLayers () const |
Getter for group_layers. | |
void | setGroupLayers (bool value) |
Setter for group_layers. | |
double | getMaxTempDiff () const |
Getter for max_temp_diff. | |
void | setMaxTempDiff (double value) |
Setter for max_temp_diff. | |
double | getTempDist () const |
Getter for temp_dist. | |
void | setTempDist (double value) |
Setter for temp_dist. | |
double | getTempLayer () const |
Getter for temp_dist. | |
void | setTempLayer (double value) |
Setter for temp_dist. | |
std::string | getId () const override |
Get solver id. | |
bool | initCalculation () override |
Init calculations. | |
size_t | getInterface () |
Get the position of the matching interface. | |
void | setInterfaceAt (double pos) |
Set the position of the matching interface. | |
void | setInterfaceOn (const shared_ptr< const GeometryObject > &object, const PathHints *path=nullptr) |
Set the position of the matching interface at the bottom of the provided geometry object. | |
void | setInterfaceOn (const shared_ptr< const GeometryObject > &object, const PathHints &path) |
Set the position of the matching interface at the bottom of the provided geometry object. | |
dcomplex | getDeterminant () |
Get discontinuity matrix determinant for the current parameters. | |
void | prepareExpansionIntegrals (Expansion *expansion, const shared_ptr< MeshD< BaseT::SpaceType::DIM > > &mesh, dcomplex lam, dcomplex glam) |
cvector | incidentVector (Transfer::IncidentDirection side, size_t idx, dcomplex lam=NAN) |
Get incident field vector for given mode. | |
cvector | incidentVector (Transfer::IncidentDirection side, const cvector &incident, dcomplex lam=NAN) |
Get incident field vector for given polarization. | |
Public Member Functions inherited from plask::optical::modal::ModalBase | |
void | initTransfer (Expansion &expansion, bool reflection) |
Initialize transfer class. | |
ModalBase () | |
virtual | ~ModalBase () |
double | getLam0 () const |
Get lam0. | |
void | setLam0 (double lam) |
Set lam0. | |
void | clearLam0 () |
Clear lam0. | |
dcomplex | getK0 () const |
Get current k0. | |
void | setK0 (dcomplex k) |
Set current k0. | |
dcomplex | getLam () const |
Get current wavelength. | |
void | setLam (dcomplex lambda) |
Set current wavelength. | |
void | clearFields () |
Reset determined fields. | |
size_t | getLayerFor (double &h) const |
Get layer number for vertical coordinate. | |
const std::vector< std::size_t > & | getStack () const |
Get stack. | |
virtual void | computeIntegrals ()=0 |
Recompute integrals used in RE and RH matrices. | |
virtual void | clearModes ()=0 |
Clear computed modes. | |
virtual bool | setExpansionDefaults (bool with_k0=true)=0 |
Set expansion parameters from default values. | |
void | ensureInterface () |
Throw exception if the interface position is unsuitable for eigenmode computations. | |
virtual Expansion & | getExpansion ()=0 |
Get solver expansion. | |
dvector | getIncidentFluxes (const cvector &incident, Transfer::IncidentDirection side) |
Get amplitudes of incident diffraction orders. | |
dvector | getReflectedFluxes (const cvector &incident, Transfer::IncidentDirection side) |
Get amplitudes of reflected diffraction orders. | |
dvector | getTransmittedFluxes (const cvector &incident, Transfer::IncidentDirection side) |
Get amplitudes of transmitted diffraction orders. | |
cvector | getReflectedCoefficients (const cvector &incident, Transfer::IncidentDirection side) |
Get coefficients of reflected diffraction orders. | |
cvector | getTransmittedCoefficients (const cvector &incident, Transfer::IncidentDirection side) |
Get coefficients of transmitted diffraction orders. | |
double | getReflection (const cvector &incident, Transfer::IncidentDirection side) |
Get reflection coefficient. | |
double | getTransmission (const cvector &incident, Transfer::IncidentDirection side) |
Get reflection coefficient. | |
void | getMatrices (size_t layer, cmatrix &RE, cmatrix &RH) |
Public Attributes | |
ReceiverFor< Temperature, typename BaseT::SpaceType > | inTemperature |
Receiver for the temperature. | |
ReceiverFor< Gain, typename BaseT::SpaceType > | inGain |
Receiver for the gain. | |
ReceiverFor< Epsilon, typename BaseT::SpaceType > | inEpsilon |
Receiver for the dynamic epsilon. | |
ReceiverFor< CarriersConcentration, typename BaseT::SpaceType > | inCarriersConcentration |
Receiver for carriers concentration. | |
ProviderFor< Epsilon, typenameBaseT::SpaceType >::Delegate | outEpsilon |
Provider of the permittivity tensor. | |
ProviderFor< RefractiveIndex, typenameBaseT::SpaceType >::Delegate | outRefractiveIndex |
Provider of the refractive index. | |
ProviderFor< ModeWavelength >::Delegate | outWavelength |
Provider for computed resonant wavelength. | |
ProviderFor< ModeLightMagnitude, typenameBaseT::SpaceType >::Delegate | outLightMagnitude |
Provider of the optical field intensity. | |
ProviderFor< ModeLightE, typenameBaseT::SpaceType >::Delegate | outLightE |
Provider of the optical electric field. | |
ProviderFor< ModeLightH, typenameBaseT::SpaceType >::Delegate | outLightH |
Provider of the optical magnetic field. | |
ProviderFor< ModeLightE, typenameBaseT::SpaceType >::Delegate | outUpwardsLightE |
Provider of the optical electric field propagating upwards. | |
ProviderFor< ModeLightH, typenameBaseT::SpaceType >::Delegate | outUpwardsLightH |
Provider of the optical magnetic field propagating upwards. | |
ProviderFor< ModeLightE, typenameBaseT::SpaceType >::Delegate | outDownwardsLightE |
Provider of the optical electric field propagating downwards. | |
ProviderFor< ModeLightH, typenameBaseT::SpaceType >::Delegate | outDownwardsLightH |
Provider of the optical magnetic field propagating downwards. | |
Public Attributes inherited from plask::optical::modal::ModalBase | |
Emission | emission |
Direction of the light emission for fields normalization. | |
Transfer::Determinant | determinant_type |
Method of computing determinant in zero search. | |
std::unique_ptr< Transfer > | transfer |
Transfer method object (AdmittanceTransfer or ReflectionTransfer) | |
shared_ptr< OrderedAxis > | vbounds |
Layer boundaries. | |
shared_ptr< OrderedAxis > | verts |
Centers of layers. | |
size_t | lcount |
Number of distinct layers. | |
std::vector< bool > | lgained |
Information if the layer has gain. | |
std::vector< bool > | lcomputed |
Information if the layer has data from inEpsilon. | |
std::vector< std::size_t > | stack |
Organization of layers in the stack. | |
std::ptrdiff_t | interface |
Index of the matching interface. | |
double | interface_position |
Approximate position of the matching interface. | |
double | lam0 |
Reference wavelength used for getting material parameters (nm) | |
dcomplex | k0 |
Normalized frequency (1/µm) | |
PML | vpml |
Parameters for vertical PMLs (if used) | |
RootDigger::Params | root |
Parameters for main rootdigger. | |
bool | recompute_integrals |
Force re-computation of material coefficients/integrals. | |
bool | recompute_gain_integrals |
Force re-computation of material coefficients/integrals in layers with gain. | |
bool | always_recompute_gain |
Always compute material coefficients/integrals for gained layers for current wavelength. | |
Protected Member Functions | |
void | onInitialize () override |
void | onGeometryChange (const Geometry::Event &evt) override |
void | parseCommonModalConfiguration (XMLReader &reader, Manager &manager) |
Parse common configuration from XML file. | |
void | setupLayers () |
Compute layer boundaries and detect layer sets. | |
size_t | initIncidence (Transfer::IncidentDirection side, dcomplex lam=NAN) |
void | scaleIncidentVector (cvector &incident, size_t layer) |
Scale the incident field vector with scale specific to the solver. | |
virtual size_t | nummodes () const =0 |
Return number of determined modes. | |
virtual double | applyMode (size_t n)=0 |
Apply mode number n. | |
DataVector< const Tensor3< dcomplex > > | getEpsilonProfile (const shared_ptr< const MeshD< BaseT::SpaceType::DIM > > &dst_mesh, dcomplex lam, InterpolationMethod interp=INTERPOLATION_DEFAULT) |
Get permittivity tensor after expansion. | |
LazyData< dcomplex > | getRefractiveIndex (RefractiveIndex::EnumType component, const shared_ptr< const MeshD< BaseT::SpaceType::DIM > > &dst_mesh, dcomplex lam, InterpolationMethod interp=INTERPOLATION_DEFAULT) |
Get refractive index after expansion. | |
template<PropagationDirection part = PROPAGATION_TOTAL> | |
LazyData< Vec< 3, dcomplex > > | getLightE (size_t num, shared_ptr< const MeshD< BaseT::SpaceType::DIM > > dst_mesh, InterpolationMethod method) |
Compute electric field. | |
template<PropagationDirection part = PROPAGATION_TOTAL> | |
LazyData< Vec< 3, dcomplex > > | getLightH (size_t num, shared_ptr< const MeshD< BaseT::SpaceType::DIM > > dst_mesh, InterpolationMethod method) |
Compute magnetic field. | |
LazyData< double > | getLightMagnitude (size_t num, shared_ptr< const MeshD< BaseT::SpaceType::DIM > > dst_mesh, InterpolationMethod method) |
Compute normalized electric field intensity 1/2 E conj(E) / P. | |
virtual double | getWavelength (size_t n)=0 |
Return mode wavelength. | |
void | scaleIncidentVector (cvector &incident, size_t layer) |
void | scaleIncidentVector (cvector &incident, size_t layer) |
void | scaleIncidentVector (cvector &incident, size_t layer) |
Protected Member Functions inherited from plask::optical::modal::ModalBase | |
std::unique_ptr< RootDigger > | getRootDigger (const RootDigger::function_type &func, const char *name) |
Create and return rootdigger of a desired type. | |
void | readRootDiggerConfig (XMLReader &reader) |
Read root digger configuration. | |
void | scaleIncidentVector (cvector &incident, size_t layer, double size_factor) |
Scale the incident field vector. | |
Protected Attributes | |
double | smooth |
Smoothing coefficient. | |
Protected Attributes inherited from plask::optical::modal::ModalBase | |
Transfer::Method | transfer_method |
Selected transfer method. | |
bool | group_layers |
Can layers be automatically grouped. | |
double | max_temp_diff |
Maximum temperature difference for grouped layers (NAN means ignore temperature) | |
double | temp_dist |
Approxximate lateral distance between points for temperature investigation. | |
double | temp_layer |
Minimum layer thickness for the purpose of temperature-based layers division. | |
Additional Inherited Members | |
Public Types inherited from plask::optical::modal::ModalBase | |
enum | Emission { EMISSION_UNSPECIFIED = 0 , EMISSION_TOP , EMISSION_BOTTOM , EMISSION_FRONT , EMISSION_BACK } |
Directions of the possible emission. More... | |
Base class for all modal solvers.
Definition at line 30 of file solver.hpp.
plask::optical::modal::ModalSolver< BaseT >::ModalSolver | ( | const std::string & | name = "" | ) |
Definition at line 59 of file solver.cpp.
plask::optical::modal::ModalSolver< BaseT >::~ModalSolver | ( | ) |
Definition at line 78 of file solver.cpp.
|
protectedpure virtual |
Apply mode number n.
Implemented in plask::optical::modal::BesselSolverCyl, plask::optical::modal::FourierSolver2D, and plask::optical::modal::FourierSolver3D.
|
inline |
Get discontinuity matrix determinant for the current parameters.
Definition at line 229 of file solver.hpp.
|
protected |
Get permittivity tensor after expansion.
dst_mesh | target mesh |
method | interpolation method |
Definition at line 495 of file solver.cpp.
|
inline |
Getter for group_layers.
Definition at line 142 of file solver.hpp.
|
inlineoverridevirtual |
Get solver id.
Implements plask::optical::modal::ModalBase.
Definition at line 181 of file solver.hpp.
|
inline |
Get the position of the matching interface.
Definition at line 189 of file solver.hpp.
|
protected |
Compute electric field.
num | mode number |
dst_mesh | destination mesh |
method | interpolation method |
Definition at line 724 of file solver.cpp.
|
protected |
Compute magnetic field.
num | mode number |
dst_mesh | destination mesh |
method | interpolation method |
Definition at line 734 of file solver.cpp.
|
protected |
Compute normalized electric field intensity 1/2 E conj(E) / P.
num | mode number |
dst_mesh | destination mesh |
method | interpolation method |
Definition at line 743 of file solver.cpp.
|
inline |
Getter for max_temp_diff.
Definition at line 152 of file solver.hpp.
|
protected |
Get refractive index after expansion.
dst_mesh | target mesh |
method | interpolation method |
Definition at line 525 of file solver.cpp.
|
inline |
Get current smooth.
Definition at line 123 of file solver.hpp.
|
inline |
Getter for temp_dist.
Definition at line 162 of file solver.hpp.
|
inline |
Getter for temp_dist.
Definition at line 172 of file solver.hpp.
|
inline |
Get currently selected transfer method.
Definition at line 133 of file solver.hpp.
|
protectedpure virtual |
Return mode wavelength.
n | mode number |
Implemented in plask::optical::modal::BesselSolverCyl, plask::optical::modal::FourierSolver2D, and plask::optical::modal::FourierSolver3D.
cvector plask::optical::modal::ModalSolver< BaseT >::incidentVector | ( | Transfer::IncidentDirection | side, |
const cvector & | incident, | ||
dcomplex | lam = NAN |
||
) |
Get incident field vector for given polarization.
side | incidence side |
unscaled | incident field vector |
lam | indicent wavelength |
Definition at line 588 of file solver.cpp.
cvector plask::optical::modal::ModalSolver< BaseT >::incidentVector | ( | Transfer::IncidentDirection | side, |
size_t | idx, | ||
dcomplex | lam = NAN |
||
) |
Get incident field vector for given mode.
side | incidence side |
idx | number of the mode to set to 1 |
lam | indicent wavelength |
Definition at line 577 of file solver.cpp.
|
inlineoverridevirtual |
Init calculations.
Implements plask::optical::modal::ModalBase.
Definition at line 183 of file solver.hpp.
|
protected |
Definition at line 554 of file solver.cpp.
|
protectedpure virtual |
Return number of determined modes.
Implemented in plask::optical::modal::BesselSolverCyl, plask::optical::modal::FourierSolver2D, and plask::optical::modal::FourierSolver3D.
|
inlineoverrideprotected |
Definition at line 50 of file solver.hpp.
|
inlineoverrideprotected |
Definition at line 48 of file solver.hpp.
|
protected |
Parse common configuration from XML file.
Definition at line 202 of file solver.cpp.
|
inline |
Definition at line 236 of file solver.hpp.
|
protected |
Definition at line 609 of file solver.cpp.
|
protected |
Definition at line 613 of file solver.cpp.
|
protected |
Definition at line 617 of file solver.cpp.
|
protected |
Scale the incident field vector with scale specific to the solver.
|
inline |
Setter for group_layers.
Definition at line 145 of file solver.hpp.
|
inline |
Set the position of the matching interface.
pos | vertical position close to the point where interface will be set |
Definition at line 198 of file solver.hpp.
|
inline |
Set the position of the matching interface at the bottom of the provided geometry object.
object | where the interface should be set on |
path | path specifying object in the geometry |
Definition at line 226 of file solver.hpp.
|
inline |
Set the position of the matching interface at the bottom of the provided geometry object.
object | where the interface should be set on |
path | path specifying object in the geometry |
Definition at line 211 of file solver.hpp.
|
inline |
Setter for max_temp_diff.
Definition at line 155 of file solver.hpp.
|
inline |
Set current smooth.
Definition at line 126 of file solver.hpp.
|
inline |
Setter for temp_dist.
Definition at line 165 of file solver.hpp.
|
inline |
Setter for temp_dist.
Definition at line 175 of file solver.hpp.
|
inline |
Set new transfer method.
Definition at line 136 of file solver.hpp.
|
protected |
Compute layer boundaries and detect layer sets.
Definition at line 253 of file solver.cpp.
ReceiverFor<CarriersConcentration, typename BaseT::SpaceType> plask::optical::modal::ModalSolver< BaseT >::inCarriersConcentration |
Receiver for carriers concentration.
Definition at line 86 of file solver.hpp.
ReceiverFor<Epsilon, typename BaseT::SpaceType> plask::optical::modal::ModalSolver< BaseT >::inEpsilon |
Receiver for the dynamic epsilon.
Definition at line 83 of file solver.hpp.
ReceiverFor<Gain, typename BaseT::SpaceType> plask::optical::modal::ModalSolver< BaseT >::inGain |
Receiver for the gain.
Definition at line 80 of file solver.hpp.
ReceiverFor<Temperature, typename BaseT::SpaceType> plask::optical::modal::ModalSolver< BaseT >::inTemperature |
Receiver for the temperature.
Definition at line 77 of file solver.hpp.
ProviderFor<ModeLightE,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outDownwardsLightE |
Provider of the optical electric field propagating downwards.
Definition at line 113 of file solver.hpp.
ProviderFor<ModeLightH,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outDownwardsLightH |
Provider of the optical magnetic field propagating downwards.
Definition at line 116 of file solver.hpp.
ProviderFor<Epsilon,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outEpsilon |
Provider of the permittivity tensor.
Definition at line 89 of file solver.hpp.
ProviderFor<ModeLightE,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outLightE |
Provider of the optical electric field.
Definition at line 101 of file solver.hpp.
ProviderFor<ModeLightH,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outLightH |
Provider of the optical magnetic field.
Definition at line 104 of file solver.hpp.
ProviderFor<ModeLightMagnitude,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outLightMagnitude |
Provider of the optical field intensity.
Definition at line 98 of file solver.hpp.
ProviderFor<RefractiveIndex,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outRefractiveIndex |
Provider of the refractive index.
Definition at line 92 of file solver.hpp.
ProviderFor<ModeLightE,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outUpwardsLightE |
Provider of the optical electric field propagating upwards.
Definition at line 107 of file solver.hpp.
ProviderFor<ModeLightH,typenameBaseT::SpaceType>::Delegate plask::optical::modal::ModalSolver< BaseT >::outUpwardsLightH |
Provider of the optical magnetic field propagating upwards.
Definition at line 110 of file solver.hpp.
ProviderFor<ModeWavelength>::Delegate plask::optical::modal::ModalSolver< BaseT >::outWavelength |
Provider for computed resonant wavelength.
Definition at line 95 of file solver.hpp.
|
protected |
Smoothing coefficient.
Definition at line 73 of file solver.hpp.