38 #include <boost/algorithm/string/trim.hpp>
42 namespace LibUtilities
46 const std::string &vlist)
47 : m_vlist(vlist), m_expr(expr), m_expr_id(-1), m_evaluator(evaluator)
49 boost::algorithm::trim(
m_expr);
50 boost::algorithm::trim(
m_vlist);
64 catch (
const std::runtime_error &e)
68 std::string(
"Equation::Equation() fails on expression [") +
m_expr +
74 catch (
const std::string &e)
78 std::string(
"Equation::Equation() fails on expression [") +
m_expr +
104 catch (
const std::runtime_error &e)
107 std::string(
"Equation::Evaluate fails on expression [") +
m_expr +
111 catch (
const std::string &e)
114 std::string(
"Equation::Evaluate fails on expression [") +
m_expr +
131 catch (
const std::runtime_error &e)
134 "Equation::Evaluate fails on expression [" +
m_expr +
"]\n";
137 catch (
const std::string &e)
140 "Equation::Evaluate fails on expression [" +
m_expr +
"]\n";
171 std::vector<Array<OneD, const NekDouble>> points;
189 catch (
const std::runtime_error &e)
192 "Equation::Evaluate fails on expression [" +
m_expr +
"]\n";
196 catch (
const std::string &e)
199 "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
The above copyright notice and this permission notice shall be included.