PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
plask::optical::modal::Expansion Struct Referenceabstract

`#include <solvers/optical/modal/expansion.hpp>`

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

## Public Types
enum | Component { E_UNSPECIFIED = 0 , E_TRAN = 1 , E_LONG = 2 }
| Specified component in polarization or symmetry. More...

## Public Member Functions
| Expansion (ModalBase *solver)
virtual | ~Expansion ()
TempMatrix | getTempMatrix ()
virtual void | beforeGetEpsilon ()
| Prepare retrieval of refractive index.
virtual void | afterGetEpsilon ()
| Finish retrieval of refractive index.
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.
void | computeIntegrals ()
| Compute all expansion coefficients.
virtual bool | diagonalQE (size_t PLASK_UNUSED(l)) const
| Tell if matrix for i-th layer is diagonal.
virtual size_t | matrixSize () const =0
| Return size of the expansion matrix (equal to the number of expansion coefficients)
virtual void | getMatrices (size_t layer, cmatrix &RE, cmatrix &RH)=0
| Get RE anf RH matrices.
virtual LazyData< Tensor3< dcomplex > > | getMaterialEps (size_t lay, const shared_ptr< const typename LevelsAdapter::Level > &level, InterpolationMethod interp)=0
| Get epsilons index back from expansion.
virtual void | getDiagonalEigenvectors (cmatrix &Te, cmatrix &Te1, const cmatrix &RE, const cdiagonal &gamma)
| Get eigenvectors with some physical meaning when the layer is diagonal.
void | initField (WhichField which, InterpolationMethod method)
| Prepare for computations of the fields.
virtual double | integrateField (WhichField field, size_t layer, const cmatrix &TE, const cmatrix &TH, const std::function< std::pair< dcomplex, dcomplex >(size_t, size_t)> &vertical)=0
| Compute ½ En·conj(Em) or ½ Hn·conj(Hm)
virtual double | integratePoyntingVert (const cvector &E, const cvector &H)=0
| Compute vertical component of the Poynting vector for specified fields.
double | getModeFlux (size_t n, const cmatrix &TE, const cmatrix &TH)
| Compute vertical component of the Poynting vector for fields specified as matrix column.
virtual void | cleanupField ()
| Cleanup after computatiations of the fields.
virtual LazyData< Vec< 3, dcomplex > > | getField (size_t l, const shared_ptr< const typename LevelsAdapter::Level > &level, const cvector &E, const cvector &H)=0
| Compute electric or magnetic field on `dst_mesh` at certain level.

## Public Attributes
WhichField | which_field
InterpolationMethod | field_interpolation
ModalBase * | solver
| Solver which performs calculations (and is the interface to the outside world)
dcomplex | k0
| Frequency for which the actual computations are performed.
double | lam0
| Material parameters wavelength.
LazyData< double > | temperature
| Obtained temperature.
bool | gain_connected
| Flag indicating if the gain is connected.
bool | epsilon_connected
| Flag indicating if inEpsilon is connected.
LazyData< Tensor2< double > > | gain
| Obtained gain.
LazyData< Tensor3< dcomplex > > | epsilons
| Obtained epsilons.
LazyData< double > | carriers
| Carriers concentration.

## Protected Member Functions
virtual void | beforeLayersIntegrals (dcomplex PLASK_UNUSED(lam), dcomplex PLASK_UNUSED(glam))
| Method called before layer integrals are computed.
virtual void | afterLayersIntegrals ()
| Method called after layer integrals are computed.
virtual void | layerIntegrals (size_t layer, double lam, double glam)=0
| Compute integrals for RE and RH matrices.
virtual void | prepareField ()
| Prepare for computatiations of the fields.

## Protected Attributes
TempMatrixPool | temporary

## Detailed Description

Definition at line 30 of file expansion.hpp.

## Member Enumeration Documentation

## ◆ Component

enum plask::optical::modal::Expansion::Component

Specified component in polarization or symmetry.

