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

Base class for Admittance and Reflection transfers. More...

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

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

Public Types

enum  IncidentDirection { INCIDENCE_TOP , INCIDENCE_BOTTOM }
 Direction specification for reflection calculations. More...
 
enum  Determined { DETERMINED_NOTHING = 0 , DETERMINED_RESONANT , DETERMINED_REFLECTED }
 Indicates what has been determined. More...
 
enum  Method {
  METHOD_AUTO , METHOD_REFLECTION_ADMITTANCE , METHOD_REFLECTION_IMPEDANCE , METHOD_ADMITTANCE ,
  METHOD_IMPEDANCE
}
 Available transfer types. More...
 
enum  Determinant { DETERMINANT_EIGENVALUE , DETERMINANT_FULL }
 Method of computing determinant in zero search. More...
 

Public Member Functions

void initDiagonalization ()
 Init diagonalization.
 
 Transfer (ModalBase *solver, Expansion &expansion)
 Create transfer object and initialize memory.
 
virtual ~Transfer ()
 
dcomplex determinant ()
 Compute discontinuity matrix determinant for the current parameters.
 
virtual cvector getReflectionVector (const cvector &incident, IncidentDirection side)=0
 Get vector of reflection coefficients.
 
virtual cvector getTransmissionVector (const cvector &incident, IncidentDirection side)=0
 Get vector of transmission coefficients.
 
LazyData< Vec< 3, dcomplex > > getFieldE (double power, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method, PropagationDirection part=PROPAGATION_TOTAL)
 Get electric field at the given mesh for resonant mode.
 
LazyData< Vec< 3, dcomplex > > getFieldH (double power, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method, PropagationDirection part=PROPAGATION_TOTAL)
 Get magnetic field at the given mesh for resonant mode.
 
LazyData< doublegetFieldMagnitude (double power, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method)
 Get light magnitude for resonant mode.
 
LazyData< Vec< 3, dcomplex > > getScatteredFieldE (const cvector &incident, IncidentDirection side, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method, PropagationDirection part=PROPAGATION_TOTAL)
 Get electric field at the given mesh for reflected light.
 
LazyData< Vec< 3, dcomplex > > getScatteredFieldH (const cvector &incident, IncidentDirection side, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method, PropagationDirection part=PROPAGATION_TOTAL)
 Get magnetic field at the given mesh for reflected light.
 
LazyData< doublegetScatteredFieldMagnitude (const cvector &incident, IncidentDirection side, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method)
 Get light magnitude for reflected light.
 
cvector getFieldVectorE (double z, PropagationDirection part=PROPAGATION_TOTAL)
 Compute electric field coefficients for given z.
 
cvector getFieldVectorH (double z, PropagationDirection part=PROPAGATION_TOTAL)
 Compute magnetic field coefficients for given z.
 
cvector getScatteredFieldVectorE (const cvector &incident, IncidentDirection side, double z, PropagationDirection part=PROPAGATION_TOTAL)
 Compute electric field coefficients for given z.
 
cvector getScatteredFieldVectorH (const cvector &incident, IncidentDirection side, double z, PropagationDirection part=PROPAGATION_TOTAL)
 Compute magnetic field coefficients for given z.
 
double getFieldIntegral (WhichField field, double z1, double z2, double power)
 Get ½ E·conj(E) or ½ H·conj(H) integral between z1 and z2.
 
double getScatteredFieldIntegral (WhichField field, const cvector &incident, IncidentDirection side, double z1, double z2)
 Get ½ E·conj(E) or ½ H·conj(H) integral between z1 and z2 for reflected light.
 

Public Attributes

std::unique_ptr< Diagonalizerdiagonalizer
 Diagonalizer used to compute matrix of eigenvalues and eigenvectors.
 
Determined fields_determined
 Are the diagonalized fields determined for all layers?
 

Protected Member Functions

virtual void getFinalMatrix ()=0
 Get the discontinuity matrix for the whole structure.
 
virtual void determineFields ()=0
 Determine coefficients in each layer necessary for fields calculations.
 
virtual void determineReflectedFields (const cvector &incident, IncidentDirection side)=0
 Determine coefficients in each layer necessary for fields calculations.
 
