PLaSK library
Loading...
Searching...
No Matches
plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType > Struct Template Reference

Solver performing calculations in 2D Cartesian or Cylindrical space using finite element method. More...

#include <solvers/electrical/diffusion/diffusion2d.hpp>

Inheritance diagram for plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >:
[legend]
Collaboration diagram for plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >:
[legend]

Classes

struct  ConcentrationDataImpl
 
struct  From1DGenerator
 

Public Member Functions

std::string getClassName () const override
 Get name of solver.
 
double compute (unsigned loops, bool shb, size_t act)
 Run calculations for specified active region.
 
double compute (unsigned loops=0, bool shb=false)
 Run calculations for all active regions.
 
void loadConfiguration (XMLReader &source, Manager &manager) override
 Load configuration from given source.
 
void parseConfiguration (XMLReader &source, Manager &manager)
 
 Diffusion2DSolver (const std::string &name="")
 
 ~Diffusion2DSolver ()
 
void setMesh (shared_ptr< MeshD< 1 > > mesh)
 
void setMesh (shared_ptr< MeshGeneratorD< 1 > > generator)
 
size_t activeRegionsCount () const
 
double get_burning_integral_for_mode (size_t mode) const
 
double get_burning_integral () const
 
std::string getClassName () const
 Get name of solver.
 
std::string getClassName () const
 Get name of solver.
 
- Public Member Functions inherited from plask::FemSolverWithMesh< Geometry2DType, RectangularMesh< 2 > >
 FemSolverWithMesh (const std::string &name="")
 
bool parseFemConfiguration (XMLReader &reader, Manager &manager)
 
FemMatrixgetMatrix ()
 
FemMatrixgetMatrix ()
 
- Public Member Functions inherited from plask::SolverWithMesh< SpaceT, MeshT >
 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.
 
MeshTmeshRef () const
 Get current module mesh.
 
shared_ptr< MeshTgetMesh () const
 Get current solver mesh.
 
