PLaSK library
|
#include <solvers/optical/modal/fourier/expansion2d.hpp>
Classes | |
struct | CoeffMatrices |
struct | Coeffs |
Public Member Functions | |
ExpansionPW2D (FourierSolver2D *solver) | |
Create new expansion. | |
bool | symmetric () const |
Indicates if the expansion is a symmetric one. | |
bool | separated () const |
Indicates whether TE and TM modes can be separated. | |
void | init () |
Init expansion. | |
void | reset () |
Free allocated memory. | |
bool | diagonalQE (size_t l) const override |
size_t | matrixSize () const override |
Return size of the expansion matrix (equal to the number of expansion coefficients) | |
void | getMatrices (size_t l, cmatrix &RE, cmatrix &RH) override |
Get RE anf RH matrices. | |
void | prepareField () override |
Prepare for computatiations of the fields. | |
void | cleanupField () override |
Cleanup after computatiations of the fields. | |
LazyData< Vec< 3, dcomplex > > | getField (size_t l, const shared_ptr< const typename LevelsAdapter::Level > &level, const cvector &E, const cvector &H) override |
Compute electric or magnetic field on dst_mesh at certain level. | |
LazyData< Tensor3< dcomplex > > | getMaterialEps (size_t l, const shared_ptr< const typename LevelsAdapter::Level > &level, InterpolationMethod interp=INTERPOLATION_DEFAULT) override |
Get epsilons index back from expansion. | |
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) override |
Compute ½ En·conj(Em) or ½ Hn·conj(Hm) | |
double | integratePoyntingVert (const cvector &E, const cvector &H) override |
Compute vertical component of the Poynting vector for specified fields. | |
void | getDiagonalEigenvectors (cmatrix &Te, cmatrix &Te1, const cmatrix &RE, const cdiagonal &gamma) override |
Get eigenvectors with some physical meaning when the layer is diagonal. | |
dcomplex | getBeta () const |
void | setBeta (dcomplex b) |
dcomplex | getKtran () const |
void | setKtran (dcomplex k) |
Component | getSymmetry () const |
void | setSymmetry (Component sym) |
Component | getPolarization () const |
void | setPolarization (Component pol) |
const DataVector< dcomplex > & | epszz (size_t l) |
Get . | |
const DataVector< dcomplex > & | epsyy (size_t l) |
Get . | |
const DataVector< dcomplex > & | repsxx (size_t l) |
Get . | |
const DataVector< dcomplex > & | epszx (size_t l) |
Get . | |
const DataVector< dcomplex > & | muzz () |
Get . | |
const DataVector< dcomplex > & | muxx () |
Get . | |
const DataVector< dcomplex > & | muyy () |
Get . | |
const DataVector< dcomplex > & | rmuzz () |
Get . | |
const DataVector< dcomplex > & | rmuxx () |
Get . | |
const DataVector< dcomplex > & | rmuyy () |
Get . | |
dcomplex | epszz (size_t l, int i) |
Get element of . | |
dcomplex | epsyy (size_t l, int i) |
Get element of . | |
dcomplex | repsxx (size_t l, int i) |
Get element of . | |
dcomplex | epszx (size_t l, int i) |
Get element of . | |
dcomplex | epsxz (size_t l, int i) |
Get element of . | |
dcomplex | muzz (int i) |
Get element of . | |
dcomplex | muxx (int i) |
Get element of . | |
dcomplex | muyy (int i) |
Get element of . | |
dcomplex | rmuzz (int i) |
Get element of . | |
dcomplex | rmuxx (int i) |
Get element of . | |
size_t | iEx (int i) |
Get index. | |
size_t | iEz (int i) |
Get index. | |
size_t | iHx (int i) |
Get index. | |
size_t | iHz (int i) |
Get index. | |
size_t | iEH (int i) |
Get or index for separated equations. | |
Public Member Functions inherited from plask::optical::modal::Expansion | |
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. | |
void | initField (WhichField which, InterpolationMethod method) |
Prepare for computations of the 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. | |
Public Attributes | |
dcomplex | beta |
Longitudinal wavevector (1/µm) | |
dcomplex | ktran |
Transverse wavevector (1/µm) | |
size_t | N |
Number of expansion coefficients. | |
size_t | nN |
Number of of required coefficients for material parameters. | |
double | left |
Left side of the sampled area. | |
double | right |
Right side of the sampled area. | |
bool | periodic |
Indicates if the geometry is periodic (otherwise use PMLs) | |
bool | initialized |
Expansion is initialized. | |
Component | symmetry |
Indicates symmetry if symmetric | |
Component | polarization |
Indicates polarization if separated | |
size_t | pil |
Index of the beginning of the left PML. | |
size_t | pir |
Index of the beginning of the right PML. | |
std::vector< Coeffs > | coeffs |
Cached permittivity expansion coefficients. | |
std::vector< CoeffMatrices > | coeff_matrices |
Cached permittivity expansion coefficient matrixess. | |
cmatrix | coeff_matrix_mxx |
Cached permeability expansion coefficient matrices. | |
cmatrix | coeff_matrix_rmyy |
std::vector< bool > | diagonals |
Information if the layer is diagonal. | |
shared_ptr< RectangularMesh< 2 > > | mesh |
Mesh for getting material data. | |
shared_ptr< MeshAxis > | original_mesh |
Boundaries mesh. | |
Public Attributes inherited from plask::optical::modal::Expansion | |
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 | |
void | beforeLayersIntegrals (dcomplex lam, dcomplex glam) override |
void | layerIntegrals (size_t layer, double lam, double glam) override |
Compute integrals for RE and RH matrices. | |
Tensor3< dcomplex > | getEpsilon (const shared_ptr< GeometryD< 2 > > &geometry, size_t layer, double maty, double lam, double glam, size_t j) |
Protected Member Functions inherited from plask::optical::modal::Expansion | |
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. | |
Protected Attributes | |
DataVector< dcomplex > | mag |
Magnetic permeability coefficients (used with for PMLs) | |
DataVector< dcomplex > | rmag |
Inverted magnetic permeability coefficients (used with for PMLs) | |
FFT::Forward1D | matFFT |
FFT object for material coefficients. | |
Protected Attributes inherited from plask::optical::modal::Expansion | |
TempMatrixPool | temporary |
Additional Inherited Members | |
Public Types inherited from plask::optical::modal::Expansion | |
enum | Component { E_UNSPECIFIED = 0 , E_TRAN = 1 , E_LONG = 2 } |
Specified component in polarization or symmetry. More... | |
Definition at line 27 of file expansion2d.hpp.
plask::optical::modal::ExpansionPW2D::ExpansionPW2D | ( | FourierSolver2D * | solver | ) |
Create new expansion.
solver | solver which performs calculations |
Definition at line 27 of file expansion2d.cpp.
|
overrideprotected |
Definition at line 233 of file expansion2d.cpp.
|
overridevirtual |
Cleanup after computatiations of the fields.
Reimplemented from plask::optical::modal::Expansion.
Definition at line 1047 of file expansion2d.cpp.
|
inlineoverride |
Definition at line 89 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 274 of file expansion2d.hpp.
|
inline |
Get .
Definition at line 258 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 269 of file expansion2d.hpp.
|
inline |
Get .
Definition at line 260 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 273 of file expansion2d.hpp.
|
inline |
Get .
Definition at line 257 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 268 of file expansion2d.hpp.
|
inline |
Definition at line 229 of file expansion2d.hpp.
|
overridevirtual |
Get eigenvectors with some physical meaning when the layer is diagonal.
[out] | Te | Resulting Te matrix |
[out] | Te1 | Resulting Te^1 matrix |
RE | RE matrix for the layer | |
gamma2 | gamma matrix for the layer |
Reimplemented from plask::optical::modal::Expansion.
Definition at line 1280 of file expansion2d.cpp.
|
inlineprotected |
Definition at line 143 of file expansion2d.hpp.
|
overridevirtual |
Compute electric or magnetic field on dst_mesh
at certain level.
l | layer number |
level | destination level |
E,H | electric and magnetic field coefficientscients |
dst_mesh
dst_mesh
Implements plask::optical::modal::Expansion.
Definition at line 1056 of file expansion2d.cpp.
|
inline |
Definition at line 237 of file expansion2d.hpp.
|
overridevirtual |
Get epsilons index back from expansion.
lay | layer number |
mesh | mesh to get parameters to |
interp | interpolation method |
Implements plask::optical::modal::Expansion.
Definition at line 642 of file expansion2d.cpp.
|
overridevirtual |
Get RE anf RH matrices.
layer | layer number | |
[out] | RE,RH | resulting matrix |
Implements plask::optical::modal::Expansion.
Definition at line 820 of file expansion2d.cpp.
|
inline |
Definition at line 254 of file expansion2d.hpp.
|
inline |
Definition at line 245 of file expansion2d.hpp.
|
inline |
Get or index for separated equations.
Definition at line 287 of file expansion2d.hpp.
|
inline |
Get index.
Definition at line 283 of file expansion2d.hpp.
|
inline |
Get index.
Definition at line 284 of file expansion2d.hpp.
|
inline |
Get index.
Definition at line 285 of file expansion2d.hpp.
|
inline |
Get index.
Definition at line 286 of file expansion2d.hpp.
void plask::optical::modal::ExpansionPW2D::init | ( | ) |
Init expansion.
compute_coeffs | compute material coefficients |
Definition at line 50 of file expansion2d.cpp.
|
overridevirtual |
Compute ½ En·conj(Em) or ½ Hn·conj(Hm)
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 |
Implements plask::optical::modal::Expansion.
Definition at line 1314 of file expansion2d.cpp.
|
overridevirtual |
Compute vertical component of the Poynting vector for specified fields.
E | electric field coefficients vector |
H | magnetic field coefficients vector |
Implements plask::optical::modal::Expansion.
Definition at line 1243 of file expansion2d.cpp.
|
overrideprotectedvirtual |
Compute integrals for RE and RH matrices.
layer | layer number |
lam | wavelength |
glam | wavelength for gain |
Implements plask::optical::modal::Expansion.
Definition at line 238 of file expansion2d.cpp.
|
inlineoverridevirtual |
Return size of the expansion matrix (equal to the number of expansion coefficients)
Implements plask::optical::modal::Expansion.
Definition at line 91 of file expansion2d.hpp.
|
inline |
Get .
Definition at line 262 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 278 of file expansion2d.hpp.
|
inline |
Get .
Definition at line 263 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 279 of file expansion2d.hpp.
|
inline |
Get .
Definition at line 261 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 277 of file expansion2d.hpp.
|
overridevirtual |
Prepare for computatiations of the fields.
Reimplemented from plask::optical::modal::Expansion.
Definition at line 1029 of file expansion2d.cpp.
|
inline |
Get .
Definition at line 259 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 270 of file expansion2d.hpp.
void plask::optical::modal::ExpansionPW2D::reset | ( | ) |
Free allocated memory.
Definition at line 220 of file expansion2d.cpp.
|
inline |
Get .
Definition at line 265 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 281 of file expansion2d.hpp.
|
inline |
Get .
Definition at line 266 of file expansion2d.hpp.
|
inline |
Get .
Definition at line 264 of file expansion2d.hpp.
|
inline |
Get element of .
Definition at line 280 of file expansion2d.hpp.
|
inline |
Indicates whether TE and TM modes can be separated.
Definition at line 78 of file expansion2d.hpp.
|
inline |
Definition at line 230 of file expansion2d.hpp.
|
inline |
Definition at line 238 of file expansion2d.hpp.
Definition at line 30 of file expansion2d.cpp.
Definition at line 246 of file expansion2d.hpp.
|
inline |
Indicates if the expansion is a symmetric one.
Definition at line 75 of file expansion2d.hpp.
dcomplex plask::optical::modal::ExpansionPW2D::beta |
Longitudinal wavevector (1/µm)
Definition at line 28 of file expansion2d.hpp.
std::vector<CoeffMatrices> plask::optical::modal::ExpansionPW2D::coeff_matrices |
Cached permittivity expansion coefficient matrixess.
Definition at line 54 of file expansion2d.hpp.
cmatrix plask::optical::modal::ExpansionPW2D::coeff_matrix_mxx |
Cached permeability expansion coefficient matrices.
Definition at line 57 of file expansion2d.hpp.
cmatrix plask::optical::modal::ExpansionPW2D::coeff_matrix_rmyy |
Definition at line 57 of file expansion2d.hpp.
std::vector<Coeffs> plask::optical::modal::ExpansionPW2D::coeffs |
Cached permittivity expansion coefficients.
Definition at line 48 of file expansion2d.hpp.
std::vector<bool> plask::optical::modal::ExpansionPW2D::diagonals |
Information if the layer is diagonal.
Definition at line 60 of file expansion2d.hpp.
bool plask::optical::modal::ExpansionPW2D::initialized |
Expansion is initialized.
Definition at line 36 of file expansion2d.hpp.
dcomplex plask::optical::modal::ExpansionPW2D::ktran |
Transverse wavevector (1/µm)
Definition at line 29 of file expansion2d.hpp.
double plask::optical::modal::ExpansionPW2D::left |
Left side of the sampled area.
Definition at line 33 of file expansion2d.hpp.
|
protected |
Magnetic permeability coefficients (used with for PMLs)
Definition at line 134 of file expansion2d.hpp.
|
protected |
FFT object for material coefficients.
Definition at line 137 of file expansion2d.hpp.
shared_ptr<RectangularMesh<2> > plask::optical::modal::ExpansionPW2D::mesh |
Mesh for getting material data.
Definition at line 63 of file expansion2d.hpp.
size_t plask::optical::modal::ExpansionPW2D::N |
Number of expansion coefficients.
Definition at line 31 of file expansion2d.hpp.
size_t plask::optical::modal::ExpansionPW2D::nN |
Number of of required coefficients for material parameters.
Definition at line 32 of file expansion2d.hpp.
shared_ptr<MeshAxis> plask::optical::modal::ExpansionPW2D::original_mesh |
Boundaries mesh.
Definition at line 66 of file expansion2d.hpp.
bool plask::optical::modal::ExpansionPW2D::periodic |
Indicates if the geometry is periodic (otherwise use PMLs)
Definition at line 35 of file expansion2d.hpp.
size_t plask::optical::modal::ExpansionPW2D::pil |
Index of the beginning of the left PML.
Definition at line 41 of file expansion2d.hpp.
size_t plask::optical::modal::ExpansionPW2D::pir |
Index of the beginning of the right PML.
Definition at line 42 of file expansion2d.hpp.
Component plask::optical::modal::ExpansionPW2D::polarization |
Indicates polarization if separated
Definition at line 39 of file expansion2d.hpp.
double plask::optical::modal::ExpansionPW2D::right |
Right side of the sampled area.
Definition at line 34 of file expansion2d.hpp.
|
protected |
Inverted magnetic permeability coefficients (used with for PMLs)
Definition at line 135 of file expansion2d.hpp.
Component plask::optical::modal::ExpansionPW2D::symmetry |
Indicates symmetry if symmetric
Definition at line 38 of file expansion2d.hpp.