PLaSK library
Loading...
Searching...
No Matches
plask::optical::modal::XanceTransfer Struct Reference

Base class for all solvers using reflection matrix method. More...

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

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

Classes

struct  FieldsDiagonalized
 The structure holding the set of diagonalized fields at the layer boundaries. More...
 

Public Member Functions

cvector getTransmissionVector (const cvector &incident, IncidentDirection side) override
 Get vector of transmission coefficients.
 
 XanceTransfer (ModalBase *solver, Expansion &expansion)
 
- Public Member Functions inherited from plask::optical::modal::Transfer
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.
 
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.
 

Protected Member Functions

double get_d (size_t n, double &z, PropagationDirection &part)
 Get layer thickness and adjust z.
 
double get_d (size_t n, double &z1, double &z2)
 Get layer thickness and adjust z1 and z2.
 
cvector getFieldVectorE (double z, std::size_t n, PropagationDirection part=PROPAGATION_TOTAL) override
 Compute electric field coefficients for given z.
 
cvector getFieldVectorH (double z, std::size_t n, PropagationDirection part=PROPAGATION_TOTAL) override
 Compute magnetic field coefficients for given z.
 
void storeY (size_t n)
 Store the Y matrix for the layer prepared before.
 
const cmatrixgetY (std::size_t n)
 Get the Y matrix for n-th layer.
 
void get_y1 (const cdiagonal &gamma, double d, cdiagonal &y1) const
 Determine the y1 efficiently.
 
void get_y2 (const cdiagonal &gamma, double d, cdiagonal &y2) const
 Determine the y2 efficiently.
 
double integrateField (WhichField field, size_t n, double z1, double z2) override
 Compute ½ E·conj(E) or ½ H·conj(H) integral between z1 and z2.
 
- Protected Member Functions inherited from plask::optical::modal::Transfer
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.
 
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.
 

Protected Attributes

cmatrix Y
 Admittance / impedance matrix.
 
bool needAllY
 Do we need to keep all Y matrices?
 
std::vector< FieldsDiagonalizedfields
 Vector of fields computed for each layer.
 
std::vector< cmatrixmemY
 admittance matrices for each layer
 
- Protected Attributes inherited from plask::optical::modal::Transfer
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.
 

Additional Inherited Members

- Public Types inherited from plask::optical::modal::Transfer
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 Attributes inherited from plask::optical::modal::Transfer
std::unique_ptr< Diagonalizerdiagonalizer
 Diagonalizer used to compute matrix of eigenvalues and eigenvectors.
 
Determined fields_determined
 Are the diagonalized fields determined for all layers?
 

Detailed Description

Base class for all solvers using reflection matrix method.

Definition at line 27 of file xance.hpp.

Constructor & Destructor Documentation

◆ XanceTransfer()

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

Definition at line 27 of file xance.cpp.

Member Function Documentation

◆ get_d() [1/2]

double plask::optical::modal::XanceTransfer::get_d ( size_t  n,
double z,
PropagationDirection part 
)
inlineprotected

Get layer thickness and adjust z.

Definition at line 45 of file xance.hpp.

◆ get_d() [2/2]

double plask::optical::modal::XanceTransfer::get_d ( size_t  n,
double z1,
double z2 
)
inlineprotected

Get layer thickness and adjust z1 and z2.

Definition at line 59 of file xance.hpp.

◆ get_y1()

void plask::optical::modal::XanceTransfer::get_y1 ( const cdiagonal gamma,
double  d,
cdiagonal y1 
) const
inlineprotected

Determine the y1 efficiently.

Definition at line 104 of file xance.hpp.

◆ get_y2()

void plask::optical::modal::XanceTransfer::get_y2 ( const cdiagonal gamma,
double  d,
cdiagonal y2 
) const
inlineprotected

Determine the y2 efficiently.

Definition at line 118 of file xance.hpp.

◆ getFieldVectorE()

cvector plask::optical::modal::XanceTransfer::getFieldVectorE ( double  z,
std::size_t  n,
PropagationDirection  part = PROPAGATION_TOTAL 
)
overrideprotectedvirtual

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

Implements plask::optical::modal::Transfer.

Definition at line 50 of file xance.cpp.

◆ getFieldVectorH()

cvector plask::optical::modal::XanceTransfer::getFieldVectorH ( double  z,
std::size_t  n,
PropagationDirection  part = PROPAGATION_TOTAL 
)
overrideprotectedvirtual

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

Implements plask::optical::modal::Transfer.

Definition at line 106 of file xance.cpp.

◆ getTransmissionVector()

cvector plask::optical::modal::XanceTransfer::getTransmissionVector ( const cvector incident,
IncidentDirection  side 
)
overridevirtual

Get vector of transmission coefficients.

Parameters
incidentincident field profile
sideincident light side

Implements plask::optical::modal::Transfer.

Definition at line 163 of file xance.cpp.

◆ getY()

const cmatrix & plask::optical::modal::XanceTransfer::getY ( std::size_t  n)
inlineprotected

Get the Y matrix for n-th layer.

Parameters
nlayer number

Definition at line 96 of file xance.hpp.

◆ integrateField()

double plask::optical::modal::XanceTransfer::integrateField ( WhichField  field,
size_t  n,
double  z1,
double  z2 
)
overrideprotectedvirtual

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

Implements plask::optical::modal::Transfer.

Definition at line 177 of file xance.cpp.

◆ storeY()

void plask::optical::modal::XanceTransfer::storeY ( size_t  n)
protected

Store the Y matrix for the layer prepared before.

Parameters
nlayer number

Definition at line 36 of file xance.cpp.

Member Data Documentation

◆ fields

std::vector<FieldsDiagonalized> plask::optical::modal::XanceTransfer::fields
protected

Vector of fields computed for each layer.

Definition at line 40 of file xance.hpp.

◆ memY

std::vector<cmatrix> plask::optical::modal::XanceTransfer::memY
protected

admittance matrices for each layer

Definition at line 42 of file xance.hpp.

◆ needAllY

bool plask::optical::modal::XanceTransfer::needAllY
protected

Do we need to keep all Y matrices?

Definition at line 38 of file xance.hpp.

◆ Y

cmatrix plask::optical::modal::XanceTransfer::Y
protected

Admittance / impedance matrix.

Definition at line 36 of file xance.hpp.


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