virtual cvector getFieldVectorE (double z, std::size_t n, PropagationDirection part=PROPAGATION_TOTAL)=0
 Compute electric field coefficients for given z.
 
virtual cvector getFieldVectorH (double z, std::size_t n, PropagationDirection part=PROPAGATION_TOTAL)=0
 Compute magnetic field coefficients for given z.
 
const_cvector getInterfaceVector ()
 Get current expansion coefficients at the matching interface.
 
LazyData< Vec< 3, dcomplex > > computeFieldE (double power, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method, bool reflected, PropagationDirection part=PROPAGATION_TOTAL)
 Compute electric field at the given mesh.
 
LazyData< Vec< 3, dcomplex > > computeFieldH (double power, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method, bool reflected, PropagationDirection part=PROPAGATION_TOTAL)
 Compute magnetic field at the given mesh.
 
LazyData< doublecomputeFieldMagnitude (double power, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method, bool reflected)
 Compute light magnitude.
 
virtual double integrateField (WhichField field, size_t n, double z1, double z2)=0
 Compute ½ E·conj(E) or ½ H·conj(H) integral between z1 and z2.
 

Protected Attributes

cmatrix interface_field_matrix
 Determined field at the interface.
 
dcomplex * interface_field
 Pointer to the interface field data.
 
cmatrix M
 The final matrix which must fulfill M * E = 0.
 
cmatrix temp
 Temporary matrix.
 
dcomplex * evals
 Found eigenvalues of matrix M.
 
doublerwrk
 Temporary space.
 
std::size_t lwrk
 Temporary space.
 
dcomplex * wrk
 Temporary space.
 
cvector incident_vector
 Incident vector, for which the fields are determined.
 
IncidentDirection incident_side
 Incidence side for determined reflected fields.
 
ModalBasesolver
 Solver containing this transfer.
 

Detailed Description

Base class for Admittance and Reflection transfers.

Definition at line 45 of file transfer.hpp.

Member Enumeration Documentation

◆ Determinant

Method of computing determinant in zero search.

Enumerator
DETERMINANT_EIGENVALUE 
DETERMINANT_FULL 

Definition at line 69 of file transfer.hpp.

◆ Determined

Indicates what has been determined.

Enumerator
DETERMINED_NOTHING 

Nothing has been determined.

DETERMINED_RESONANT 

Resonant field has been determined.

DETERMINED_REFLECTED 

Reflected field has been determined.

Definition at line 53 of file transfer.hpp.

◆ IncidentDirection

Direction specification for reflection calculations.

Enumerator
INCIDENCE_TOP 

Incident light propagating from top (downwards)

INCIDENCE_BOTTOM 

Incident light propagating from bottom (upwards)

Definition at line 47 of file transfer.hpp.

◆ Method

Available transfer types.

Enumerator
METHOD_AUTO 

Automatically selected transfer method.

METHOD_REFLECTION_ADMITTANCE 

Reflection transfer (with admittance matching)

METHOD_REFLECTION_IMPEDANCE 

Reflection transfer (with impedance matching)

METHOD_ADMITTANCE 

Admittance transfer.

METHOD_IMPEDANCE 

Impedance transfer.

Definition at line 60 of file transfer.hpp.

Constructor & Destructor Documentation

◆ Transfer()

plask::optical::modal::Transfer::Transfer ( ModalBase solver,
Expansion expansion 
)

Create transfer object and initialize memory.

Parameters
solversolver counting this transfer
expansionexpansion for diagonalizer

Definition at line 22 of file transfer.cpp.

◆ ~Transfer()

plask::optical::modal::Transfer::~Transfer ( )
virtual

Definition at line 43 of file transfer.cpp.

Member Function Documentation

◆ computeFieldE()

LazyData< Vec< 3, dcomplex > > plask::optical::modal::Transfer::computeFieldE ( double  power,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method,
bool  reflected,
PropagationDirection  part = PROPAGATION_TOTAL 
)
protected

Compute electric field at the given mesh.

Parameters
powermode power
dst_meshtarget mesh
methodinterpolation method
partpart of the field (forward-, backward-propagating, or total) that is wanted
reflectedis this method called from reflected calculations?

Definition at line 157 of file transfer.cpp.

◆ computeFieldH()

