PLaSK library

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

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

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

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

## Classes
struct | LayerFields
| Struct containing data for computing field in a layer. More...

## Public Types
enum | Matching { MATCH_ADMITTANCE , MATCH_IMPEDANCE }
| Matching methods. More...
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 Member Functions
| ReflectionTransfer (ModalBase *solver, Expansion &expansion, Matching matching)
| ~ReflectionTransfer ()
cvector | getReflectionVector (const cvector &incident, IncidentDirection direction) override
| Get vector of reflection coefficients.
cvector | getTransmissionVector (const cvector &incident, IncidentDirection side) override
| Get vector of transmission coefficients.
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.
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< double > | getFieldMagnitude (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< double > | getScatteredFieldMagnitude (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.

## Public Attributes
Matching | matching
| Matching method at interface (admittance/impedance)
Public Attributes inherited from plask::optical::modal::Transfer
std::unique_ptr< Diagonalizer > | diagonalizer
| Diagonalizer used to compute matrix of eigenvalues and eigenvectors.
Determined | fields_determined
| Are the diagonalized fields determined for all layers?

## Protected Types
enum | { STORE_NONE , STORE_LAST , STORE_ALL }

## Protected Member Functions
void | getFinalMatrix () override
| Get the discontinuity matrix for the whole structure.
void | determineFields () override
| Determine coefficients in each layer necessary for fields calculations.
void | determineReflectedFields (const cvector &incident, IncidentDirection side) override
| Determine coefficients in each layer necessary for fields calculations.
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 | getAM (size_t start, size_t end, bool add, double mfac=1.)
| Get admittance (A) and discontinuity (M) matrices for half of the structure.
void | findReflection (std::size_t start, std::size_t end, bool emitting, int store=0)
| Find reflection matrix for the part of the structure.
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
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< double > | computeFieldMagnitude (double power, const shared_ptr< const Mesh > &dst_mesh, InterpolationMethod method, bool reflected)
| Compute light magnitude.

## Protected Attributes
cmatrix | P
| Current reflection matrix.
enum plask::optical::modal::ReflectionTransfer:: { ... } | storeP
| Do we need to keep the P matrices for both sides?
std::vector< LayerFields > | fields
| Vector of fields computed 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.
double * | rwrk
| 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.
ModalBase * | solver
| Solver containing this transfer.

## Detailed Description

Base class for all solvers using reflection matrix method.

Definition at line 27 of file reflection.hpp.

## Member Enumeration Documentation

## ◆ anonymous enum

anonymous enum
| protected

Enumerator
STORE_NONE |
STORE_LAST |
STORE_ALL |

Definition at line 44 of file reflection.hpp.

## ◆ Matching

enum plask::optical::modal::ReflectionTransfer::Matching

Matching methods.

Enumerator
MATCH_ADMITTANCE |
MATCH_IMPEDANCE |

Definition at line 35 of file reflection.hpp.

## Constructor & Destructor Documentation

## ◆ ReflectionTransfer()

plask::optical::modal::ReflectionTransfer::ReflectionTransfer | ( | ModalBase * | solver,
|  | Expansion & | expansion,
|  | Matching | matching
| ) |  |

Definition at line 29 of file reflection.cpp.

## ◆ ~ReflectionTransfer()

plask::optical::modal::ReflectionTransfer::~ReflectionTransfer | ( |  | ) |

Definition at line 41 of file reflection.cpp.

## Member Function Documentation

## ◆ determineFields()

void plask::optical::modal::ReflectionTransfer::determineFields | ( |  | ) |
| override protected virtual

Determine coefficients in each layer necessary for fields calculations.

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

Definition at line 262 of file reflection.cpp.

## ◆ determineReflectedFields()

void plask::optical::modal::ReflectionTransfer::determineReflectedFields | ( | const cvector & | incident,
|  | IncidentDirection | side
| ) |  |
| override protected virtual

Determine coefficients in each layer necessary for fields calculations.

This method is called for reflected fields.

Parameters

  incident | incident field vector
  side | incidence side

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

Definition at line 391 of file reflection.cpp.

## ◆ findReflection()

void plask::optical::modal::ReflectionTransfer::findReflection | ( | std::size_t | start,
|  | std::size_t | end,
|  | bool | emitting,
|  | int | store = `0`
| ) |  |
| protected

Find reflection matrix for the part of the structure.

Parameters

  start | starting layer
  end | last layer (reflection matrix is computed for this layer)
  emitting | should the reflection matrix in the first layer be 0?
  store | where the final P matrix should be stored if so?

Definition at line 102 of file reflection.cpp.

## ◆ getAM()

void plask::optical::modal::ReflectionTransfer::getAM | ( | size_t | start,
|  | size_t | end,
|  | bool | add,
|  | double | mfac = `1.`
| ) |  |
| protected

Get admittance (A) and discontinuity (M) matrices for half of the structure.

Parameters

  start | start of the transfer
  end | end of the transfer
  add | if `true` then M matrix is added to the previous value
  mfac | factor to multiply M matrix before addition

Definition at line 55 of file reflection.cpp.

## ◆ getFieldVectorE()

cvector plask::optical::modal::ReflectionTransfer::getFieldVectorE | ( | double | z,
|  | std::size_t | n,
|  | PropagationDirection | part = `PROPAGATION_TOTAL`
| ) |  |
| override protected virtual

Compute electric field coefficients for given z.

Parameters

  z | position within the layer
  n | layer number
  part | part of the field (forward-, backward-propagating, or total) that is wanted

Returns
  electric field coefficients

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

Definition at line 520 of file reflection.cpp.

## ◆ getFieldVectorH()

cvector plask::optical::modal::ReflectionTransfer::getFieldVectorH | ( | double | z,
|  | std::size_t | n,
|  | PropagationDirection | part = `PROPAGATION_TOTAL`
| ) |  |
| override protected virtual

Compute magnetic field coefficients for given z.

Parameters

  z | position within the layer
  n | layer number
  part | part of the field (forward-, backward-propagating, or total) that is wanted

Returns
  magnetic field coefficients

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

Definition at line 547 of file reflection.cpp.

## ◆ getFinalMatrix()

void plask::optical::modal::ReflectionTransfer::getFinalMatrix | ( |  | ) |
| override protected virtual

Get the discontinuity matrix for the whole structure.

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

Definition at line 49 of file reflection.cpp.

## ◆ getReflectionVector()

cvector plask::optical::modal::ReflectionTransfer::getReflectionVector | ( | const cvector & | incident,
|  | IncidentDirection | side
| ) |  |
| override virtual

Get vector of reflection coefficients.

Parameters

  incident | incident field profile
  side | incident light side

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

Definition at line 228 of file reflection.cpp.

## ◆ getTransmissionVector()

cvector plask::optical::modal::ReflectionTransfer::getTransmissionVector | ( | const cvector & | incident,
|  | IncidentDirection | side
| ) |  |
| override virtual

Get vector of transmission coefficients.

Parameters

  incident | incident field profile
  side | incident light side

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

Definition at line 244 of file reflection.cpp.

## ◆ integrateField()

double plask::optical::modal::ReflectionTransfer::integrateField | ( | WhichField | field,
|  | size_t | n,
|  | double | z1,
|  | double | z2
| ) |  |
| override protected virtual

Compute ½ E·conj(E) or ½ H·conj(H) integral between z1 and z2.

Parameters

  field | field to integrate
  n | layer number
  z1 | lower integration bound in local layer coordinates
  z2 | upper integration bound in local layer coordinates

Returns
  computed integral

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

Definition at line 591 of file reflection.cpp.

## Member Data Documentation

## ◆ fields

std::vector<LayerFields> plask::optical::modal::ReflectionTransfer::fields
| protected

Vector of fields computed for each layer.

Definition at line 50 of file reflection.hpp.

## ◆ matching

Matching plask::optical::modal::ReflectionTransfer::matching

Matching method at interface (admittance/impedance)

Definition at line 39 of file reflection.hpp.

## ◆ P

cmatrix plask::optical::modal::ReflectionTransfer::P
| protected

Current reflection matrix.

Definition at line 43 of file reflection.hpp.

## ◆ []

enum { ... } plask::optical::modal::ReflectionTransfer::storeP

Do we need to keep the P matrices for both sides?

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

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