Enumerator
E_UNSPECIFIED | All components exist or no symmetry.
E_TRAN | E_tran and H_long exist or are symmetric and E_long and H_tran anti-symmetric.
E_LONG | E_long and H_tran exist or are symmetric and E_tran and H_long anti-symmetric.

Definition at line 33 of file expansion.hpp.

## Constructor & Destructor Documentation

## ◆ Expansion()

plask::optical::modal::Expansion::Expansion | ( | ModalBase * | solver | ) |
| inline

Definition at line 69 of file expansion.hpp.

## ◆ ~Expansion()

virtual plask::optical::modal::Expansion::~Expansion | ( |  | ) |
| inline virtual

Definition at line 71 of file expansion.hpp.

## Member Function Documentation

## ◆ afterGetEpsilon()

virtual void plask::optical::modal::Expansion::afterGetEpsilon | ( |  | ) |
| inline virtual

Finish retrieval of refractive index.

Reimplemented in plask::optical::modal::ExpansionBessel.

Definition at line 115 of file expansion.hpp.

## ◆ afterLayersIntegrals()

virtual void plask::optical::modal::Expansion::afterLayersIntegrals | ( |  | ) |
| inline protected virtual

Method called after layer integrals are computed.

Definition at line 93 of file expansion.hpp.

## ◆ beforeGetEpsilon()

virtual void plask::optical::modal::Expansion::beforeGetEpsilon | ( |  | ) |
| inline virtual

Prepare retrieval of refractive index.

Reimplemented in plask::optical::modal::ExpansionBessel.

Definition at line 110 of file expansion.hpp.

## ◆ beforeLayersIntegrals()

virtual void plask::optical::modal::Expansion::beforeLayersIntegrals | ( | dcomplex | PLASK_UNUSEDlam,
|  | dcomplex | PLASK_UNUSEDglam
| ) |  |
| inline protected virtual

Method called before layer integrals are computed.

Definition at line 88 of file expansion.hpp.

## ◆ cleanupField()

virtual void plask::optical::modal::Expansion::cleanupField | ( |  | ) |
| inline virtual

Cleanup after computatiations of the fields.

Reimplemented in plask::optical::modal::ExpansionBessel, plask::optical::modal::ExpansionPW2D, and plask::optical::modal::ExpansionPW3D.

Definition at line 296 of file expansion.hpp.

## ◆ clearLam0()

void plask::optical::modal::Expansion::clearLam0 | ( |  | ) |
| inline

Clear lam0.

Definition at line 128 of file expansion.hpp.

## ◆ computeIntegrals()

void plask::optical::modal::Expansion::computeIntegrals | ( |  | ) |
| inline

Compute all expansion coefficients.

Definition at line 149 of file expansion.hpp.

## ◆ diagonalQE()

virtual bool plask::optical::modal::Expansion::diagonalQE | ( | size_t | PLASK_UNUSEDl | ) | const
| inline virtual

Tell if matrix for i-th layer is diagonal.

Parameters

  l | layer number

Returns
  `true` if the i-th matrix is diagonal

Definition at line 208 of file expansion.hpp.

## ◆ getDiagonalEigenvectors()

void plask::optical::modal::Expansion::getDiagonalEigenvectors | ( | cmatrix & | Te,
|  | cmatrix & | Te1,
|  | const cmatrix & | RE,
|  | const cdiagonal & | gamma
| ) |  |
| virtual

Get eigenvectors with some physical meaning when the layer is diagonal.

Parameters

  [out] | Te | Resulting Te matrix
  [out] | Te1 | Resulting Te^1 matrix
  | RE | RE matrix for the layer
  | gamma2 | gamma matrix for the layer

Reimplemented in plask::optical::modal::ExpansionPW2D, and plask::optical::modal::ExpansionPW3D.

Definition at line 18 of file expansion.cpp.

## ◆ getField()

virtual LazyData< Vec< 3, dcomplex > > plask::optical::modal::Expansion::getField | ( | size_t | l,
|  | const shared_ptr< const typename LevelsAdapter::Level > & | level,
|  | const cvector & | E,
|  | const cvector & | H
| ) |  |
| pure virtual

