PLaSK library
|
#include <solvers/optical/modal/fourier/expansion3d.hpp>
Classes | |
struct | Coeff |
struct | Gradient |
Gradient data structure (cos² and cos·sin) More... | |
Public Member Functions | |
ExpansionPW3D (FourierSolver3D *solver) | |
Create new expansion. | |
bool | symmetric_long () const |
Indicates if the expansion is a symmetric one in longitudinal direction. | |
bool | symmetric_tran () const |
Indicates if the expansion is a symmetric one in transverse direction. | |
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 lay, const shared_ptr< const typename LevelsAdapter::Level > &level, InterpolationMethod interp) override |
Get epsilons index back from expansion. | |
LazyData< double > | getGradients (GradientFunctions::EnumType what, const shared_ptr< const typename LevelsAdapter::Level > &level, InterpolationMethod interp) |
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 | getKlong () const |
void | setKlong (dcomplex k) |
dcomplex | getKtran () const |
void | setKtran (dcomplex k) |
Component | getSymmetryLong () const |
void | setSymmetryLong (Component sym) |
Component | getSymmetryTran () const |
void | setSymmetryTran (Component sym) |
size_t | idx (int l, int t) |
Get single index for x-y. | |
size_t | idxe (int l, int t) |
Get single index for x-y ignoring symmetry. | |
dcomplex | epsxx (size_t lay, int l, int t) |
Get . | |
dcomplex | epsyy (size_t lay, int l, int t) |
Get . | |
dcomplex | iepszz (size_t lay, int l, int t) |
Get . | |
dcomplex | iepszz (size_t lay, int il, int jl, int it, int jt) |
Get . | |
dcomplex | epsxy (size_t lay, int l, int t) |
Get . | |
dcomplex | eps (size_t lay, int l, int t, int c) |
Get . | |
dcomplex | epsyx (size_t lay, int l, int t) |
Get . | |
dcomplex | muxx (size_t PLASK_UNUSED(lay), int l, int t) |
Get . | |
dcomplex | muyy (size_t PLASK_UNUSED(lay), int l, int t) |
Get . | |
dcomplex | imuzz (size_t PLASK_UNUSED(lay), int l, int t) |
Get . | |
size_t | iEx (int l, int t) |
Get index. | |
size_t | iEy (int l, int t) |
Get index. | |
size_t | iHx (int l, int t) |
Get index. | |
size_t | iHy (int l, int t) |
Get index. | |
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 | klong |
Longitudinal wavevector. | |
dcomplex | ktran |
Transverse wavevector. | |
size_t | Nl |
Number of expansion coefficients in longitudinal direction. | |
size_t | Nt |
Number of expansion coefficients in transverse direction. | |
size_t | nNl |
Number of of required coefficients for material parameters in longitudinal direction. | |
size_t | nNt |
Number of of required coefficients for material parameters in transverse direction. | |
size_t | eNl |
Number of expansion coefficients in longitudinal direction ignoring symmetry. | |
size_t | eNt |
Number of expansion coefficients in transverse direction ignoring symmetry. | |
double | left |
Left side of the sampled area. | |
double | right |
Right side of the sampled area. | |
double | back |
Back side of the sampled area. | |
double | front |
Front side of the sampled area. | |
bool | periodic_long |
Indicates if the geometry is periodic (otherwise use PMLs) in longitudinal direction. | |
bool | periodic_tran |
Indicates if the geometry is periodic (otherwise use PMLs) in transverse direction. | |
bool | initialized |
Expansion is initialized. | |
Component | symmetry_long |
Indicates symmetry if symmetric in longitudinal direction. | |
Component | symmetry_tran |
Indicates symmetry if symmetric in transverse direction. | |
size_t | pil |
Index of the beginning of the left PML. | |
size_t | pir |
Index of the beginning of the right PML. | |
size_t | pif |
Index of the beginning of the front PML. | |
size_t | pib |
Index of the beginning of the back PML. | |
std::vector< DataVector< Coeff > > | coeffs |
Cached permittivity expansion coefficients. | |
std::vector< DataVector< Gradient > > | gradients |
Cached gradients data. | |
std::vector< cmatrix > | coeffs_ezz |
Cached ε_zz, Δε_xx, and Δε_yy matrices. | |
std::vector< cmatrix > | coeffs_dexx |
std::vector< cmatrix > | coeffs_deyy |
std::vector< bool > | diagonals |
Information if the layer is diagonal. | |
shared_ptr< RectangularMesh< 3 > > | mesh |
Mesh for getting material data. | |
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. | |
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< Tensor2< dcomplex > > | mag_long |
Magnetic permeability coefficients in longitudinal direction (used with for PMLs) | |
DataVector< Tensor2< dcomplex > > | mag_tran |
Magnetic permeability coefficients in transverse direction (used with for PMLs) | |
FFT::Forward2D | matFFT |
FFT object for material coefficients. | |
FFT::Forward2D | cos2FFT |
FFT::Forward2D | cssnFFT |
FFT object for gradients. | |
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 36 of file expansion3d.hpp.
plask::optical::modal::ExpansionPW3D::ExpansionPW3D | ( | FourierSolver3D * | solver | ) |
Create new expansion.
solver | solver which performs calculations |
Definition at line 28 of file expansion3d.cpp.
|
overrideprotected |
Definition at line 275 of file expansion3d.cpp.
|
overridevirtual |
Cleanup after computatiations of the fields.
Reimplemented from plask::optical::modal::Expansion.
Definition at line 1189 of file expansion3d.cpp.
|
inlineoverride |
Definition at line 159 of file expansion3d.hpp.
Get .
Definition at line 350 of file expansion3d.hpp.
Get .
Definition at line 313 of file expansion3d.hpp.
Get .
Definition at line 343 of file expansion3d.hpp.
Get .
Definition at line 357 of file expansion3d.hpp.
Get .
Definition at line 320 of file expansion3d.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 1451 of file expansion3d.cpp.
|
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 1198 of file expansion3d.cpp.
LazyData< double > plask::optical::modal::ExpansionPW3D::getGradients | ( | GradientFunctions::EnumType | what, |
const shared_ptr< const typename LevelsAdapter::Level > & | level, | ||
InterpolationMethod | interp | ||
) |
Definition at line 1616 of file expansion3d.cpp.
|
inline |
Definition at line 262 of file expansion3d.hpp.
|
inline |
Definition at line 270 of file expansion3d.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 826 of file expansion3d.cpp.
|
overridevirtual |
Get RE anf RH matrices.
layer | layer number | |
[out] | RE,RH | resulting matrix |
Implements plask::optical::modal::Expansion.
Definition at line 916 of file expansion3d.cpp.
|
inline |
Definition at line 278 of file expansion3d.hpp.
|
inline |
Definition at line 286 of file expansion3d.hpp.
Get single index for x-y.
Definition at line 295 of file expansion3d.hpp.
Get single index for x-y ignoring symmetry.
Definition at line 304 of file expansion3d.hpp.
|
inline |
Get .
Definition at line 334 of file expansion3d.hpp.
Get .
Definition at line 327 of file expansion3d.hpp.
Get index.
Definition at line 369 of file expansion3d.hpp.
Get index.
Definition at line 374 of file expansion3d.hpp.
Get index.
Definition at line 379 of file expansion3d.hpp.
Get index.
Definition at line 384 of file expansion3d.hpp.
|
inline |
Get .
Definition at line 366 of file expansion3d.hpp.
void plask::optical::modal::ExpansionPW3D::init | ( | ) |
Init expansion.
compute_coeffs | compute material coefficients |
Definition at line 31 of file expansion3d.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 1492 of file expansion3d.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 1436 of file expansion3d.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 294 of file expansion3d.cpp.
|
inlineoverridevirtual |
Return size of the expansion matrix (equal to the number of expansion coefficients)
Implements plask::optical::modal::Expansion.
Definition at line 163 of file expansion3d.hpp.
Get .
Definition at line 360 of file expansion3d.hpp.
Get .
Definition at line 363 of file expansion3d.hpp.
|
overridevirtual |
Prepare for computatiations of the fields.
Reimplemented from plask::optical::modal::Expansion.
Definition at line 1155 of file expansion3d.cpp.
void plask::optical::modal::ExpansionPW3D::reset | ( | ) |
Free allocated memory.
Definition at line 263 of file expansion3d.cpp.
|
inline |
Definition at line 263 of file expansion3d.hpp.
|
inline |
Definition at line 271 of file expansion3d.hpp.
Definition at line 279 of file expansion3d.hpp.
Definition at line 287 of file expansion3d.hpp.
|
inline |
Indicates if the expansion is a symmetric one in longitudinal direction.
Definition at line 145 of file expansion3d.hpp.
|
inline |
Indicates if the expansion is a symmetric one in transverse direction.
Definition at line 148 of file expansion3d.hpp.
double plask::optical::modal::ExpansionPW3D::back |
Back side of the sampled area.
Definition at line 50 of file expansion3d.hpp.
std::vector<DataVector<Coeff> > plask::optical::modal::ExpansionPW3D::coeffs |
Cached permittivity expansion coefficients.
Definition at line 101 of file expansion3d.hpp.
std::vector<cmatrix> plask::optical::modal::ExpansionPW3D::coeffs_dexx |
Definition at line 130 of file expansion3d.hpp.
std::vector<cmatrix> plask::optical::modal::ExpansionPW3D::coeffs_deyy |
Definition at line 130 of file expansion3d.hpp.
std::vector<cmatrix> plask::optical::modal::ExpansionPW3D::coeffs_ezz |
Cached ε_zz, Δε_xx, and Δε_yy matrices.
Definition at line 130 of file expansion3d.hpp.
|
protected |
Definition at line 254 of file expansion3d.hpp.
|
protected |
FFT object for gradients.
Definition at line 254 of file expansion3d.hpp.
std::vector<bool> plask::optical::modal::ExpansionPW3D::diagonals |
Information if the layer is diagonal.
Definition at line 133 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::eNl |
Number of expansion coefficients in longitudinal direction ignoring symmetry.
Definition at line 45 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::eNt |
Number of expansion coefficients in transverse direction ignoring symmetry.
Definition at line 46 of file expansion3d.hpp.
double plask::optical::modal::ExpansionPW3D::front |
Front side of the sampled area.
Definition at line 51 of file expansion3d.hpp.
std::vector<DataVector<Gradient> > plask::optical::modal::ExpansionPW3D::gradients |
Cached gradients data.
Definition at line 127 of file expansion3d.hpp.
bool plask::optical::modal::ExpansionPW3D::initialized |
Expansion is initialized.
Definition at line 54 of file expansion3d.hpp.
dcomplex plask::optical::modal::ExpansionPW3D::klong |
Longitudinal wavevector.
Definition at line 38 of file expansion3d.hpp.
dcomplex plask::optical::modal::ExpansionPW3D::ktran |
Transverse wavevector.
Definition at line 39 of file expansion3d.hpp.
double plask::optical::modal::ExpansionPW3D::left |
Left side of the sampled area.
Definition at line 48 of file expansion3d.hpp.
|
protected |
Magnetic permeability coefficients in longitudinal direction (used with for PMLs)
Definition at line 250 of file expansion3d.hpp.
|
protected |
Magnetic permeability coefficients in transverse direction (used with for PMLs)
Definition at line 251 of file expansion3d.hpp.
|
protected |
FFT object for material coefficients.
Definition at line 253 of file expansion3d.hpp.
shared_ptr<RectangularMesh<3> > plask::optical::modal::ExpansionPW3D::mesh |
Mesh for getting material data.
Definition at line 136 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::Nl |
Number of expansion coefficients in longitudinal direction.
Definition at line 41 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::nNl |
Number of of required coefficients for material parameters in longitudinal direction.
Definition at line 43 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::nNt |
Number of of required coefficients for material parameters in transverse direction.
Definition at line 44 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::Nt |
Number of expansion coefficients in transverse direction.
Definition at line 42 of file expansion3d.hpp.
bool plask::optical::modal::ExpansionPW3D::periodic_long |
Indicates if the geometry is periodic (otherwise use PMLs) in longitudinal direction.
Definition at line 52 of file expansion3d.hpp.
bool plask::optical::modal::ExpansionPW3D::periodic_tran |
Indicates if the geometry is periodic (otherwise use PMLs) in transverse direction.
Definition at line 53 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::pib |
Index of the beginning of the back PML.
Refractive index expansion coefficients
Definition at line 62 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::pif |
Index of the beginning of the front PML.
Definition at line 61 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::pil |
Index of the beginning of the left PML.
Definition at line 59 of file expansion3d.hpp.
size_t plask::optical::modal::ExpansionPW3D::pir |
Index of the beginning of the right PML.
Definition at line 60 of file expansion3d.hpp.
double plask::optical::modal::ExpansionPW3D::right |
Right side of the sampled area.
Definition at line 49 of file expansion3d.hpp.
Component plask::optical::modal::ExpansionPW3D::symmetry_long |
Indicates symmetry if symmetric
in longitudinal direction.
Definition at line 56 of file expansion3d.hpp.
Component plask::optical::modal::ExpansionPW3D::symmetry_tran |
Indicates symmetry if symmetric
in transverse direction.
Definition at line 57 of file expansion3d.hpp.