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

Namespaces

namespace  FFT
 
namespace  python
 

Classes

struct  AdmittanceTransfer
 Base class for all solvers using reflection matrix method. More...
 
struct  BesselSolverCyl
 Reflection transformation solver in Cartesian 2D geometry. More...
 
class  Diagonalizer
 Base for the class determining and holding the necessary matrices This is the abstract base class for all diagonalizers (multi-threaded, disk-storage, MPI-using etc. More...
 
struct  Expansion
 
struct  ExpansionBessel
 
struct  ExpansionBesselFini
 
struct  ExpansionBesselInfini
 
struct  ExpansionPW2D
 
struct  ExpansionPW3D
 
struct  FourierSolver2D
 Reflection transformation solver in Cartesian 2D geometry. More...
 
struct  FourierSolver3D
 Reflection transformation solver in Cartesian 3D geometry. More...
 
struct  GradientFunctions
 
struct  ImpedanceTransfer
 Base class for all solvers using reflection matrix method. More...
 
struct  LateralMeshAdapter
 
struct  LateralMeshAdapter< SolverOver< Geometry3D > >
 
struct  LevelsAdapter
 Simple adapter that allows to process single level in the mesh. More...
 
struct  LevelsAdapterGeneric
 Generic implementation of the level adapter. More...
 
struct  LevelsAdapterRectangular
 More efficient Rectangular implementation of the level adapter. More...
 
class  Matrix
 General simple matrix template. More...
 
class  MatrixDiagonal
 General simple diagonal matrix template. More...
 
struct  ModalBase
 Common base with layer details independent on the geometry. More...
 
class  ModalSolver
 Base class for all modal solvers. More...
 
struct  PML
 Information about lateral PMLs. More...
 
struct  ReflectionTransfer
 Base class for all solvers using reflection matrix method. More...
 
class  RootBrent
 
class  RootBroyden
 
struct  RootDigger
 
struct  RootMuller
 
class  SimpleDiagonalizer
 Simple diagonalizer This class is a simple diagonalizer. More...
 
struct  TempMatrix
 
struct  TempMatrixPool
 
struct  Transfer
 Base class for Admittance and Reflection transfers. More...
 
struct  XanceTransfer
 Base class for all solvers using reflection matrix method. More...
 

Typedefs

typedef Matrix< doubledmatrix
 
typedef Matrix< dcomplex > cmatrix
 
typedef DataVector< dcomplex > cvector
 
typedef DataVector< doubledvector
 
typedef DataVector< const dcomplex > const_cvector
 
typedef MatrixDiagonal< dcomplex > cdiagonal
 

Enumerations

enum  WhichField { FIELD_E , FIELD_H }
 Field identification. More...
 
enum  PropagationDirection { PROPAGATION_TOTAL = 0 , PROPAGATION_UPWARDS = 1 , PROPAGATION_DOWNWARDS = 2 }
 Light propagation direction. More...
 

Functions

void add_vertex (int l, int t, ExpansionPW3D::Gradient &val, long double &W, const ExpansionPW3D::Gradient::Vertex &vertex)
 
double cf (const ExpansionPW3D::Coeff &c)
 
template<typename D >
void ToeplitzLevinson (const DataVector< D > &TM, Matrix< D > &X)
 Solve T X = Y equation.
 
void gaussLaguerre (size_t n, std::vector< double > &abscissae, DataVector< double > &weights, double scale=1.)
 Compute ascissae and weights for Gauss-Laguerre quadatures.
 
void gaussLegendre (size_t n, std::vector< double > &abscissae, DataVector< double > &weights)
 Compute ascissae and weights for Gauss-Legendre quadatures.
 
cmatrix invmult (cmatrix &A, cmatrix &B)
 
cvector invmult (cmatrix &A, cvector &B)
 
cmatrix inv (cmatrix &A)
 
dcomplex det (cmatrix &A)
 
int eigenv (cmatrix &A, cdiagonal &vals, cmatrix *rightv, cmatrix *leftv)
 
template<typename T >
Matrix< T > operator+ (const Matrix< T > &A, const Matrix< T > &B)
 Summation operator of the matrices.
 
template<typename T >
Matrix< T > operator- (const Matrix< T > &A, const Matrix< T > &B)
 Difference operator of the matrices.
 
template<typename T >
Matrix< T > operator- (const Matrix< T > &A)
 Negation operator of the matrix.
 
cmatrix operator* (const cmatrix &A, const cmatrix &B)
 Multiplication operator of the matrices (using BLAS level3)
 
cvector operator* (const cmatrix &A, const cvector &v)
 Multiplication operator of the matrix-vector product (using BLAS level3)
 
template<typename T >
cmatrix operator* (const Matrix< T > &A, const MatrixDiagonal< T > &B)
 Multiplication by the diagonal matrix (right)
 
template<typename T >
cmatrix operator* (const MatrixDiagonal< T > &A, const Matrix< T > &B)
 Multiplication by the diagonal matrix (left)
 
template<typename T >
void mult_matrix_by_diagonal (Matrix< T > &A, const MatrixDiagonal< T > &B)
 Multiplication of matrix by diagonal in-place (replacing A)
 
template<typename T >
void mult_diagonal_by_matrix (const MatrixDiagonal< T > &A, Matrix< T > &B)
 Multiplication of diagonal by matrix in-place (replacing B)
 
void mult_matrix_by_vector (const cmatrix &A, const const_cvector &v, cvector &dst)
 
void mult_matrix_by_matrix (const cmatrix &A, const cmatrix &B, cmatrix &dst)
 
void add_mult_matrix_by_vector (const cmatrix &A, const cvector &v, cvector &dst)
 
void add_mult_matrix_by_matrix (const cmatrix &A, const cmatrix &B, cmatrix &dst)
 
cmatrix invmult (cmatrix &&A, cmatrix &B)
 
cvector invmult (cmatrix &&A, cvector &B)
 
cmatrix inv (cmatrix &&A)
 
dcomplex det (cmatrix &&A)
 
int eigenv (cmatrix &&A, cdiagonal &vals, cmatrix *rightv=NULL, cmatrix *leftv=NULL)
 
template<typename T >
void zero_matrix (Matrix< T > &A, size_t m, size_t n)
 Zero matrix.
 
template<typename T >
void zero_matrix (Matrix< T > &A)
 Zero matrix.
 
template<typename T >
void make_unit_matrix (Matrix< T > &A, size_t n)
 Create unit matrix.
 
template<typename T >
void make_unit_matrix (Matrix< T > &A)
 Create unit matrix.
 
std::unique_ptr< LevelsAdaptermakeLevelsAdapter (const shared_ptr< const Mesh > &src)
 Adapter factory.
 
template<typename S , typename T >
patterson (const std::function< S(T)> &fun, T a, T b, double &err, unsigned *order=nullptr)
 Compute Patterson quadrature along line a-b in complex plane with specified precision.
 
template double patterson< double, double > (const std::function< double(double)> &fun, double a, double b, double &err, unsigned *order)
 

Variables

const double bessel_zeros [][100]
 
const double patterson_points []
 
const double patterson_weights [][256]
 
template class PLASK_SOLVER_API ModalSolver< SolverWithMesh< Geometry2DCartesian, MeshAxis > >
 
template class PLASK_SOLVER_API ModalSolver< SolverWithMesh< Geometry2DCylindrical, MeshAxis > >
 
template class PLASK_SOLVER_API ModalSolver< SolverOver< Geometry3D > >
 

Typedef Documentation

◆ cdiagonal

◆ cmatrix

Definition at line 336 of file matrices.hpp.

◆ const_cvector

◆ cvector

Definition at line 339 of file matrices.hpp.

◆ dmatrix

◆ dvector

Enumeration Type Documentation

◆ PropagationDirection

Light propagation direction.

Enumerator
PROPAGATION_TOTAL 

Both directions in total.

PROPAGATION_UPWARDS 

Upwards or towards the interface.

PROPAGATION_DOWNWARDS 

Downwards or outside of the interface.

Definition at line 30 of file transfer.hpp.

◆ WhichField

Field identification.

Enumerator
FIELD_E 

Electric field.

FIELD_H 

Magnetic field.

Definition at line 24 of file transfer.hpp.

Function Documentation

◆ add_mult_matrix_by_matrix()

void plask::optical::modal::add_mult_matrix_by_matrix ( const cmatrix A,
const cmatrix B,
cmatrix dst 
)
inline

Definition at line 489 of file matrices.hpp.

◆ add_mult_matrix_by_vector()

void plask::optical::modal::add_mult_matrix_by_vector ( const cmatrix A,
const cvector v,
cvector dst 
)
inline

Definition at line 479 of file matrices.hpp.

◆ add_vertex()

void plask::optical::modal::add_vertex ( int  l,
int  t,
ExpansionPW3D::Gradient val,
long double W,
const ExpansionPW3D::Gradient::Vertex vertex 
)
inline

Definition at line 283 of file expansion3d.cpp.

◆ cf()

double plask::optical::modal::cf ( const ExpansionPW3D::Coeff c)
inline

Definition at line 292 of file expansion3d.cpp.

◆ det() [1/2]

dcomplex plask::optical::modal::det ( cmatrix &&  A)
inline

Definition at line 514 of file matrices.hpp.

◆ det() [2/2]

dcomplex plask::optical::modal::det ( cmatrix A)

Definition at line 76 of file matrices.cpp.

◆ eigenv() [1/2]

int plask::optical::modal::eigenv ( cmatrix &&  A,
cdiagonal vals,
cmatrix rightv = NULL,
cmatrix leftv = NULL 
)
inline

Definition at line 515 of file matrices.hpp.

◆ eigenv() [2/2]

int plask::optical::modal::eigenv ( cmatrix A,
cdiagonal vals,
cmatrix rightv,
cmatrix leftv 
)

Definition at line 99 of file matrices.cpp.

◆ gaussLaguerre()

void plask::optical::modal::gaussLaguerre ( size_t  n,
std::vector< double > &  abscissae,
DataVector< double > &  weights,
double  scale = 1. 
)

Compute ascissae and weights for Gauss-Laguerre quadatures.

Parameters
nquadrature order
[out]abscissaecomputed abscissae
[out]weightscorresponding weights
[in]scalescale parameter in the $\exp(sx)$ weight

Definition at line 183 of file gauss_laguerre.cpp.

◆ gaussLegendre()

void plask::optical::modal::gaussLegendre ( size_t  n,
std::vector< double > &  abscissae,
DataVector< double > &  weights 
)

Compute ascissae and weights for Gauss-Legendre quadatures.

Parameters
nquadrature order
[out]abscissaecomputed abscissae
[out]weightscorresponding weights

Definition at line 23 of file gauss_legendre.cpp.

◆ inv() [1/2]

cmatrix plask::optical::modal::inv ( cmatrix &&  A)
inline

Definition at line 513 of file matrices.hpp.

◆ inv() [2/2]

cmatrix plask::optical::modal::inv ( cmatrix A)

Definition at line 59 of file matrices.cpp.

◆ invmult() [1/4]

cmatrix plask::optical::modal::invmult ( cmatrix &&  A,
cmatrix B 
)
inline

Definition at line 511 of file matrices.hpp.

◆ invmult() [2/4]

cvector plask::optical::modal::invmult ( cmatrix &&  A,
cvector B 
)
inline

Definition at line 512 of file matrices.hpp.

◆ invmult() [3/4]

cmatrix plask::optical::modal::invmult ( cmatrix A,
cmatrix B 
)

Definition at line 18 of file matrices.cpp.

◆ invmult() [4/4]

cvector plask::optical::modal::invmult ( cmatrix A,
cvector B 
)

Definition at line 39 of file matrices.cpp.

◆ make_unit_matrix() [1/2]

template<typename T >
void plask::optical::modal::make_unit_matrix ( Matrix< T > &  A)

Create unit matrix.

Definition at line 543 of file matrices.hpp.

◆ make_unit_matrix() [2/2]

template<typename T >
void plask::optical::modal::make_unit_matrix ( Matrix< T > &  A,
size_t  n 
)

Create unit matrix.

Definition at line 535 of file matrices.hpp.

◆ makeLevelsAdapter()

std::unique_ptr< LevelsAdapter > PLASK_SOLVER_API plask::optical::modal::makeLevelsAdapter ( const shared_ptr< const Mesh > &  src)

Adapter factory.

Choose the best class based on the mesh type

Parameters
srcsource mesh

Definition at line 76 of file meshadapter.cpp.

◆ mult_diagonal_by_matrix()

template<typename T >
void plask::optical::modal::mult_diagonal_by_matrix ( const MatrixDiagonal< T > &  A,
Matrix< T > &  B 
)
inline

Multiplication of diagonal by matrix in-place (replacing B)

Definition at line 444 of file matrices.hpp.

◆ mult_matrix_by_diagonal()

template<typename T >
void plask::optical::modal::mult_matrix_by_diagonal ( Matrix< T > &  A,
const MatrixDiagonal< T > &  B 
)
inline

Multiplication of matrix by diagonal in-place (replacing A)

Definition at line 430 of file matrices.hpp.

◆ mult_matrix_by_matrix()

void plask::optical::modal::mult_matrix_by_matrix ( const cmatrix A,
const cmatrix B,
cmatrix dst 
)
inline

Definition at line 466 of file matrices.hpp.

◆ mult_matrix_by_vector()

void plask::optical::modal::mult_matrix_by_vector ( const cmatrix A,
const const_cvector v,
cvector dst 
)
inline

Definition at line 456 of file matrices.hpp.

◆ operator*() [1/4]

cmatrix plask::optical::modal::operator* ( const cmatrix A,
const cmatrix B 
)
inline

Multiplication operator of the matrices (using BLAS level3)

Definition at line 379 of file matrices.hpp.

◆ operator*() [2/4]

cvector plask::optical::modal::operator* ( const cmatrix A,
const cvector v 
)
inline

Multiplication operator of the matrix-vector product (using BLAS level3)

Definition at line 388 of file matrices.hpp.

◆ operator*() [3/4]

template<typename T >
cmatrix plask::optical::modal::operator* ( const Matrix< T > &  A,
const MatrixDiagonal< T > &  B 
)
inline

Multiplication by the diagonal matrix (right)

Definition at line 399 of file matrices.hpp.

◆ operator*() [4/4]

template<typename T >
cmatrix plask::optical::modal::operator* ( const MatrixDiagonal< T > &  A,
const Matrix< T > &  B 
)
inline

Multiplication by the diagonal matrix (left)

Definition at line 416 of file matrices.hpp.

◆ operator+()

template<typename T >
Matrix< T > plask::optical::modal::operator+ ( const Matrix< T > &  A,
const Matrix< T > &  B 
)
inline

Summation operator of the matrices.

Definition at line 347 of file matrices.hpp.

◆ operator-() [1/2]

template<typename T >
Matrix< T > plask::optical::modal::operator- ( const Matrix< T > &  A)
inline

Negation operator of the matrix.

Definition at line 371 of file matrices.hpp.

◆ operator-() [2/2]

template<typename T >
Matrix< T > plask::optical::modal::operator- ( const Matrix< T > &  A,
const Matrix< T > &  B 
)
inline

Difference operator of the matrices.

Definition at line 359 of file matrices.hpp.

◆ patterson()

template<typename S , typename T >
S plask::optical::modal::patterson ( const std::function< S(T)> &  fun,
a,
b,
double err,
unsigned order = nullptr 
)

Compute Patterson quadrature along line a-b in complex plane with specified precision.

Parameters
funfunction to integrate
astarting point
bfinal point
[in,out]erron input maximum error, on output estimated error
[out]orderrequired quadrature order
Returns
computed integral

Definition at line 20 of file patterson.cpp.

◆ patterson< double, double >()

template double plask::optical::modal::patterson< double, double > ( const std::function< double(double)> &  fun,
double  a,
double  b,
double err,
unsigned order 
)

◆ ToeplitzLevinson()

template<typename D >
void plask::optical::modal::ToeplitzLevinson ( const DataVector< D > &  TM,
Matrix< D > &  X 
)

Solve T X = Y equation.

Parameters
TMToeplitz matrix data stored as: first column + first row reversed (T00 T10 T20 T02 T01)
[in,out]Xon input right-hand size (Y), on output solution (X)

Definition at line 29 of file toeplitz.hpp.

◆ zero_matrix() [1/2]

template<typename T >
void plask::optical::modal::zero_matrix ( Matrix< T > &  A)

Zero matrix.

Definition at line 529 of file matrices.hpp.

◆ zero_matrix() [2/2]

template<typename T >
void plask::optical::modal::zero_matrix ( Matrix< T > &  A,
size_t  m,
size_t  n 
)

Zero matrix.

Definition at line 522 of file matrices.hpp.

Variable Documentation

◆ bessel_zeros

const double plask::optical::modal::bessel_zeros

Definition at line 18 of file zeros-data.cpp.

◆ ModalSolver< SolverOver< Geometry3D > >

◆ ModalSolver< SolverWithMesh< Geometry2DCartesian, MeshAxis > >

◆ ModalSolver< SolverWithMesh< Geometry2DCylindrical, MeshAxis > >

◆ patterson_points

const double plask::optical::modal::patterson_points

Definition at line 18 of file patterson-data.cpp.

◆ patterson_weights

const double plask::optical::modal::patterson_weights

Definition at line 276 of file patterson-data.cpp.