38#include <boost/algorithm/string/trim.hpp>
44 const std::string &vlist)
45 : m_vlist(vlist), m_expr(expr), m_expr_id(-1), m_evaluator(evaluator)
47 boost::algorithm::trim(
m_expr);
48 boost::algorithm::trim(
m_vlist);
62 catch (
const std::runtime_error &e)
66 std::string(
"Equation::Equation() fails on expression [") +
m_expr +
72 catch (
const std::string &e)
76 std::string(
"Equation::Equation() fails on expression [") +
m_expr +
102 catch (
const std::runtime_error &e)
105 std::string(
"Equation::Evaluate fails on expression [") +
m_expr +
109 catch (
const std::string &e)
112 std::string(
"Equation::Evaluate fails on expression [") +
m_expr +
129 catch (
const std::runtime_error &e)
132 "Equation::Evaluate fails on expression [" +
m_expr +
"]\n";
135 catch (
const std::string &e)
138 "Equation::Evaluate fails on expression [" +
m_expr +
"]\n";
169 std::vector<Array<OneD, const NekDouble>> points;
187 catch (
const std::runtime_error &e)
190 "Equation::Evaluate fails on expression [" +
m_expr +
"]\n";
194 catch (
const std::string &e)
197 "Equation::Evaluate fails on expression [" +
m_expr +
"]\n";
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
InterpreterSharedPtr m_evaluator
NekDouble GetTime() const
Returns time spend on expression evaluation at points (it does not include parse/pre-processing time)...
Equation(const Equation &)=default
std::string GetVlist(void) const
Equation & operator=(const Equation &src)
std::string GetExpression(void) const
void SetConstants(const std::map< std::string, NekDouble > &constants)
void SetParameter(const std::string &name, NekDouble value)
NekDouble Evaluate() const
std::shared_ptr< Interpreter > InterpreterSharedPtr
std::vector< double > z(NPUPPER)