PLaSK library
Loading...
Searching...
No Matches
plask::optical::modal::ModalBase Struct Referenceabstract

Common base with layer details independent on the geometry. More...

#include <solvers/optical/modal/solverbase.hpp>

Inheritance diagram for plask::optical::modal::ModalBase:
[legend]
Collaboration diagram for plask::optical::modal::ModalBase:
[legend]

Public Types

enum  Emission {
  EMISSION_UNSPECIFIED = 0 , EMISSION_TOP , EMISSION_BOTTOM , EMISSION_FRONT ,
  EMISSION_BACK
}
 Directions of the possible emission. More...
 

Public Member Functions

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.
 
virtual std::string getId () const =0
 Get solver id.
 
virtual bool initCalculation ()=0
 Init calculations.
 
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 ExpansiongetExpansion ()=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

Emission emission
 Direction of the light emission for fields normalization.
 
Transfer::Determinant determinant_type
 Method of computing determinant in zero search.
 
std::unique_ptr< Transfertransfer
 Transfer method object (AdmittanceTransfer or ReflectionTransfer)
 
shared_ptr< OrderedAxisvbounds
 Layer boundaries.
 
shared_ptr< OrderedAxisverts
 Centers of layers.
 
size_t lcount
 Number of distinct layers.
 
std::vector< boollgained
 Information if the layer has gain.
 
std::vector< boollcomputed
 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

