36 #ifndef NEKTAR_LIBUTILITIES_INTERPRETER_INTERPRETER_H 37 #define NEKTAR_LIBUTILITIES_INTERPRETER_INTERPRETER_H 46 namespace LibUtilities
129 std::map<std::string, NekDouble>
const&
constants);
167 std::map<std::string, NekDouble>
const& params);
182 std::string
const& name,
NekDouble value);
222 const std::string& vlist,
const std::string& expr);
262 std::vector<NekDouble>
point);
314 const int expression_id,
322 std::unique_ptr<ExpressionEvaluator>
m_impl;
~Interpreter()
Default destructor.
int DefineFunction(const std::string &vlist, const std::string &expr)
Defines a function for the purposes of evaluation.
NekDouble Evaluate(const int id)
Evaluate a function which depends only on constants and/or parameters.
Interpreter()
Default constructor.
NekDouble GetParameter(std::string const &name)
Get the value of a parameter.
Interpreter & operator=(Interpreter &&)
Default assignment operator.
void SetParameters(std::map< std::string, NekDouble > const ¶ms)
Set parameter values.
Concrete implementation of the interface defined in Interpreter.
std::unique_ptr< ExpressionEvaluator > m_impl
Concrete implementation of the above API calls.
int AddConstant(std::string const &name, NekDouble value)
Set constants to be evaluated.
#define LIB_UTILITIES_EXPORT
void AddConstants(std::map< std::string, NekDouble > const &constants)
Set constants to be evaluated.
std::shared_ptr< Interpreter > InterpreterSharedPtr
NekDouble GetTime() const
Returns the total walltime spent in evaluation procedures in seconds.
void SetParameter(std::string const &name, NekDouble value)
Set parameter values.
void SetRandomSeed(unsigned int seed=123u)
Sets the random seed for the pseudorandom number generator.
Interpreter class for the evaluation of mathematical expressions.
bg::model::point< double, 3, bg::cs::cartesian > point
NekDouble EvaluateAtPoint(const int id, std::vector< NekDouble > point)
Evaluate a function which depends on zero or more variables.
NekDouble GetConstant(std::string const &name)
Return the value of a constant.