void setMesh (const shared_ptr< MeshT > &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< SpaceTgetGeometry () 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
 
virtual std::string getClassDescription () const
 Get a description of this solver.
 
template<typename ArgT = double, typename ValT = double>
DataLog< ArgT, ValTdataLog (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, ValTdataLog (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.
 

Public Attributes

double maxerr
 Maximum relative current density correction accepted as convergence.
 
BoundaryConditions< RectangularMesh< 2 >::Boundary, doublevoltage_boundary
 Boundary condition.
 
ReceiverFor< CurrentDensity, Geometry2DTypeinCurrentDensity
 
ReceiverFor< Temperature, Geometry2DTypeinTemperature
 
ReceiverFor< Gain, Geometry2DTypeinGain
 
ReceiverFor< ModeWavelengthinWavelength
 
ReceiverFor< ModeLightE, Geometry2DTypeinLightE
 
ProviderFor< CarriersConcentration, Geometry2DType >::Delegate outCarriersConcentration
 
- Public Attributes inherited from plask::FemSolverWithMesh< Geometry2DType, RectangularMesh< 2 > >
FemMatrixAlgorithm algorithm
 Factorization algorithm to use.
 
IterativeMatrixParams iter_params
 Parameters of iterative solver.
 

Protected Member Functions

void setLocalMatrix (const double R, const double L, const double L2, const double L3, const double L4, const double L5, const double L6, const double A, const double B, const double C, const double D, const double *U, const double *J, double &K00, double &K01, double &K02, double &K03, double &K11, double &K12, double &K13, double &K22, double &K23, double &K33, double &F0, double &F1, double &F2, double &F3)
 Make local stiffness matrix and load vector.
 
void addLocalBurningMatrix (const double R, const double L, const double L2, const double L3, const double *P, const double *g, const double *dg, const double ug, double &K00, double &K01, double &K02, double &K03, double &K11, double &K12, double &K13, double &K22, double &K23, double &K33, double &F0, double &F1, double &F2, double &F3)
 Add local stiffness matrix and load vector for SHB.
 
template<typename T >
integrateLinear (const double R, const double L, const T *P)
 Integrate linearly changing function over an element.
 
void onInitialize () override
 Initialize the solver.
 
void onInvalidate () override
 Invalidate the data.
 
void setupActiveRegion2Ds ()
 Get info on active region.
 
size_t isActive (const Vec< 2 > &point) const
 Return true if the specified point is at junction.
 
size_t isActive (const RectangularMesh2D::Element &element) const
 Return true if the specified element is a junction.
 
const LazyData< doublegetConcentration (CarriersConcentration::EnumType what, shared_ptr< const MeshD< 2 > > dest_mesh, InterpolationMethod interpolation=INTERPOLATION_DEFAULT) const
 
void setLocalMatrix (const double, const double L, const double L2, const double L3, const double L4, const double L5, const double L6, const double A, const double B, const double C, const double D, const double *U, const double *J, double &K00, double &K01, double &K02, double &K03, double &K11, double &K12, double &K13, double &K22, double &K23, double &K33, double &F0, double &F1, double &F2, double &F3)
 
void setLocalMatrix (const double R, const double L, const double L2, const double L3, const double L4, const double L5, const double L6, const double A, const double B, const double C, const double D, const double *U, const double *J, double &K00, double &K01, double &K02, double &K03, double &K11, double &K12, double &K13, double &K22, double &K23, double &K33, double &F0, double &F1, double &F2, double &F3)
 
void addLocalBurningMatrix (const double, const double L, const double L2, const double L3, const double *P, const double *g, const double *dg, const double ug, double &K00, double &K01, double &K02, double &K03, double &K11, double &K12, double &K13, double &K22, double &K23, double &K33, double &F0, double &F1, double &F2, double &F3)
 
void addLocalBurningMatrix (const double R, const double L, const double L2, const double L3, const double *P, const double *g, const double *dg, const double ug, double &K00, double &K01, double &K02, double &K03, double &K11, double &K12, double &K13, double &K22, double &K23, double &K33, double &F0, double &F1, double &F2, double &F3)
 
integrateLinear (const double R, const double L, const T *P)
 
integrateLinear (const double R, const double L, const T *P)
 
- 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

int loopno
 Data for active region.
 
double toterr
 Maximum estimated error during all iterations.
 
std::map< size_t, ActiveRegion2Dactive
 Active regions information.
 
- Protected Attributes inherited from plask::SolverWithMesh< SpaceT, MeshT >
shared_ptr< MeshTmesh
 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< SpaceTgeometry
 Space in which the calculations are performed.
 
- Protected Attributes inherited from plask::Solver
bool initialized
 true only if solver is initialized
 

Additional Inherited Members

- Public Types inherited from plask::SolverWithMesh< SpaceT, MeshT >
typedef MeshT MeshType
 Type of the mesh for this solver.
 
- Public Types inherited from plask::SolverOver< SpaceT >
typedef SpaceT SpaceType
 of the space for this solver
 

Detailed Description

template<typename Geometry2DType>
struct plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >

Solver performing calculations in 2D Cartesian or Cylindrical space using finite element method.

Definition at line 111 of file diffusion2d.hpp.

Constructor & Destructor Documentation

◆ Diffusion2DSolver()

plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::Diffusion2DSolver ( const std::string &  name = "")

Definition at line 24 of file diffusion2d.cpp.

◆ ~Diffusion2DSolver()

Member Function Documentation

◆ activeRegionsCount()

size_t plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::activeRegionsCount ( ) const
inline

Definition at line 305 of file diffusion2d.hpp.

◆ addLocalBurningMatrix() [1/3]

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DCylindrical >::addLocalBurningMatrix ( const double  R,
const double  L,
const double  L2,
const double  L3,
const double P,
const double g,
const double dg,
const double  ug,
double K00,
double K01,
double K02,
double K03,
double K11,
double K12,
double K13,
double K22,
double K23,
double K33,
double F0,
double F1,
double F2,
double F3 
)
inlineprotected

Definition at line 268 of file diffusion2d.cpp.

◆ addLocalBurningMatrix() [2/3]

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::addLocalBurningMatrix ( const double  R,
const double  L,
const double  L2,
const double  L3,
const double P,
const double g,
const double dg,
const double  ug,
double K00,
double K01,
double K02,
double K03,
double K11,
double K12,
double K13,
double K22,
double K23,
double K33,
double F0,
double F1,
double F2,
double F3 
)
inlineprotected

Add local stiffness matrix and load vector for SHB.

◆ addLocalBurningMatrix() [3/3]

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DCartesian >::addLocalBurningMatrix ( const double  ,
const double  L,
const double  L2,
const double  L3,
const double P,
const double g,
const double dg,
const double  ug,
double K00,
double K01,
double K02,
double K03,
double K11,
double K12,
double K13,
double K22,
double K23,
double K33,
double F0,
double F1,
double F2,
double F3 
)
inlineprotected

Definition at line 244 of file diffusion2d.cpp.

◆ compute() [1/2]

Run calculations for specified active region.

Parameters
loopsmaximum number of loops to run
actactive region number to calculate
shbtrue if spatial hole burning should be taken into account
Returns
max correction of potential against the last call

Definition at line 306 of file diffusion2d.cpp.

◆ compute() [2/2]

Run calculations for all active regions.

Parameters
loopsmaximum number of loops to run
shbtrue if spatial hole burning should be taken into account
Returns
max correction of potential against the last call

Definition at line 277 of file diffusion2d.hpp.

◆ get_burning_integral()

Definition at line 510 of file diffusion2d.cpp.

◆ get_burning_integral_for_mode()

double plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::get_burning_integral_for_mode ( size_t  mode) const

Definition at line 498 of file diffusion2d.cpp.

◆ getClassName() [1/3]

std::string plask::electrical::diffusion::Diffusion2DSolver< Geometry2DCartesian >::getClassName ( ) const
virtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

Definition at line 599 of file diffusion2d.cpp.

◆ getClassName() [2/3]

std::string plask::electrical::diffusion::Diffusion2DSolver< Geometry2DCylindrical >::getClassName ( ) const
virtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

Definition at line 600 of file diffusion2d.cpp.

◆ getClassName() [3/3]

std::string plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::getClassName ( ) const
overridevirtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

◆ getConcentration()

const LazyData< double > plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::getConcentration ( CarriersConcentration::EnumType  what,
shared_ptr< const MeshD< 2 > >  dest_mesh,
InterpolationMethod  interpolation = INTERPOLATION_DEFAULT 
) const
protected

Definition at line 590 of file diffusion2d.cpp.

◆ integrateLinear() [1/3]

T plask::electrical::diffusion::Diffusion2DSolver< Geometry2DCartesian >::integrateLinear ( const double  R,
const double  L,
const T *  P 
)
inlineprotected

Definition at line 294 of file diffusion2d.cpp.

◆ integrateLinear() [2/3]

T plask::electrical::diffusion::Diffusion2DSolver< Geometry2DCylindrical >::integrateLinear ( const double  R,
const double  L,
const T *  P 
)
inlineprotected

Definition at line 302 of file diffusion2d.cpp.

◆ integrateLinear() [3/3]

template<typename T >
T plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::integrateLinear ( const double  R,
const double  L,
const T *  P 
)
inlineprotected

Integrate linearly changing function over an element.

◆ isActive() [1/2]

Return true if the specified element is a junction.

Definition at line 226 of file diffusion2d.hpp.

◆ isActive() [2/2]

size_t plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::isActive ( const Vec< 2 > &  point) const
inlineprotected

Return true if the specified point is at junction.

Parameters
pointpoint to test
Returns
number of active region + 1 (0 for none)

Definition at line 200 of file diffusion2d.hpp.

◆ loadConfiguration()

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::loadConfiguration ( XMLReader source,
Manager manager 
)
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.

Parameters
sourcesource of configuration
managermanager from which information about geometry, meshes, materials, and so on can be get if needed

Reimplemented from plask::Solver.

Definition at line 32 of file diffusion2d.cpp.

◆ onInitialize()

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::onInitialize ( )
overrideprotectedvirtual

Initialize the solver.

Reimplemented from plask::Solver.

Definition at line 179 of file diffusion2d.cpp.

◆ onInvalidate()

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::onInvalidate ( )
overrideprotectedvirtual

Invalidate the data.

Reimplemented from plask::Solver.

Definition at line 190 of file diffusion2d.cpp.

◆ parseConfiguration()

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::parseConfiguration ( XMLReader source,
Manager manager 
)

Definition at line 36 of file diffusion2d.cpp.

◆ setLocalMatrix() [1/3]

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DCylindrical >::setLocalMatrix ( const double  R,
const double  L,
const double  L2,
const double  L3,
const double  L4,
const double  L5,
const double  L6,
const double  A,
const double  B,
const double  C,
const double  D,
const double U,
const double J,
double K00,
double K01,
double K02,
double K03,
double K11,
double K12,
double K13,
double K22,
double K23,
double K33,
double F0,
double F1,
double F2,
double F3 
)
inlineprotected

Definition at line 219 of file diffusion2d.cpp.

◆ setLocalMatrix() [2/3]

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::setLocalMatrix ( const double  R,
const double  L,
const double  L2,
const double  L3,
const double  L4,
const double  L5,
const double  L6,
const double  A,
const double  B,
const double  C,
const double  D,
const double U,
const double J,
double K00,
double K01,
double K02,
double K03,
double K11,
double K12,
double K13,
double K22,
double K23,
double K33,
double F0,
double F1,
double F2,
double F3 
)
inlineprotected

Make local stiffness matrix and load vector.

◆ setLocalMatrix() [3/3]

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DCartesian >::setLocalMatrix ( const double  ,
const double  L,
const double  L2,
const double  L3,
const double  L4,
const double  L5,
const double  L6,
const double  A,
const double  B,
const double  C,
const double  D,
const double U,
const double J,
double K00,
double K01,
double K02,
double K03,
double K11,
double K12,
double K13,
double K22,
double K23,
double K33,
double F0,
double F1,
double F2,
double F3 
)
inlineprotected

Definition at line 194 of file diffusion2d.cpp.

◆ setMesh() [1/2]

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::setMesh ( shared_ptr< MeshD< 1 > >  mesh)
inline

Definition at line 294 of file diffusion2d.hpp.

◆ setMesh() [2/2]

void plask::electrical::diffusion::Diffusion2DSolver< Geometry2DType >::setMesh ( shared_ptr< MeshGeneratorD< 1 > >  generator)
inline

Definition at line 303 of file diffusion2d.hpp.

◆ setupActiveRegion2Ds()

Get info on active region.

Definition at line 77 of file diffusion2d.cpp.

Member Data Documentation

◆ active

Active regions information.

Definition at line 127 of file diffusion2d.hpp.

◆ inCurrentDensity

◆ inGain

◆ inLightE

◆ inTemperature

◆ inWavelength

◆ loopno

Data for active region.

Number of completed loops

Definition at line 114 of file diffusion2d.hpp.

◆ maxerr

Maximum relative current density correction accepted as convergence.

Definition at line 243 of file diffusion2d.hpp.

◆ outCarriersConcentration

◆ toterr

Maximum estimated error during all iterations.

Definition at line 115 of file diffusion2d.hpp.

◆ voltage_boundary


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