![]() |
OGS
|
|
A parameter class evaluating functions defined by user-provided mathematical expressions.
Currently, x, y, z, and t are supported as variables of the functions.
Uses per-thread storage for thread-safe evaluation.
Definition at line 24 of file FunctionParameter.h.
#include <FunctionParameter.h>
Public Member Functions | |
| FunctionParameter (std::string const &name, std::vector< std::string > const &vec_expression_str, std::map< std::string, std::unique_ptr< MathLib::PiecewiseLinearInterpolation > > const &curves) | |
| bool | isTimeDependent () const override |
| int | getNumberOfGlobalComponents () const override |
| std::vector< T > | operator() (double const t, SpatialPosition const &pos) const override |
| Returns the parameter value at the given time and position. | |
| Public Member Functions inherited from ParameterLib::Parameter< T > | |
| ~Parameter () override=default | |
| virtual Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | getNodalValuesOnElement (MeshLib::Element const &element, double const t) const |
| Returns a matrix of values for all nodes of the given element. | |
| ParameterBase (std::string name_, MeshLib::Mesh const *mesh=nullptr) | |
| Public Member Functions inherited from ParameterLib::ParameterBase | |
| ParameterBase (std::string name_, MeshLib::Mesh const *mesh=nullptr) | |
| virtual | ~ParameterBase ()=default |
| void | setCoordinateSystem (CoordinateSystem const &coordinate_system) |
| virtual void | initialize (std::vector< std::unique_ptr< ParameterBase > > const &) |
| MeshLib::Mesh const * | mesh () const |
Public Attributes | |
| FunctionEvaluation | function_evaluation_ |
| Public Attributes inherited from ParameterLib::ParameterBase | |
| std::string const | name |
Additional Inherited Members | |
| Protected Member Functions inherited from ParameterLib::ParameterBase | |
| std::vector< double > | rotateWithCoordinateSystem (std::vector< double > const &values, SpatialPosition const &pos) const |
| Protected Attributes inherited from ParameterLib::ParameterBase | |
| std::optional< CoordinateSystem > | _coordinate_system |
| MeshLib::Mesh const * | _mesh |
|
inline |
Constructing from a vector of expressions
| name | the parameter's name |
| vec_expression_str | a vector of mathematical expressions |
| curves | named list of curves used by expressions. The vector size specifies the number of components of the parameter. |
Definition at line 34 of file FunctionParameter.h.
References function_evaluation_, and ParameterLib::ParameterBase::name.
|
inlineoverridevirtual |
Returns the number of components this Parameter has at every position and point in time.
Implements ParameterLib::Parameter< T >.
Definition at line 51 of file FunctionParameter.h.
References function_evaluation_.
|
inlineoverridevirtual |
Implements ParameterLib::ParameterBase.
Definition at line 46 of file FunctionParameter.h.
References function_evaluation_.
|
inlineoverridevirtual |
Returns the parameter value at the given time and position.
Implements ParameterLib::Parameter< T >.
Definition at line 56 of file FunctionParameter.h.
References ParameterLib::ParameterBase::_coordinate_system, function_evaluation_, and ParameterLib::ParameterBase::rotateWithCoordinateSystem().
| FunctionEvaluation ParameterLib::FunctionParameter< T >::function_evaluation_ |
Definition at line 69 of file FunctionParameter.h.
Referenced by FunctionParameter(), getNumberOfGlobalComponents(), isTimeDependent(), and operator()().