LazyData< Vec< 3, dcomplex > > plask::optical::modal::Transfer::computeFieldH ( double  power,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method,
bool  reflected,
PropagationDirection  part = PROPAGATION_TOTAL 
)
protected

Compute magnetic field at the given mesh.

Parameters
powermode power
dst_meshtarget mesh
methodinterpolation method
reflectedis this method called from reflected calculations?
partpart of the field (forward-, backward-propagating, or total) that is wanted

Definition at line 188 of file transfer.cpp.

◆ computeFieldMagnitude()

LazyData< double > plask::optical::modal::Transfer::computeFieldMagnitude ( double  power,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method,
bool  reflected 
)
inlineprotected

Compute light magnitude.

Parameters
powermode power
dst_meshdestination mesh
methodinterpolation method
reflectedis the field emitting?

Definition at line 204 of file transfer.hpp.

◆ determinant()

dcomplex plask::optical::modal::Transfer::determinant ( )

Compute discontinuity matrix determinant for the current parameters.

Definition at line 59 of file transfer.cpp.

◆ determineFields()

virtual void plask::optical::modal::Transfer::determineFields ( )
protectedpure virtual

Determine coefficients in each layer necessary for fields calculations.

Implemented in plask::optical::modal::AdmittanceTransfer, plask::optical::modal::ImpedanceTransfer, and plask::optical::modal::ReflectionTransfer.

◆ determineReflectedFields()

virtual void plask::optical::modal::Transfer::determineReflectedFields ( const cvector incident,
IncidentDirection  side 
)
protectedpure virtual

Determine coefficients in each layer necessary for fields calculations.

This method is called for reflected fields.

Parameters
incidentincident field vector
sideincidence side

Implemented in plask::optical::modal::AdmittanceTransfer, plask::optical::modal::ImpedanceTransfer, and plask::optical::modal::ReflectionTransfer.

◆ getFieldE()

LazyData< Vec< 3, dcomplex > > plask::optical::modal::Transfer::getFieldE ( double  power,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method,
PropagationDirection  part = PROPAGATION_TOTAL 
)
inline

Get electric field at the given mesh for resonant mode.

Parameters
powermode power
dst_meshtarget mesh
methodinterpolation method
partpart of the field (forward-, backward-propagating, or total) that is wanted

Definition at line 234 of file transfer.hpp.

◆ getFieldH()

LazyData< Vec< 3, dcomplex > > plask::optical::modal::Transfer::getFieldH ( double  power,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method,
PropagationDirection  part = PROPAGATION_TOTAL 
)
inline

Get magnetic field at the given mesh for resonant mode.

Parameters
powermode power
dst_meshtarget mesh
methodinterpolation method
partpart of the field (forward-, backward-propagating, or total) that is wanted

Definition at line 249 of file transfer.hpp.

◆ getFieldIntegral()

double plask::optical::modal::Transfer::getFieldIntegral ( WhichField  field,
double  z1,
double  z2,
double  power 
)

Get ½ E·conj(E) or ½ H·conj(H) integral between z1 and z2.

Parameters
fieldfield to integrate
z1lower integration bound
z2upper integration bound
powermode emitted power
Returns
computed integral

Definition at line 244 of file transfer.cpp.

◆ getFieldMagnitude()

LazyData< double > plask::optical::modal::Transfer::getFieldMagnitude ( double  power,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method 
)
inline

Get light magnitude for resonant mode.

Parameters
powermode power
dst_meshdestination mesh
methodinterpolation method

Definition at line 263 of file transfer.hpp.

◆ getFieldVectorE() [1/2]

cvector plask::optical::modal::Transfer::getFieldVectorE ( double  z,
PropagationDirection  part = PROPAGATION_TOTAL 
)

Compute electric field coefficients for given z.

Parameters
zposition within the layer
partpart of the field (forward-, backward-propagating, or total) that is wanted
Returns
electric field coefficients

Definition at line 219 of file transfer.cpp.

◆ getFieldVectorE() [2/2]

virtual cvector plask::optical::modal::Transfer::getFieldVectorE ( double  z,
std::size_t  n,
PropagationDirection  part = PROPAGATION_TOTAL 
)
protectedpure virtual

Compute electric field coefficients for given z.