std::unique_ptr< RootDiggergetRootDigger (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

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
 Approximate lateral distance between points for temperature investigation.
 
double temp_layer
 Minimum layer thickness for the purpose of temperature-based layers division.
 

Detailed Description

Common base with layer details independent on the geometry.

Definition at line 38 of file solverbase.hpp.

Member Enumeration Documentation

◆ Emission

Directions of the possible emission.

Enumerator
EMISSION_UNSPECIFIED 

Side emission (fields not normalized)

EMISSION_TOP 

Top emission.

EMISSION_BOTTOM 

Bottom emission.

EMISSION_FRONT 

Front emission.

EMISSION_BACK 

Back emission.

Definition at line 40 of file solverbase.hpp.

Constructor & Destructor Documentation

◆ ModalBase()

plask::optical::modal::ModalBase::ModalBase ( )
inline

Definition at line 151 of file solverbase.hpp.

◆ ~ModalBase()

virtual plask::optical::modal::ModalBase::~ModalBase ( )
inlinevirtual

Definition at line 167 of file solverbase.hpp.

Member Function Documentation

◆ clearFields()

void plask::optical::modal::ModalBase::clearFields ( )
inline

Reset determined fields.

Definition at line 195 of file solverbase.hpp.

◆ clearLam0()

void plask::optical::modal::ModalBase::clearLam0 ( )
inline

Clear lam0.

Definition at line 177 of file solverbase.hpp.

◆ clearModes()

virtual void plask::optical::modal::ModalBase::clearModes ( )
pure virtual

◆ computeIntegrals()

virtual void plask::optical::modal::ModalBase::computeIntegrals ( )
pure virtual

◆ ensureInterface()

void plask::optical::modal::ModalBase::ensureInterface ( )
inline

Throw exception if the interface position is unsuitable for eigenmode computations.

Definition at line 237 of file solverbase.hpp.

◆ getExpansion()

virtual Expansion & plask::optical::modal::ModalBase::getExpansion ( )
pure virtual

◆ getId()

◆ getIncidentFluxes()

dvector plask::optical::modal::ModalBase::getIncidentFluxes ( const cvector incident,
Transfer::IncidentDirection  side 
)

Get amplitudes of incident diffraction orders.

Parameters
incidentincident field vector
sideincidence side

Definition at line 633 of file solver.cpp.

◆ getK0()

dcomplex plask::optical::modal::ModalBase::getK0 ( ) const
inline

Get current k0.

Definition at line 180 of file solverbase.hpp.

◆ getLam()

dcomplex plask::optical::modal::ModalBase::getLam ( ) const
inline

Get current wavelength.

Definition at line 189 of file solverbase.hpp.

◆ getLam0()

double plask::optical::modal::ModalBase::getLam0 ( ) const
inline

Get lam0.

Definition at line 170 of file solverbase.hpp.

◆ getLayerFor()

size_t plask::optical::modal::ModalBase::getLayerFor ( double h) const
inline

Get layer number for vertical coordinate.

Alter this coordinate to the layer local one. The bottom infinite layer has always negative coordinate.

Parameters
[in,out]hvertical coordinate
Returns
layer number (in the stack)

Definition at line 205 of file solverbase.hpp.

◆ getMatrices()

void plask::optical::modal::ModalBase::getMatrices ( size_t  layer,
cmatrix RE,
cmatrix RH 
)

Definition at line 556 of file solver.cpp.

◆ getReflectedCoefficients()

cvector plask::optical::modal::ModalBase::getReflectedCoefficients ( const cvector incident,
Transfer::IncidentDirection  side 
)

Get coefficients of reflected diffraction orders.

Parameters
incidentincident field vector
sideincidence side

Definition at line 720 of file solver.cpp.

◆ getReflectedFluxes()

dvector plask::optical::modal::ModalBase::getReflectedFluxes ( const cvector incident,
Transfer::IncidentDirection  side 
)

Get amplitudes of reflected diffraction orders.

Parameters
incidentincident field vector
sideincidence side

Definition at line 661 of file solver.cpp.

◆ getReflection()

double plask::optical::modal::ModalBase::getReflection ( const cvector incident,
Transfer::IncidentDirection  side 
)
inline

Get reflection coefficient.

Parameters
incidentincident field vector
sideincidence side

Definition at line 286 of file solverbase.hpp.

◆ getRootDigger()

std::unique_ptr< RootDigger > plask::optical::modal::ModalBase::getRootDigger ( const RootDigger::function_type func,
const char name 
)
protected

Create and return rootdigger of a desired type.

Definition at line 84 of file solver.cpp.

◆ getStack()

const std::vector< std::size_t > & plask::optical::modal::ModalBase::getStack ( ) const
inline

Get stack.

Returns
layers stack

Definition at line 222 of file solverbase.hpp.

◆ getTransmission()

double plask::optical::modal::ModalBase::getTransmission ( const cvector incident,
Transfer::IncidentDirection  side 
)
inline

Get reflection coefficient.

Parameters
incidentincident field vector
sideincidence side

Definition at line 297 of file solverbase.hpp.

◆ getTransmittedCoefficients()

cvector plask::optical::modal::ModalBase::getTransmittedCoefficients ( const cvector incident,
Transfer::IncidentDirection  side 
)

Get coefficients of transmitted diffraction orders.

Parameters
incidentincident field vector
sideincidence side

Definition at line 727 of file solver.cpp.

◆ getTransmittedFluxes()

dvector plask::optical::modal::ModalBase::getTransmittedFluxes ( const cvector incident,
Transfer::IncidentDirection  side 
)

Get amplitudes of transmitted diffraction orders.

Parameters
incidentincident field vector
sideincidence side

Definition at line 689 of file solver.cpp.

◆ initCalculation()

◆ initTransfer()

void plask::optical::modal::ModalBase::initTransfer ( Expansion expansion,
bool  reflection 
)

Initialize transfer class.

Definition at line 28 of file solver.cpp.

◆ readRootDiggerConfig()

void plask::optical::modal::ModalBase::readRootDiggerConfig ( XMLReader reader)
inlineprotected

Read root digger configuration.

Parameters
readerXML reader

Definition at line 65 of file solverbase.hpp.

◆ scaleIncidentVector()

void plask::optical::modal::ModalBase::scaleIncidentVector ( cvector incident,
size_t  layer,
double  size_factor 
)
protected

Scale the incident field vector.

Definition at line 608 of file solver.cpp.

◆ setExpansionDefaults()

virtual bool plask::optical::modal::ModalBase::setExpansionDefaults ( bool  with_k0 = true)
pure virtual

Set expansion parameters from default values.

Parameters
with_k0Change k0
Returns
true if anything was changed

Implemented in plask::optical::modal::BesselSolverCyl, plask::optical::modal::FourierSolver2D, and plask::optical::modal::FourierSolver3D.

◆ setK0()

void plask::optical::modal::ModalBase::setK0 ( dcomplex  k)
inline

Set current k0.

Definition at line 183 of file solverbase.hpp.

◆ setLam()

void plask::optical::modal::ModalBase::setLam ( dcomplex  lambda)
inline

Set current wavelength.

Definition at line 192 of file solverbase.hpp.

◆ setLam0()

void plask::optical::modal::ModalBase::setLam0 ( double  lam)
inline

Set lam0.

Definition at line 172 of file solverbase.hpp.

Member Data Documentation

◆ always_recompute_gain

bool plask::optical::modal::ModalBase::always_recompute_gain

Always compute material coefficients/integrals for gained layers for current wavelength.

Definition at line 132 of file solverbase.hpp.

◆ determinant_type

Transfer::Determinant plask::optical::modal::ModalBase::determinant_type

Method of computing determinant in zero search.

Definition at line 52 of file solverbase.hpp.

◆ emission

Emission plask::optical::modal::ModalBase::emission

Direction of the light emission for fields normalization.

Definition at line 49 of file solverbase.hpp.

◆ group_layers

bool plask::optical::modal::ModalBase::group_layers
protected

Can layers be automatically grouped.

Definition at line 136 of file solverbase.hpp.

◆ interface

std::ptrdiff_t plask::optical::modal::ModalBase::interface

Index of the matching interface.

Definition at line 108 of file solverbase.hpp.

◆ interface_position

double plask::optical::modal::ModalBase::interface_position

Approximate position of the matching interface.

Definition at line 111 of file solverbase.hpp.

◆ k0

dcomplex plask::optical::modal::ModalBase::k0

Normalized frequency (1/µm)

Definition at line 117 of file solverbase.hpp.

◆ lam0

double plask::optical::modal::ModalBase::lam0

Reference wavelength used for getting material parameters (nm)

Definition at line 114 of file solverbase.hpp.

◆ lcomputed

std::vector<bool> plask::optical::modal::ModalBase::lcomputed

Information if the layer has data from inEpsilon.

Definition at line 102 of file solverbase.hpp.

◆ lcount

size_t plask::optical::modal::ModalBase::lcount

Number of distinct layers.

Definition at line 96 of file solverbase.hpp.

◆ lgained

std::vector<bool> plask::optical::modal::ModalBase::lgained

Information if the layer has gain.

Definition at line 99 of file solverbase.hpp.

◆ max_temp_diff

double plask::optical::modal::ModalBase::max_temp_diff
protected

Maximum temperature difference for grouped layers (NAN means ignore temperature)

Definition at line 139 of file solverbase.hpp.

◆ recompute_gain_integrals

bool plask::optical::modal::ModalBase::recompute_gain_integrals

Force re-computation of material coefficients/integrals in layers with gain.

Definition at line 129 of file solverbase.hpp.

◆ recompute_integrals

bool plask::optical::modal::ModalBase::recompute_integrals

Force re-computation of material coefficients/integrals.

Definition at line 126 of file solverbase.hpp.

◆ root

RootDigger::Params plask::optical::modal::ModalBase::root

Parameters for main rootdigger.

Definition at line 123 of file solverbase.hpp.

◆ stack

std::vector<std::size_t> plask::optical::modal::ModalBase::stack

Organization of layers in the stack.

Definition at line 105 of file solverbase.hpp.

◆ temp_dist

double plask::optical::modal::ModalBase::temp_dist
protected

Approximate lateral distance between points for temperature investigation.

Definition at line 142 of file solverbase.hpp.

◆ temp_layer

double plask::optical::modal::ModalBase::temp_layer
protected

Minimum layer thickness for the purpose of temperature-based layers division.

Definition at line 145 of file solverbase.hpp.

◆ transfer

std::unique_ptr<Transfer> plask::optical::modal::ModalBase::transfer

Transfer method object (AdmittanceTransfer or ReflectionTransfer)

Definition at line 84 of file solverbase.hpp.

◆ transfer_method

Transfer::Method plask::optical::modal::ModalBase::transfer_method
protected

Selected transfer method.

Definition at line 59 of file solverbase.hpp.

◆ vbounds

shared_ptr<OrderedAxis> plask::optical::modal::ModalBase::vbounds

Layer boundaries.

Definition at line 90 of file solverbase.hpp.

◆ verts

shared_ptr<OrderedAxis> plask::optical::modal::ModalBase::verts

Centers of layers.

Definition at line 93 of file solverbase.hpp.

◆ vpml

PML plask::optical::modal::ModalBase::vpml

Parameters for vertical PMLs (if used)

Definition at line 120 of file solverbase.hpp.


The documentation for this struct was generated from the following files: