PLaSK library
|
Solver performing calculations in 2D Cartesian space using effective index method. More...
#include <solvers/optical/effective/eim.hpp>
Classes | |
struct | Field |
struct | Matrix |
struct | Mode |
Details of the computed mode. More... | |
Public Types | |
enum | Symmetry { SYMMETRY_DEFAULT , SYMMETRY_POSITIVE , SYMMETRY_NEGATIVE , SYMMETRY_NONE } |
Mode symmetry in horizontal axis. More... | |
enum | Polarization { TE , TM } |
Mode polarization. More... | |
enum | Emission { FRONT , BACK } |
Direction of the possible emission. More... | |
Public Types inherited from plask::SolverWithMesh< Geometry2DCartesian, RectangularMesh< 2 > > | |
typedef RectangularMesh< 2 > | MeshType |
Type of the mesh for this solver. | |
Public Types inherited from plask::SolverOver< SpaceT > | |
typedef SpaceT | SpaceType |
of the space for this solver | |
Public Member Functions | |
EffectiveIndex2D (const std::string &name="") | |
virtual | ~EffectiveIndex2D () |
std::string | getClassName () const override |
Get name of solver. | |
std::string | getClassDescription () const override |
Get a description of this solver. | |
void | loadConfiguration (plask::XMLReader &reader, plask::Manager &manager) override |
Load configuration from given source . | |
double | getStripeX () const |
void | setStripeX (double x) |
Set position of the main stripe. | |
Polarization | getPolarization () const |
void | setPolarization (Polarization polar) |
Set new polarization. | |
dcomplex | getWavelength () const |
void | setWavelength (dcomplex wavelength) |
Set new wavelength. | |
void | setSimpleMesh () |
Set the simple mesh based on the geometry bounding boxes. | |
void | setHorizontalMesh (shared_ptr< MeshAxis > meshx) |
Set up the horizontal mesh. | |
std::vector< dcomplex > | searchVNeffs (plask::dcomplex neff1=0., plask::dcomplex neff2=0., size_t resteps=256, size_t imsteps=64, dcomplex eps=dcomplex(1e-6, 1e-9)) |
Look for the vertical effective indices within the specified range This method does not remember the determined modes! | |
size_t | findMode (dcomplex neff, Symmetry symmetry=SYMMETRY_DEFAULT) |
Find the mode around the specified effective index. | |
std::vector< size_t > | findModes (dcomplex neff1=0., dcomplex neff2=0., Symmetry symmetry=SYMMETRY_DEFAULT, size_t resteps=256, size_t imsteps=64, dcomplex eps=dcomplex(1e-6, 1e-9)) |
Find the modes within the specified range. | |
dcomplex | getVertDeterminant (dcomplex neff) |
Compute determinant for a single stripe. | |
dcomplex | getDeterminant (dcomplex neff, Symmetry sym=SYMMETRY_DEFAULT) |
Compute modal determinant for the whole matrix. | |
size_t | setMode (dcomplex neff, Symmetry sym=SYMMETRY_DEFAULT) |
Set particular value of the effective index, e.g. | |
void | clearModes () |
Clear computed modes. | |
double | getTotalAbsorption (Mode &mode) |
Compute field weights. | |
double | getTotalAbsorption (size_t num) |
Compute field weights. | |
dcomplex | getDeltaNeff (double x) |
Return lateral effective index part at specified position. | |
Public Member Functions inherited from plask::SolverWithMesh< Geometry2DCartesian, RectangularMesh< 2 > > | |
SolverWithMesh (const std::string &name="") | |
~SolverWithMesh () | |
void | loadConfiguration (XMLReader &source, Manager &manager) override |
Load configuration from given source . | |
void | parseStandardConfiguration (XMLReader &source, Manager &manager, const std::string &expected_msg="solver configuration element") |
virtual void | onMeshChange (const typename MeshT::Event &PLASK_UNUSED(evt)) |
This method is called just after the mesh has been changed. | |
void | onGeometryChange (const Geometry::Event &PLASK_UNUSED(evt)) override |
This method is called when the geometry is changed. | |
RectangularMesh< 2 > & | meshRef () const |
Get current module mesh. | |
shared_ptr< RectangularMesh< 2 > > | getMesh () const |
Get current solver mesh. | |
void | setMesh (const shared_ptr< RectangularMesh< 2 > > &mesh) |
Set new mesh for the solver. | |
void | setMesh (shared_ptr< MeshGeneratorD< MeshT::DIM > > generator) |
Set new mesh got from generator. | |
Public Member Functions inherited from plask::SolverOver< SpaceT > | |
SolverOver (const std::string &name="") | |
~SolverOver () | |
void | parseStandardConfiguration (XMLReader &source, Manager &manager, const std::string &expected_msg="solver configuration element") |
virtual void | onGeometryChange (const Geometry::Event &) |
This method is called when the geometry is changed. | |
shared_ptr< SpaceT > | getGeometry () const |
Get current solver geometry space. | |
void | setGeometry (const shared_ptr< SpaceT > &geometry) |
Set new geometry for the solver. | |
Public Member Functions inherited from plask::Solver | |
bool | initCalculation () |
This should be called on beginning of each calculation method to ensure that solver will be initialized. | |
Solver (const std::string &name="") | |
Construct uninitialized solver. | |
virtual | ~Solver () |
Virtual destructor (for subclassing). Do nothing. | |
void | parseStandardConfiguration (XMLReader &source, Manager &manager, const std::string &expected_msg="solver configuration element") |
Load standard configuration (geometry, mesh) tags from source . | |
bool | isInitialized () |
Check if solver is already initialized. | |
void | invalidate () |
This method should be and is called if something important was changed: calculation space, mesh, etc. | |
std::string | getId () const |
Get solver id. | |
std::string | getName () const |
template<typename ArgT = double, typename ValT = double> | |
DataLog< ArgT, ValT > | dataLog (const std::string &chart_name, const std::string &axis_arg_name, const std::string &axis_val_name) |
template<typename ArgT = double, typename ValT = double> | |
DataLog< ArgT, ValT > | dataLog (const std::string &axis_arg_name, const std::string &axis_val_name) |
template<typename ... Args> | |
void | writelog (LogLevel level, std::string msg, Args &&... params) const |
Log a message for this solver. | |
Protected Member Functions | |
void | onInputChange (ReceiverBase &, ReceiverBase::ChangeReason) |
Slot called when gain has changed. | |
void | onInitialize () override |
Initialize the solver. | |
void | onInvalidate () override |
Invalidate the data. | |
double | getMirrorLosses (dcomplex n) |
Compute mirror losses for specified effective mode. | |
void | updateCache () |
Update refractive index cache. | |
void | stageOne () |
Fist stage of computations Perform vertical computations. | |
void | computeWeights (size_t stripe) |
Compute field weights basing on solution for given stripe. | |
void | normalizeFields (Mode &mode, const std::vector< dcomplex, aligned_allocator< dcomplex > > &kx) |
Normalize horizontal fields, so multiplying LightMagnitude by power gives proper LightMagnitude in (V/m)² | |
dcomplex | detS1 (const dcomplex &x, const std::vector< dcomplex, aligned_allocator< dcomplex > > &NR, bool save=false) |
Compute S matrix determinant for one stripe. | |
dcomplex | detS (const dcomplex &x, Mode &mode, bool save=false) |
Return S matrix determinant for the whole structure. | |
size_t | insertMode (const Mode &mode) |
Insert mode to the list or return the index of the exiting one. | |
size_t | nmodes () const |
Return number of found modes. | |
dcomplex | getEffectiveIndex (size_t n) |
Return mode effective index. | |
const LazyData< double > | getLightMagnitude (std::size_t num, shared_ptr< const plask::MeshD< 2 > > dst_mesh, plask::InterpolationMethod=INTERPOLATION_DEFAULT) |
Method computing the distribution of light intensity. | |
const LazyData< Vec< 3, dcomplex > > | getElectricField (std::size_t num, shared_ptr< const plask::MeshD< 2 > > dst_mesh, plask::InterpolationMethod=INTERPOLATION_DEFAULT) |
Method computing the distribution of the light electric field. | |
const LazyData< dcomplex > | getRefractiveIndex (RefractiveIndex::EnumType component, shared_ptr< const MeshD< 2 > > dst_mesh, dcomplex lam, InterpolationMethod=INTERPOLATION_DEFAULT) |
Get used refractive index. | |
const LazyData< double > | getHeat (shared_ptr< const MeshD< 2 > > dst_mesh, InterpolationMethod method=INTERPOLATION_DEFAULT) |
Get generated/absorbed heat. | |
Protected Member Functions inherited from plask::SolverOver< SpaceT > | |
template<typename Boundary , typename ConditionT > | |
void | readBoundaryConditions (Manager &manager, XMLReader &reader, BoundaryConditions< Boundary, ConditionT > &dest) |
Read boundary conditions using information about the geometry of this solver. | |
Protected Attributes | |
size_t | xbegin |
First element of horizontal mesh to consider. | |
size_t | xend |
Last element of horizontal mesh to consider. | |
size_t | ybegin |
First element of vertical mesh to consider. | |
size_t | yend |
Last element of vertical mesh to consider. | |
DataLog< dcomplex, dcomplex > | log_value |
Logger for determinant. | |
std::vector< std::vector< dcomplex, aligned_allocator< dcomplex > > > | nrCache |
Cached refractive indices. | |
std::vector< Field, aligned_allocator< Field > > | yfields |
Computed horizontal and vertical fields. | |
std::vector< double, aligned_allocator< double > > | yweights |
Vertical field confinement weights. | |
std::vector< dcomplex, aligned_allocator< dcomplex > > | epsilons |
Computed effective epsilons for each stripe. | |
double | stripex |
Position of the main stripe. | |
Polarization | polarization |
Chosen light polarization. | |
bool | recompute_neffs |
Should stripe indices be recomputed. | |
dcomplex | k0 |
Cache of the normalized frequency (1/µm) | |
bool | need_gain |
Do we need to have gain. | |
Protected Attributes inherited from plask::SolverWithMesh< Geometry2DCartesian, RectangularMesh< 2 > > | |
shared_ptr< RectangularMesh< 2 > > | mesh |
Mesh over which the calculations are performed. | |
boost::signals2::connection | mesh_signal_connection |
Connection of mesh to onMeshChange method, see http://www.boost.org/doc/libs/1_55_0/doc/html/signals2/tutorial.html#idp204830936. | |
Protected Attributes inherited from plask::SolverOver< SpaceT > | |
shared_ptr< SpaceT > | geometry |
Space in which the calculations are performed. | |
Protected Attributes inherited from plask::Solver | |
bool | initialized |
true only if solver is initialized | |
Friends | |
struct | RootDigger |
Solver performing calculations in 2D Cartesian space using effective index method.
plask::optical::effective::EffectiveIndex2D::EffectiveIndex2D | ( | const std::string & | name = "" | ) |
|
inlinevirtual |
|
inline |
|
protected |
|
protected |
|
protected |
size_t plask::optical::effective::EffectiveIndex2D::findMode | ( | dcomplex | neff, |
Symmetry | symmetry = SYMMETRY_DEFAULT |
||
) |
std::vector< size_t > plask::optical::effective::EffectiveIndex2D::findModes | ( | dcomplex | neff1 = 0. , |
dcomplex | neff2 = 0. , |
||
Symmetry | symmetry = SYMMETRY_DEFAULT , |
||
size_t | resteps = 256 , |
||
size_t | imsteps = 64 , |
||
dcomplex | eps = dcomplex(1e-6, 1e-9) |
||
) |
Find the modes within the specified range.
neff1 | one corner of the range to browse |
neff2 | another corner of the range to browse |
symmetry | mode symmetry |
resteps | minimum number of steps to check function value on real contour |
imsteps | minimum number of steps to check function value on imaginary contour |
eps | approximate error for integrals |
|
inlineoverridevirtual |
Get a description of this solver.
Reimplemented from plask::Solver.
|
inlineoverridevirtual |
|
inline |
|
inline |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
|
inlineprotected |
|
inline |
|
protected |
|
inline |
double plask::optical::effective::EffectiveIndex2D::getTotalAbsorption | ( | size_t | num | ) |
Compute field weights.
num | mode number to consider |
|
inline |
|
inline |
|
overridevirtual |
Load configuration from given source
.
XML reader (source
) point to opening of this
solver tag and after return from this method should point to this solver closing tag.
source | source of configuration |
manager | manager from which information about geometry, meshes, materials, and so on can be get if needed |
Reimplemented from plask::Solver.
|
inlineprotected |
|
protected |
Normalize horizontal fields, so multiplying LightMagnitude by power gives proper LightMagnitude in (V/m)²
kx | computed horizontal propagation constants |
|
overrideprotectedvirtual |
|
inlineprotected |
|
overrideprotectedvirtual |
std::vector< dcomplex > plask::optical::effective::EffectiveIndex2D::searchVNeffs | ( | plask::dcomplex | neff1 = 0. , |
plask::dcomplex | neff2 = 0. , |
||
size_t | resteps = 256 , |
||
size_t | imsteps = 64 , |
||
dcomplex | eps = dcomplex(1e-6, 1e-9) |
||
) |
Look for the vertical effective indices within the specified range This method does not remember the determined modes!
neff1 | one corner of the range to browse |
neff2 | another corner of the range to browse |
resteps | minimum number of steps to check function value on real contour |
imsteps | minimum number of steps to check function value on imaginary contour |
eps | approximate error for integrals |
size_t plask::optical::effective::EffectiveIndex2D::setMode | ( | dcomplex | neff, |
Symmetry | sym = SYMMETRY_DEFAULT |
||
) |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
friend |
Emission plask::optical::effective::EffectiveIndex2D::emission |
|
protected |
ReceiverFor<CarriersConcentration, Geometry2DCartesian> plask::optical::effective::EffectiveIndex2D::inCarriersConcentration |
ReceiverFor<Gain, Geometry2DCartesian> plask::optical::effective::EffectiveIndex2D::inGain |
ReceiverFor<Temperature, Geometry2DCartesian> plask::optical::effective::EffectiveIndex2D::inTemperature |
|
protected |
|
protected |
std::vector<Mode> plask::optical::effective::EffectiveIndex2D::modes |
|
protected |
|
protected |
ProviderFor<Heat,Geometry2DCartesian>::Delegate plask::optical::effective::EffectiveIndex2D::outHeat |
ProviderFor<ModeLightE,Geometry2DCartesian>::Delegate plask::optical::effective::EffectiveIndex2D::outLightE |
ProviderFor<ModeLightMagnitude,Geometry2DCartesian>::Delegate plask::optical::effective::EffectiveIndex2D::outLightMagnitude |
ProviderFor<ModeEffectiveIndex>::Delegate plask::optical::effective::EffectiveIndex2D::outNeff |
ProviderFor<RefractiveIndex,Geometry2DCartesian>::Delegate plask::optical::effective::EffectiveIndex2D::outRefractiveIndex |
|
protected |
|
protected |
RootDigger::Params plask::optical::effective::EffectiveIndex2D::root |
RootDigger::Params plask::optical::effective::EffectiveIndex2D::stripe_root |
|
protected |
dcomplex plask::optical::effective::EffectiveIndex2D::vneff |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |