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