Compute electric or magnetic field on `dst_mesh` at certain level.

Parameters

  l | layer number
  level | destination level
  E,H | electric and magnetic field coefficientscients

Returns
  field distribution at `dst_mesh`
  field distribution at `dst_mesh`

Implemented in plask::optical::modal::ExpansionPW2D, plask::optical::modal::ExpansionPW3D, and plask::optical::modal::ExpansionBessel.

## ◆ getK0()

dcomplex plask::optical::modal::Expansion::getK0 | ( |  | ) | const
| inline

Get current k0.

Definition at line 137 of file expansion.hpp.

## ◆ getLam0()

double plask::optical::modal::Expansion::getLam0 | ( |  | ) | const
| inline

Get lam0.

Definition at line 118 of file expansion.hpp.

## ◆ getMaterialEps()

virtual LazyData< Tensor3< dcomplex > > plask::optical::modal::Expansion::getMaterialEps | ( | size_t | lay,
|  | const shared_ptr< const typename LevelsAdapter::Level > & | level,
|  | InterpolationMethod | interp
| ) |  |
| pure virtual

Get epsilons index back from expansion.

Parameters

  lay | layer number
  mesh | mesh to get parameters to
  interp | interpolation method

Returns
  computed refractive indices

Implemented in plask::optical::modal::ExpansionPW2D, plask::optical::modal::ExpansionPW3D, and plask::optical::modal::ExpansionBessel.

## ◆ getMatrices()

virtual void plask::optical::modal::Expansion::getMatrices | ( | size_t | layer,
|  | cmatrix & | RE,
|  | cmatrix & | RH
| ) |  |
| pure virtual

Get RE anf RH matrices.

Parameters

  | layer | layer number
  [out] | RE,RH | resulting matrix

Implemented in plask::optical::modal::ExpansionPW2D, plask::optical::modal::ExpansionPW3D, plask::optical::modal::ExpansionBesselFini, and plask::optical::modal::ExpansionBesselInfini.

## ◆ getModeFlux()

double plask::optical::modal::Expansion::getModeFlux | ( | size_t | n,
|  | const cmatrix & | TE,
|  | const cmatrix & | TH
| ) |  |
| inline

Compute vertical component of the Poynting vector for fields specified as matrix column.

Parameters

  n | column number
  TE | electric field coefficients matrix
  TH | magnetic field coefficients matrix

Returns
  integrated Poynting vector i.e. the total vertically emitted energy

Definition at line 279 of file expansion.hpp.

## ◆ getTempMatrix()

TempMatrix plask::optical::modal::Expansion::getTempMatrix | ( |  | ) |
| inline

Definition at line 73 of file expansion.hpp.

## ◆ initField()

void plask::optical::modal::Expansion::initField | ( | WhichField | which,
|  | InterpolationMethod | method
| ) |  |
| inline

Prepare for computations of the fields.

Parameters

  field | which field is computed
  method | interpolation method

Definition at line 247 of file expansion.hpp.

## ◆ integrateField()

virtual double plask::optical::modal::Expansion::integrateField | ( | WhichField | field,
|  | size_t | layer,
|  | const cmatrix & | TE,
|  | const cmatrix & | TH,
|  | const std::function< std::pair< dcomplex, dcomplex >(size_t, size_t)> & | vertical
| ) |  |
| pure virtual

Compute ½ En·conj(Em) or ½ Hn·conj(Hm)

Parameters

  | field | field to integrate
  | layer | layer number
  | TE | electric field coefficients matrix
  | TH | magnetic field coefficients matrix
  [out] | result | ½ E·conj(E) or ½ H·conj(H) matrix

Implemented in plask::optical::modal::ExpansionBessel, plask::optical::modal::ExpansionPW2D, and plask::optical::modal::ExpansionPW3D.

## ◆ integratePoyntingVert()

virtual double plask::optical::modal::Expansion::integratePoyntingVert | ( | const cvector & | E,
|  | const cvector & | H
| ) |  |
| pure virtual

Compute vertical component of the Poynting vector for specified fields.

