PLaSK library

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
plask::SolverOver< SpaceT > Class Template Reference

Base class for all solvers operating on specified space. More...

`#include <plask/solver.hpp>`

Inheritance diagram for plask::SolverOver< SpaceT >:
[legend]
Collaboration diagram for plask::SolverOver< SpaceT >:
[legend]

## Public Types
typedef SpaceT | SpaceType
| of the space for this solver

## Public Member Functions
| SolverOver (const std::string &name="")
| ~SolverOver ()
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 | 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.
virtual std::string | getClassName () const =0
| Get name of solver.
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, 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
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 Member Functions inherited from plask::Solver
virtual void | onInitialize ()
| Initialize the solver.
virtual void | onInvalidate ()
| This method is called by invalidate() to reset stored values.

## Protected Attributes
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

## Detailed Description

template<typename SpaceT>
class plask::SolverOver< SpaceT >

Base class for all solvers operating on specified space.

Definition at line 676 of file solver.hpp.

## Member Typedef Documentation

## ◆ SpaceType

template<typename SpaceT >

typedef SpaceT plask::SolverOver< SpaceT >::SpaceType

of the space for this solver

Definition at line 702 of file solver.hpp.

## Constructor & Destructor Documentation

## ◆ SolverOver()

template<typename SpaceT >

plask::SolverOver< SpaceT >::SolverOver | ( | const std::string & | name = `""` | ) |
| inline

Definition at line 704 of file solver.hpp.

## ◆ ~SolverOver()

template<typename SpaceT >

plask::SolverOver< SpaceT >::~SolverOver | ( |  | ) |
| inline

Definition at line 706 of file solver.hpp.

## Member Function Documentation

## ◆ getGeometry()

template<typename SpaceT >

shared_ptr< SpaceT > plask::SolverOver< SpaceT >::getGeometry | ( |  | ) | const
| inline

Get current solver geometry space.

Returns
  current solver geometry space

Definition at line 727 of file solver.hpp.

## ◆ loadConfiguration()

template<typename SpaceT >

void plask::SolverOver< SpaceT >::loadConfiguration | ( | XMLReader & | source,
|  | Manager & | manager
| ) |  |
| override virtual

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

  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.

Reimplemented in plask::ccategory::your_solver::YourSolver, plask::SolverWithMesh< SpaceT, MeshT >, plask::SolverWithMesh< ForExample_Geometry2DCartesian, ForExample_RectilinearMesh2D >, plask::SolverWithMesh< Geometry2DCartesian, MeshAxis >, plask::SolverWithMesh< Geometry2DCartesian, RectangularMesh< 2 > >, plask::SolverWithMesh< Geometry2DCylindrical, MeshAxis >, plask::SolverWithMesh< Geometry2DCylindrical, RectangularMesh< 2 > >, plask::SolverWithMesh< Geometry2DType, RectangularMesh< 2 > >, plask::SolverWithMesh< Geometry2DType, RegularMesh1D >, plask::SolverWithMesh< Geometry3D, RectangularMesh< 3 > >, plask::SolverWithMesh< GeometryT, MeshAxis >, plask::SolverWithMesh< GeometryType, MeshAxis >, plask::thermal::tstatic::ThermalFem2DSolver< Geometry2DType >, and plask::thermal::tstatic::ThermalFem3DSolver.

Definition at line 881 of file solver.hpp.

## ◆ onGeometryChange()

template<typename SpaceT >

virtual void plask::SolverOver< SpaceT >::onGeometryChange | ( | const Geometry::Event & |  | ) |
| inline virtual

This method is called when the geometry is changed.

It just calls invalidate(); but subclasses can customize it.

Parameters

  evt | information about geometry changes

Reimplemented in plask::electrical::drift_diffusion::DriftDiffusionModel2DSolver< Geometry2DType >, plask::optical::modal::ModalSolver< SolverOver< Geometry3D > >, plask::optical::modal::ModalSolver< SolverWithMesh< Geometry2DCartesian, MeshAxis > >, and plask::optical::modal::ModalSolver< SolverWithMesh< Geometry2DCylindrical, MeshAxis > >.

Definition at line 719 of file solver.hpp.

## ◆ parseStandardConfiguration()

template<typename SpaceT >

void plask::SolverOver< SpaceT >::parseStandardConfiguration | ( | XMLReader & | source,
|  | Manager & | manager,
|  | const std::string & | expected_msg = `"solver configuration element"`
| ) |  |

Definition at line 892 of file solver.hpp.

## ◆ readBoundaryConditions()

template<typename SpaceT >
template<typename Boundary , typename ConditionT >

void plask::SolverOver< SpaceT >::readBoundaryConditions | ( | Manager & | manager,
|  | XMLReader & | reader,
|  | BoundaryConditions< Boundary, ConditionT > & | dest
| ) |  |
| inline protected

Read boundary conditions using information about the geometry of this solver.

Parameters

  manager | manager used for load
  reader | current XML reader
  dest | BoundaryConditions variable which will store the boundary conditions

Definition at line 695 of file solver.hpp.

## ◆ setGeometry()

template<typename SpaceT >

void plask::SolverOver< SpaceT >::setGeometry | ( | const shared_ptr< SpaceT > & | geometry | ) |
| inline

Set new geometry for the solver.

Parameters

  geometry | new geometry space

Definition at line 733 of file solver.hpp.

## Member Data Documentation

## ◆ geometry

template<typename SpaceT >

shared_ptr<SpaceT> plask::SolverOver< SpaceT >::geometry
| protected

Space in which the calculations are performed.

Definition at line 686 of file solver.hpp.

The documentation for this class was generated from the following file:

- plask/solver.hpp