PLaSK library
Loading...
Searching...
No Matches
plask::electrical::diffusion::Diffusion3DSolver Struct Reference

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

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

Inheritance diagram for plask::electrical::diffusion::Diffusion3DSolver:
[legend]
Collaboration diagram for plask::electrical::diffusion::Diffusion3DSolver:
[legend]

Classes

struct  ConcentrationDataImpl
 

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)
 
 Diffusion3DSolver (const std::string &name="")
 
 ~Diffusion3DSolver ()
 
size_t activeRegionsCount () const
 
double get_burning_integral_for_mode (size_t mode) const
 
double get_burning_integral () const
 
- Public Member Functions inherited from plask::FemSolverWithMesh< Geometry3D, RectangularMesh< 3 > >
 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, Geometry3DinCurrentDensity
 
ReceiverFor< Temperature, Geometry3DinTemperature
 
ReceiverFor< Gain, Geometry3DinGain
 
ReceiverFor< ModeWavelengthinWavelength
 
ReceiverFor< ModeLightE, Geometry3DinLightE
 
ProviderFor< CarriersConcentration, Geometry3D >::Delegate outCarriersConcentration
 
- Public Attributes inherited from plask::FemSolverWithMesh< Geometry3D, RectangularMesh< 3 > >
FemMatrixAlgorithm algorithm
 Factorization algorithm to use.
 
IterativeMatrixParams iter_params
 Parameters of iterative solver.
 

Protected Member Functions

void setLocalMatrix (FemMatrix &K, DataVector< double > &F, const ElementParams3D e, const double A, const double B, const double C, const double D, const double *U, const double *J)
 Make local stiffness matrix and load vector.
 
void addLocalBurningMatrix (FemMatrix &K, DataVector< double > &F, const ElementParams3D e, const Tensor2< double > G, const Tensor2< double > dG, const double Ug, const Tensor2< double > *P)
 Add local stiffness matrix and load vector for SHB.
 
template<typename T >
integrateBilinear (const double Lx, const double Ly, const T *P)
 Integrate bilinearly changing function over an element.
 
void onInitialize () override
 Initialize the solver.
 
void onInvalidate () override
 Invalidate the data.
 
void setupActiveRegions ()
 Get info on active region.
 
const LazyData< doublegetConcentration (CarriersConcentration::EnumType what, shared_ptr< const MeshD< 3 > > dest_mesh, InterpolationMethod interpolation=INTERPOLATION_DEFAULT) const
 
- 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, ActiveRegion3Dactive
 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

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

Definition at line 141 of file diffusion3d.hpp.

Constructor & Destructor Documentation

◆ Diffusion3DSolver()

plask::electrical::diffusion::Diffusion3DSolver::Diffusion3DSolver ( const std::string &  name = "")

Definition at line 25 of file diffusion3d.cpp.

◆ ~Diffusion3DSolver()

plask::electrical::diffusion::Diffusion3DSolver::~Diffusion3DSolver ( )

Definition at line 51 of file diffusion3d.cpp.

Member Function Documentation

◆ activeRegionsCount()

size_t plask::electrical::diffusion::Diffusion3DSolver::activeRegionsCount ( ) const
inline

Definition at line 255 of file diffusion3d.hpp.

◆ addLocalBurningMatrix()

void plask::electrical::diffusion::Diffusion3DSolver::addLocalBurningMatrix ( FemMatrix K,
DataVector< double > &  F,
const ElementParams3D  e,
const Tensor2< double G,
const Tensor2< double dG,
const double  Ug,
const Tensor2< double > *  P 
)
inlineprotected

Add local stiffness matrix and load vector for SHB.

Definition at line 200 of file diffusion3d.cpp.

◆ compute() [1/2]

double plask::electrical::diffusion::Diffusion3DSolver::compute ( unsigned  loops,
bool  shb,
size_t  act 
)

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 206 of file diffusion3d.cpp.

◆ compute() [2/2]

double plask::electrical::diffusion::Diffusion3DSolver::compute ( unsigned  loops = 0,
bool  shb = false 
)
inline

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 240 of file diffusion3d.hpp.

◆ get_burning_integral()

double plask::electrical::diffusion::Diffusion3DSolver::get_burning_integral ( ) const

Definition at line 399 of file diffusion3d.cpp.

◆ get_burning_integral_for_mode()

double plask::electrical::diffusion::Diffusion3DSolver::get_burning_integral_for_mode ( size_t  mode) const

Definition at line 386 of file diffusion3d.cpp.

◆ getClassName()

std::string plask::electrical::diffusion::Diffusion3DSolver::getClassName ( ) const
inlineoverridevirtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

Definition at line 223 of file diffusion3d.hpp.

◆ getConcentration()

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

Definition at line 495 of file diffusion3d.cpp.

◆ integrateBilinear()

template<typename T >
T plask::electrical::diffusion::Diffusion3DSolver::integrateBilinear ( const double  Lx,
const double  Ly,
const T *  P 
)
inlineprotected

Integrate bilinearly changing function over an element.

Definition at line 180 of file diffusion3d.hpp.

◆ loadConfiguration()

void plask::electrical::diffusion::Diffusion3DSolver::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 34 of file diffusion3d.cpp.

◆ onInitialize()

void plask::electrical::diffusion::Diffusion3DSolver::onInitialize ( )
overrideprotectedvirtual

Initialize the solver.

Reimplemented from plask::Solver.

Definition at line 180 of file diffusion3d.cpp.

◆ onInvalidate()

void plask::electrical::diffusion::Diffusion3DSolver::onInvalidate ( )
overrideprotectedvirtual

Invalidate the data.

Reimplemented from plask::Solver.

Definition at line 192 of file diffusion3d.cpp.

◆ parseConfiguration()

void plask::electrical::diffusion::Diffusion3DSolver::parseConfiguration ( XMLReader source,
Manager manager 
)

Definition at line 38 of file diffusion3d.cpp.

◆ setLocalMatrix()

void plask::electrical::diffusion::Diffusion3DSolver::setLocalMatrix ( FemMatrix K,
DataVector< double > &  F,
const ElementParams3D  e,
const double  A,
const double  B,
const double  C,
const double  D,
const double U,
const double J 
)
inlineprotected

Make local stiffness matrix and load vector.

Definition at line 195 of file diffusion3d.cpp.

◆ setupActiveRegions()

void plask::electrical::diffusion::Diffusion3DSolver::setupActiveRegions ( )
protected

Get info on active region.

Definition at line 89 of file diffusion3d.cpp.

Member Data Documentation

◆ active

std::map<size_t, ActiveRegion3D> plask::electrical::diffusion::Diffusion3DSolver::active
protected

Active regions information.

Definition at line 157 of file diffusion3d.hpp.

◆ inCurrentDensity

ReceiverFor<CurrentDensity, Geometry3D> plask::electrical::diffusion::Diffusion3DSolver::inCurrentDensity

Definition at line 211 of file diffusion3d.hpp.

◆ inGain

ReceiverFor<Gain, Geometry3D> plask::electrical::diffusion::Diffusion3DSolver::inGain

Definition at line 215 of file diffusion3d.hpp.

◆ inLightE

ReceiverFor<ModeLightE, Geometry3D> plask::electrical::diffusion::Diffusion3DSolver::inLightE

Definition at line 219 of file diffusion3d.hpp.

◆ inTemperature

ReceiverFor<Temperature, Geometry3D> plask::electrical::diffusion::Diffusion3DSolver::inTemperature

Definition at line 213 of file diffusion3d.hpp.

◆ inWavelength

ReceiverFor<ModeWavelength> plask::electrical::diffusion::Diffusion3DSolver::inWavelength

Definition at line 217 of file diffusion3d.hpp.

◆ loopno

int plask::electrical::diffusion::Diffusion3DSolver::loopno
protected

Data for active region.

Number of completed loops

Definition at line 144 of file diffusion3d.hpp.

◆ maxerr

double plask::electrical::diffusion::Diffusion3DSolver::maxerr

Maximum relative current density correction accepted as convergence.

Definition at line 206 of file diffusion3d.hpp.

◆ outCarriersConcentration

ProviderFor<CarriersConcentration,Geometry3D>::Delegate plask::electrical::diffusion::Diffusion3DSolver::outCarriersConcentration

Definition at line 221 of file diffusion3d.hpp.

◆ toterr

double plask::electrical::diffusion::Diffusion3DSolver::toterr
protected

Maximum estimated error during all iterations.

Definition at line 145 of file diffusion3d.hpp.

◆ voltage_boundary

BoundaryConditions<RectangularMesh<2>::Boundary, double> plask::electrical::diffusion::Diffusion3DSolver::voltage_boundary

Boundary condition.

Definition at line 209 of file diffusion3d.hpp.


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