Parameters

  E | electric field coefficients vector
  H | magnetic field coefficients vector

Returns
  integrated Poynting vector i.e. the total vertically emitted energy

Implemented in plask::optical::modal::ExpansionBessel, plask::optical::modal::ExpansionPW2D, and plask::optical::modal::ExpansionPW3D.

## ◆ layerIntegrals()

virtual void plask::optical::modal::Expansion::layerIntegrals | ( | size_t | layer,
|  | double | lam,
|  | double | glam
| ) |  |
| protected pure virtual

Compute integrals for RE and RH matrices.

Parameters

  layer | layer number
  lam | wavelength
  glam | wavelength for gain

Implemented in plask::optical::modal::ExpansionBessel, plask::optical::modal::ExpansionPW2D, and plask::optical::modal::ExpansionPW3D.

## ◆ matrixSize()

virtual size_t plask::optical::modal::Expansion::matrixSize | ( |  | ) | const
| pure virtual

Return size of the expansion matrix (equal to the number of expansion coefficients)

Returns
  size of the expansion matrix

Implemented in plask::optical::modal::ExpansionBessel, plask::optical::modal::ExpansionPW2D, and plask::optical::modal::ExpansionPW3D.

## ◆ prepareField()

virtual void plask::optical::modal::Expansion::prepareField | ( |  | ) |
| inline protected virtual

Prepare for computatiations of the fields.

Reimplemented in plask::optical::modal::ExpansionBessel, plask::optical::modal::ExpansionPW2D, and plask::optical::modal::ExpansionPW3D.

Definition at line 290 of file expansion.hpp.

## ◆ setK0()

void plask::optical::modal::Expansion::setK0 | ( | dcomplex | k | ) |
| inline

Set current k0.

Definition at line 139 of file expansion.hpp.

## ◆ setLam0()

void plask::optical::modal::Expansion::setLam0 | ( | double | lam | ) |
| inline

Set lam0.

Definition at line 120 of file expansion.hpp.

## Member Data Documentation

## ◆ carriers

LazyData<double> plask::optical::modal::Expansion::carriers

Carriers concentration.

Definition at line 67 of file expansion.hpp.

## ◆ epsilon_connected

bool plask::optical::modal::Expansion::epsilon_connected

Flag indicating if inEpsilon is connected.

Definition at line 58 of file expansion.hpp.

## ◆ epsilons

LazyData<Tensor3<dcomplex> > plask::optical::modal::Expansion::epsilons

Obtained epsilons.

Definition at line 64 of file expansion.hpp.

## ◆ field_interpolation

InterpolationMethod plask::optical::modal::Expansion::field_interpolation

Definition at line 40 of file expansion.hpp.

## ◆ gain

LazyData<Tensor2<double> > plask::optical::modal::Expansion::gain

Obtained gain.

Definition at line 61 of file expansion.hpp.

## ◆ gain_connected

bool plask::optical::modal::Expansion::gain_connected

Flag indicating if the gain is connected.

Definition at line 55 of file expansion.hpp.

## ◆ k0

dcomplex plask::optical::modal::Expansion::k0

Frequency for which the actual computations are performed.

Definition at line 46 of file expansion.hpp.

## ◆ lam0

double plask::optical::modal::Expansion::lam0

Material parameters wavelength.

Definition at line 49 of file expansion.hpp.

## ◆ solver

ModalBase* plask::optical::modal::Expansion::solver

Solver which performs calculations (and is the interface to the outside world)

Definition at line 43 of file expansion.hpp.

## ◆ temperature

LazyData<double> plask::optical::modal::Expansion::temperature

Obtained temperature.

Definition at line 52 of file expansion.hpp.

## ◆ temporary

TempMatrixPool plask::optical::modal::Expansion::temporary
| protected

Definition at line 83 of file expansion.hpp.

## ◆ which_field

WhichField plask::optical::modal::Expansion::which_field

Definition at line 39 of file expansion.hpp.

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

- solvers/optical/modal/expansion.hpp
- solvers/optical/modal/expansion.cpp