PLaSK library
Loading...
Searching...
No Matches
plask::ccategory::your_solver::YourSolver Struct Reference

This is Doxygen documentation of your solver. More...

#include <solvers/skel/your_solver.hpp>

Inheritance diagram for plask::ccategory::your_solver::YourSolver:
[legend]
Collaboration diagram for plask::ccategory::your_solver::YourSolver:
[legend]

Public Member Functions

 YourSolver (const std::string &name="")
 
virtual std::string getClassName () const
 Get name of solver.
 
virtual std::string getClassDescription () const
 Get a description of this solver.
 
virtual void loadConfiguration (plask::XMLReader &reader, plask::Manager &manager)
 Load configuration from given source.
 
void compute (double parameter)
 This method performs the main computations.
 
- Public Member Functions inherited from plask::SolverWithMesh< ForExample_Geometry2DCartesian, ForExample_RectilinearMesh2D >
 SolverWithMesh (const std::string &name="")
 
 ~SolverWithMesh ()
 
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.
 
ForExample_RectilinearMesh2D & meshRef () const
 Get current module mesh.
 
shared_ptr< ForExample_RectilinearMesh2D > getMesh () const
 Get current solver mesh.
 
void setMesh (const shared_ptr< ForExample_RectilinearMesh2D > &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
 
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

ReceiverFor< Temperature, Geometry2DCartesianinTemperature
 Sample receiver for temperature.
 
ProviderFor< SomeSingleValueProperty >::WithValue outSingleValue
 Sample provider for simple value.
 
ProviderFor< SomeFieldProperty, Geometry2DCartesian >::Delegate outSomeField
 Sample provider for field (it's better to use delegate here).
 

Protected Member Functions

virtual void onInitialize ()
 Initialize the solver.
 
virtual void onInvalidate ()
 Invalidate the data.
 
const DataVector< const doublegetDelegated (const MeshD< 2 > &dst_mesh, InterpolationMethod method=INTERPOLATION_DEFAULT)
 Method computing the value for the delegate provider.
 
- 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

DataVector< doublemy_data
 This is field data computed by this solver on its own mesh.
 
- Protected Attributes inherited from plask::SolverWithMesh< ForExample_Geometry2DCartesian, ForExample_RectilinearMesh2D >
shared_ptr< ForExample_RectilinearMesh2D > mesh
 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< ForExample_Geometry2DCartesian, ForExample_RectilinearMesh2D >
typedef ForExample_RectilinearMesh2D 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

This is Doxygen documentation of your solver.

Write a brief description of it.

Definition at line 29 of file your_solver.hpp.

Constructor & Destructor Documentation

◆ YourSolver()

plask::category::your_solver::YourSolver::YourSolver ( const std::string &  name = "")

Definition at line 18 of file your_solver.cpp.

Member Function Documentation

◆ compute()

void plask::category::your_solver::YourSolver::compute ( double  parameter)

This method performs the main computations.

Add short description of every method in a comment like this.

Parameters
parametersome value to be provided by the user for computationsÅ›

Definition at line 44 of file your_solver.cpp.

◆ getClassDescription()

virtual std::string plask::ccategory::your_solver::YourSolver::getClassDescription ( ) const
inlinevirtual

Get a description of this solver.

Returns
description of this solver (empty string by default)

Reimplemented from plask::Solver.

Definition at line 44 of file your_solver.hpp.

◆ getClassName()

virtual std::string plask::ccategory::your_solver::YourSolver::getClassName ( ) const
inlinevirtual

Get name of solver.

Returns
name of this solver

Implements plask::Solver.

Definition at line 42 of file your_solver.hpp.

◆ getDelegated()

const DataVector< const double > plask::category::your_solver::YourSolver::getDelegated ( const MeshD< 2 > &  dst_mesh,
InterpolationMethod  method = INTERPOLATION_DEFAULT 
)
protected

Method computing the value for the delegate provider.

Definition at line 76 of file your_solver.cpp.

◆ loadConfiguration()

void plask::category::your_solver::YourSolver::loadConfiguration ( plask::XMLReader source,
plask::Manager manager 
)
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
sourcesource of configuration
managermanager from which information about geometry, meshes, materials, and so on can be get if needed

Reimplemented from plask::SolverWithMesh< ForExample_Geometry2DCartesian, ForExample_RectilinearMesh2D >.

Definition at line 25 of file your_solver.cpp.

◆ onInitialize()

void plask::category::your_solver::YourSolver::onInitialize ( )
protectedvirtual

Initialize the solver.

Reimplemented from plask::Solver.

Definition at line 59 of file your_solver.cpp.

◆ onInvalidate()

void plask::category::your_solver::YourSolver::onInvalidate ( )
protectedvirtual

Invalidate the data.

Reimplemented from plask::Solver.

Definition at line 67 of file your_solver.cpp.

Member Data Documentation

◆ inTemperature

ReceiverFor<Temperature, Geometry2DCartesian> plask::ccategory::your_solver::YourSolver::inTemperature

Sample receiver for temperature.

Definition at line 32 of file your_solver.hpp.

◆ my_data

DataVector<double> plask::ccategory::your_solver::YourSolver::my_data
protected

This is field data computed by this solver on its own mesh.

Definition at line 60 of file your_solver.hpp.

◆ outSingleValue

ProviderFor<SomeSingleValueProperty>::WithValue plask::ccategory::your_solver::YourSolver::outSingleValue

Sample provider for simple value.

Definition at line 35 of file your_solver.hpp.

◆ outSomeField

ProviderFor<SomeFieldProperty,Geometry2DCartesian>::Delegate plask::ccategory::your_solver::YourSolver::outSomeField

Sample provider for field (it's better to use delegate here).

Definition at line 38 of file your_solver.hpp.


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