A wrapper class for creating and evaluating parsed functions via the libMesh::ParsedFunction interface for fparser. More...
#include <MooseParsedFunctionWrapper.h>
Public Member Functions | |
| MooseParsedFunctionWrapper (FEProblemBase &feproblem, const std::string &function_str, const std::vector< std::string > &vars, const std::vector< std::string > &vals, const THREAD_ID tid=0) | |
| Class constructor. More... | |
| virtual | ~MooseParsedFunctionWrapper () |
| Class destruction Deletes the pointer to the dynamically allocated instance of the underlying libMesh::ParsedFunction. More... | |
| template<typename T > | |
| T | evaluate (Real t, const Point &p) |
| A template method for performing the evaluation of the libMesh::ParsedFunction Within the source two specializations exists for returning a scalar or vector; template specialization was utilized to allow for generic expansion. More... | |
| RealGradient | evaluateGradient (Real t, const Point &p) |
| Evaluate the gradient of the function which libMesh provides through automatic differentiation. More... | |
| Real | evaluateDot (Real t, const Point &p) |
| Evaluate the time derivative of the function which libMesh provides through automatic differentiation. More... | |
| template<> | |
| Real | evaluate (Real t, const Point &p) |
| template<> | |
| DenseVector< Real > | evaluate (Real t, const Point &p) |
| template<> | |
| RealVectorValue | evaluate (Real t, const Point &p) |
| template<> | |
| Real | evaluate (Real t, const Point &p) |
| template<> | |
| DenseVector< Real > | evaluate (Real t, const Point &p) |
| template<> | |
| RealVectorValue | evaluate (Real t, const Point &p) |
Private Member Functions | |
| void | initialize () |
| Initialization method that prepares the _vars and _initial_vals for use by the libMesh::ParsedFunction object allocated in the constructor. More... | |
| void | update () |
| Updates postprocessor and scalar values for use in the libMesh::ParsedFunction. More... | |
| void | updateFunctionValues (Real t, const Point &pt) |
| Updates function values for use in the libMesh::ParsedFunction. More... | |
Private Attributes | |
| FEProblemBase & | _feproblem |
| Reference to the FEProblemBase object. More... | |
| const std::string & | _function_str |
| Reference to the string containing the function to evaluate. More... | |
| const std::vector< std::string > & | _vars |
| List of variables supplied from the user. More... | |
| const std::vector< std::string > & | _vals_input |
| List of the values for the variables supplied by the user. More... | |
| std::vector< Real > | _initial_vals |
| Storage for the initial values of _vars variables used by the libMesh::ParsedFunction object. More... | |
| std::unique_ptr< libMesh::ParsedFunction< Real > > | _function_ptr |
| Pointer to the libMesh::ParsedFunction object. More... | |
| std::vector< unsigned int > | _pp_index |
| Stores indices into _addr variable that are connected to Postprocessors. More... | |
| std::vector< const Real * > | _pp_vals |
| Vector of pointers to postprocessor values this parsed function is using. More... | |
| std::vector< unsigned int > | _scalar_index |
| Stores indicies into _addr variable that are connected to Scalar Variables. More... | |
| std::vector< const Real * > | _scalar_vals |
| Vector of pointers to scalar variables values. More... | |
| std::vector< unsigned int > | _function_index |
| Stores indices into _addr that are connected to Functions this libMesh::ParsedFunction is using. More... | |
| std::vector< const Function * > | _functions |
| Vector of Functions this parsed function is using. More... | |
| std::vector< Real * > | _addr |
| Pointers to the variables that store the values of _vars inside the libMesh::ParsedFunction object. More... | |
| const THREAD_ID | _tid |
| The thread id passed from owning Function object. More... | |
Friends | |
| class | ParsedFunctionTest |
A wrapper class for creating and evaluating parsed functions via the libMesh::ParsedFunction interface for fparser.
Definition at line 33 of file MooseParsedFunctionWrapper.h.
| MooseParsedFunctionWrapper::MooseParsedFunctionWrapper | ( | FEProblemBase & | feproblem, |
| const std::string & | function_str, | ||
| const std::vector< std::string > & | vars, | ||
| const std::vector< std::string > & | vals, | ||
| const THREAD_ID | tid = 0 |
||
| ) |
Class constructor.
| feproblem | Reference to the FEProblemBase object (provides access to Postprocessors) |
| function_str | A string that contains the function to evaluate |
| vars | A vector of variable names contained within the function |
| vals | A vector of variable values, matching the variables defined in vars |
Definition at line 18 of file MooseParsedFunctionWrapper.C.
|
virtual |
Class destruction Deletes the pointer to the dynamically allocated instance of the underlying libMesh::ParsedFunction.
Definition at line 34 of file MooseParsedFunctionWrapper.C.
Definition at line 38 of file MooseParsedFunctionWrapper.C.
| DenseVector<Real> MooseParsedFunctionWrapper::evaluate | ( | Real | t, |
| const Point & | p | ||
| ) |
Definition at line 47 of file MooseParsedFunctionWrapper.C.
| RealVectorValue MooseParsedFunctionWrapper::evaluate | ( | Real | t, |
| const Point & | p | ||
| ) |
Definition at line 58 of file MooseParsedFunctionWrapper.C.
| T MooseParsedFunctionWrapper::evaluate | ( | Real | t, |
| const Point & | p | ||
| ) |
A template method for performing the evaluation of the libMesh::ParsedFunction Within the source two specializations exists for returning a scalar or vector; template specialization was utilized to allow for generic expansion.
| RealVectorValue MooseParsedFunctionWrapper::evaluate | ( | Real | t, |
| const Point & | p | ||
| ) |
Evaluate the time derivative of the function which libMesh provides through automatic differentiation.
Definition at line 83 of file MooseParsedFunctionWrapper.C.
| RealGradient MooseParsedFunctionWrapper::evaluateGradient | ( | Real | t, |
| const Point & | p | ||
| ) |
Evaluate the gradient of the function which libMesh provides through automatic differentiation.
Definition at line 75 of file MooseParsedFunctionWrapper.C.
|
private |
Initialization method that prepares the _vars and _initial_vals for use by the libMesh::ParsedFunction object allocated in the constructor.
Definition at line 91 of file MooseParsedFunctionWrapper.C.
Referenced by MooseParsedFunctionWrapper().
|
private |
Updates postprocessor and scalar values for use in the libMesh::ParsedFunction.
Definition at line 145 of file MooseParsedFunctionWrapper.C.
Referenced by evaluate(), evaluateDot(), and evaluateGradient().
Updates function values for use in the libMesh::ParsedFunction.
Definition at line 155 of file MooseParsedFunctionWrapper.C.
Referenced by evaluate(), evaluateDot(), and evaluateGradient().
|
friend |
Definition at line 136 of file MooseParsedFunctionWrapper.h.
|
private |
Pointers to the variables that store the values of _vars inside the libMesh::ParsedFunction object.
Definition at line 114 of file MooseParsedFunctionWrapper.h.
Referenced by MooseParsedFunctionWrapper(), update(), and updateFunctionValues().
|
private |
Reference to the FEProblemBase object.
Definition at line 78 of file MooseParsedFunctionWrapper.h.
Referenced by initialize().
|
private |
Stores indices into _addr that are connected to Functions this libMesh::ParsedFunction is using.
Definition at line 108 of file MooseParsedFunctionWrapper.h.
Referenced by initialize(), and updateFunctionValues().
|
private |
Pointer to the libMesh::ParsedFunction object.
Definition at line 93 of file MooseParsedFunctionWrapper.h.
Referenced by evaluate(), evaluateDot(), evaluateGradient(), and MooseParsedFunctionWrapper().
|
private |
Reference to the string containing the function to evaluate.
Definition at line 81 of file MooseParsedFunctionWrapper.h.
Referenced by MooseParsedFunctionWrapper().
|
private |
Vector of Functions this parsed function is using.
Definition at line 111 of file MooseParsedFunctionWrapper.h.
Referenced by initialize(), and updateFunctionValues().
|
private |
Storage for the initial values of _vars variables used by the libMesh::ParsedFunction object.
Definition at line 90 of file MooseParsedFunctionWrapper.h.
Referenced by initialize(), and MooseParsedFunctionWrapper().
|
private |
Stores indices into _addr variable that are connected to Postprocessors.
Definition at line 96 of file MooseParsedFunctionWrapper.h.
Referenced by initialize(), and update().
|
private |
Vector of pointers to postprocessor values this parsed function is using.
Definition at line 99 of file MooseParsedFunctionWrapper.h.
Referenced by initialize(), and update().
|
private |
Stores indicies into _addr variable that are connected to Scalar Variables.
Definition at line 102 of file MooseParsedFunctionWrapper.h.
Referenced by initialize(), and update().
|
private |
Vector of pointers to scalar variables values.
Definition at line 105 of file MooseParsedFunctionWrapper.h.
Referenced by initialize(), and update().
|
private |
The thread id passed from owning Function object.
Definition at line 117 of file MooseParsedFunctionWrapper.h.
Referenced by initialize().
|
private |
List of the values for the variables supplied by the user.
Definition at line 87 of file MooseParsedFunctionWrapper.h.
Referenced by initialize().
|
private |
List of variables supplied from the user.
Definition at line 84 of file MooseParsedFunctionWrapper.h.
Referenced by MooseParsedFunctionWrapper().
1.8.14