15 #include "libmesh/parsed_function.h" 41 const std::string & function_str,
42 const std::vector<std::string> &
vars,
43 const std::vector<std::string> & vals,
72 const std::vector<std::string> &
_vars;
std::unique_ptr< libMesh::ParsedFunction< Real > > _function_ptr
Pointer to the libMesh::ParsedFunction object.
std::vector< unsigned int > _scalar_index
Stores _addr variable indices for each scalar variable value.
const std::vector< ControlData< bool > * > getBoolControlData()
Get list of boolean-valued control data objects.
std::vector< ControlData< bool > * > _cd_bool_vals
Vector of pointers to bool control data values this parsed function is using.
std::vector< unsigned int > _cd_bool_index
Stores _addr variable indices for each ControlData<bool> value.
Main class for simulation (the driver of the simulation)
Real evaluate(Real t, const Point &p)
Perform the evaluation of the libMesh::ParsedFunction.
const std::vector< std::string > & _vars
List of variables supplied from the user.
const THREAD_ID _tid
The thread id passed from owning object.
std::vector< const Function * > _functions
Vector of Functions this parsed function is using.
std::vector< Real > _initial_vals
Storage for the initial values of _vars variables used by the libMesh::ParsedFunction object...
void updateControlDataValues()
Updates control data values for use in the libMesh::ParsedFunction.
std::vector< const VariableValue * > _scalar_vals
Vector of pointers to scalar variables values.
A wrapper class for creating and evaluating parsed functions via the libMesh::ParsedFunction interfac...
std::vector< Real * > _addr
Pointers to the variables that store the values of _vars inside the libMesh::ParsedFunction object...
const std::vector< std::string > & _vals_input
List of the values for the variables supplied by the user.
void updateFunctionValues(Real t, const Point &pt)
Updates function values for use in the libMesh::ParsedFunction.
std::vector< unsigned int > _cd_real_index
Stores _addr variable indices for each ControlData<Real> value.
const std::string & _function_str
Reference to the string containing the function to evaluate.
std::vector< unsigned int > _function_index
Stores _addr variable indices for each Function.
FEProblemBase & _feproblem
Reference to the FEProblemBase object.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Simulation & _sim
Reference to the Simulation object.
THMParsedFunctionWrapper(Simulation &sim, 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.
void update()
Updates scalar values for use in the libMesh::ParsedFunction.
void initialize()
Initialization method that prepares the _vars and _initial_vals for use by the libMesh::ParsedFunctio...
const std::vector< ControlData< Real > * > getRealControlData()
Get list of Real-valued control data objects.
std::vector< ControlData< Real > * > _cd_real_vals
Vector of pointers to Real control data values this parsed function is using.