Parameters
zposition within the layer
nlayer number
partpart of the field (forward-, backward-propagating, or total) that is wanted
Returns
electric field coefficients

Implemented in plask::optical::modal::ReflectionTransfer, and plask::optical::modal::XanceTransfer.

◆ getFieldVectorH() [1/2]

cvector plask::optical::modal::Transfer::getFieldVectorH ( double  z,
PropagationDirection  part = PROPAGATION_TOTAL 
)

Compute magnetic field coefficients for given z.

Parameters
zposition within the layer
partpart of the field (forward-, backward-propagating, or total) that is wanted
Returns
magnetic field coefficients

Definition at line 225 of file transfer.cpp.

◆ getFieldVectorH() [2/2]

virtual cvector plask::optical::modal::Transfer::getFieldVectorH ( double  z,
std::size_t  n,
PropagationDirection  part = PROPAGATION_TOTAL 
)
protectedpure virtual

Compute magnetic field coefficients for given z.

Parameters
zposition within the layer
nlayer number
partpart of the field (forward-, backward-propagating, or total) that is wanted
Returns
magnetic field coefficients

Implemented in plask::optical::modal::ReflectionTransfer, and plask::optical::modal::XanceTransfer.

◆ getFinalMatrix()

virtual void plask::optical::modal::Transfer::getFinalMatrix ( )
protectedpure virtual

◆ getInterfaceVector()

const_cvector plask::optical::modal::Transfer::getInterfaceVector ( )
protected

Get current expansion coefficients at the matching interface.

Returns
vector of current expansion coefficients at the interface

Definition at line 110 of file transfer.cpp.

◆ getReflectionVector()

virtual cvector plask::optical::modal::Transfer::getReflectionVector ( const cvector incident,
IncidentDirection  side 
)
pure virtual

Get vector of reflection coefficients.

Parameters
incidentincident field profile
sideincident light side

Implemented in plask::optical::modal::ReflectionTransfer, plask::optical::modal::AdmittanceTransfer, and plask::optical::modal::ImpedanceTransfer.

◆ getScatteredFieldE()

LazyData< Vec< 3, dcomplex > > plask::optical::modal::Transfer::getScatteredFieldE ( const cvector incident,
IncidentDirection  side,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method,
PropagationDirection  part = PROPAGATION_TOTAL 
)
inline

Get electric field at the given mesh for reflected light.

Parameters
incidentincident field vector
sideincidence side
dst_meshtarget mesh
methodinterpolation method
partpart of the field (forward-, backward-propagating, or total) that is wanted

Definition at line 278 of file transfer.hpp.

◆ getScatteredFieldH()

LazyData< Vec< 3, dcomplex > > plask::optical::modal::Transfer::getScatteredFieldH ( const cvector incident,
IncidentDirection  side,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method,
PropagationDirection  part = PROPAGATION_TOTAL 
)
inline

Get magnetic field at the given mesh for reflected light.

Parameters
incidentincident field vector
sideincidence side
dst_meshtarget mesh
methodinterpolation method
partpart of the field (forward-, backward-propagating, or total) that is wanted

Definition at line 295 of file transfer.hpp.

◆ getScatteredFieldIntegral()

double plask::optical::modal::Transfer::getScatteredFieldIntegral ( WhichField  field,
const cvector incident,
IncidentDirection  side,
double  z1,
double  z2 
)

Get ½ E·conj(E) or ½ H·conj(H) integral between z1 and z2 for reflected light.

Parameters
fieldfield to integrate
incidentincident field vector
sideincidence side
z1lower integration bound
z2upper integration bound
Returns
computed integral

Definition at line 260 of file transfer.cpp.

◆ getScatteredFieldMagnitude()

LazyData< double > plask::optical::modal::Transfer::getScatteredFieldMagnitude ( const cvector incident,
IncidentDirection  side,
const shared_ptr< const Mesh > &  dst_mesh,
InterpolationMethod  method 
)
inline

Get light magnitude for reflected light.

Parameters
incidentincident field vector
sideincidence side
dst_meshdestination mesh
methodinterpolation method

Definition at line 311 of file transfer.hpp.

◆ getScatteredFieldVectorE()

cvector plask::optical::modal::Transfer::getScatteredFieldVectorE ( const cvector incident,
IncidentDirection  side,
double  z,
PropagationDirection  part = PROPAGATION_TOTAL 
)

Compute electric field coefficients for given z.

Parameters
incidentincident field vector
sideincidence side
zposition within the layer
partpart of the field (forward-, backward-propagating, or total) that is wanted
Returns
electric field coefficients

Definition at line 234 of file transfer.cpp.

◆ getScatteredFieldVectorH()

cvector plask::optical::modal::Transfer::getScatteredFieldVectorH ( const cvector incident,
IncidentDirection  side,
double  z,
PropagationDirection  part = PROPAGATION_TOTAL 
)

Compute magnetic field coefficients for given z.

Parameters
incidentincident field vector
sideincidence side
zposition within the layer
partpart of the field (forward-, backward-propagating, or total) that is wanted
Returns
magnetic field coefficients

Definition at line 239 of file transfer.cpp.

◆ getTransmissionVector()

virtual cvector plask::optical::modal::Transfer::getTransmissionVector ( const cvector incident,
IncidentDirection  side 
)
pure virtual

Get vector of transmission coefficients.

Parameters
incidentincident field profile
sideincident light side

Implemented in plask::optical::modal::ReflectionTransfer, and plask::optical::modal::XanceTransfer.

◆ initDiagonalization()

void plask::optical::modal::Transfer::initDiagonalization ( )

Init diagonalization.

Definition at line 53 of file transfer.cpp.

◆ integrateField()

virtual double plask::optical::modal::Transfer::integrateField ( WhichField  field,
size_t  n,
double  z1,
double  z2 
)
protectedpure virtual

Compute ½ E·conj(E) or ½ H·conj(H) integral between z1 and z2.

Parameters
fieldfield to integrate
nlayer number
z1lower integration bound in local layer coordinates
z2upper integration bound in local layer coordinates
Returns
computed integral

Implemented in plask::optical::modal::ReflectionTransfer, and plask::optical::modal::XanceTransfer.

Member Data Documentation

◆ diagonalizer

std::unique_ptr<Diagonalizer> plask::optical::modal::Transfer::diagonalizer

Diagonalizer used to compute matrix of eigenvalues and eigenvectors.

Definition at line 97 of file transfer.hpp.

◆ evals

dcomplex* plask::optical::modal::Transfer::evals
protected

Found eigenvalues of matrix M.

Definition at line 82 of file transfer.hpp.

◆ fields_determined

Determined plask::optical::modal::Transfer::fields_determined

Are the diagonalized fields determined for all layers?

Definition at line 100 of file transfer.hpp.

◆ incident_side

IncidentDirection plask::optical::modal::Transfer::incident_side
protected

Incidence side for determined reflected fields.

Definition at line 88 of file transfer.hpp.

◆ incident_vector

cvector plask::optical::modal::Transfer::incident_vector
protected

Incident vector, for which the fields are determined.

Definition at line 87 of file transfer.hpp.

◆ interface_field

dcomplex* plask::optical::modal::Transfer::interface_field
protected

Pointer to the interface field data.

Definition at line 76 of file transfer.hpp.

◆ interface_field_matrix

cmatrix plask::optical::modal::Transfer::interface_field_matrix
protected

Determined field at the interface.

Definition at line 75 of file transfer.hpp.

◆ lwrk

std::size_t plask::optical::modal::Transfer::lwrk
protected

Temporary space.

Definition at line 84 of file transfer.hpp.

◆ M

cmatrix plask::optical::modal::Transfer::M
protected

The final matrix which must fulfill M * E = 0.

Definition at line 78 of file transfer.hpp.

◆ rwrk

double* plask::optical::modal::Transfer::rwrk
protected

Temporary space.

Definition at line 83 of file transfer.hpp.

◆ solver

ModalBase* plask::optical::modal::Transfer::solver
protected

Solver containing this transfer.

Definition at line 90 of file transfer.hpp.

◆ temp

cmatrix plask::optical::modal::Transfer::temp
protected

Temporary matrix.

Definition at line 80 of file transfer.hpp.

◆ wrk

dcomplex* plask::optical::modal::Transfer::wrk
protected

Temporary space.

Definition at line 85 of file transfer.hpp.


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