FunctionEvaluator
-
class FunctionEvaluator
Class to evaluate function expressions given by a string.
Public Functions
-
void create(const std::string &expr)
Build the evaluator object.
- Parameters:
expr – Function expression to be evaluated
-
void create(const std::vector<std::string> &expressions)
Build the evaluator object.
- Parameters:
expressions – Function expressions (one per component) to be evaluated
-
void define_constant(const std::string &name, Real value)
Define a constant.
- Parameters:
name – Name of the constant
value – Value
-
void register_function(Function *fn)
Register user function with function evaluator.
- Parameters:
fn – Function to register
-
Real evaluate(Int dim, Real time, const Real x[])
Evaluate the function expression at time
time
and spatial positionx
- Parameters:
dim – Spatial dimension
time – Simulation time
x – Spatial location
-
void create(const std::string &expr)