PLaSK library
|
Base class for all solvers operating on specified space. More...
#include <plask/solver.hpp>
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 | |
Base class for all solvers operating on specified space.
Definition at line 676 of file solver.hpp.
of the space for this solver
Definition at line 702 of file solver.hpp.
|
inline |
Definition at line 704 of file solver.hpp.
|
inline |
Definition at line 706 of file solver.hpp.
|
inline |
Get current solver geometry space.
Definition at line 727 of file solver.hpp.
|
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.
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.
|
inlinevirtual |
This method is called when the geometry is changed.
It just calls invalidate(); but subclasses can customize it.
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.
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.
|
inlineprotected |
Read boundary conditions using information about the geometry of this solver.
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.
|
inline |
Set new geometry for the solver.
geometry | new geometry space |
Definition at line 733 of file solver.hpp.
|
protected |
Space in which the calculations are performed.
Definition at line 686 of file solver.hpp.