PLaSK library
Loading...
Searching...
No Matches
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< 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.
 
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, 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.
 

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< SpaceTgeometry
 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

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()

◆ onGeometryChange()

template<typename SpaceT >
virtual void plask::SolverOver< SpaceT >::onGeometryChange ( const Geometry::Event )
inlinevirtual

◆ 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 >
void plask::SolverOver< SpaceT >::readBoundaryConditions ( Manager manager,
XMLReader reader,
BoundaryConditions< Boundary, ConditionT > &  dest 
)
inlineprotected

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

Parameters
managermanager used for load
readercurrent XML reader
destBoundaryConditions 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
geometrynew 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: