36 #ifndef NEKTAR_LIBUTILITIES_EQUATION_HPP
37 #define NEKTAR_LIBUTILITIES_EQUATION_HPP
48 #include <boost/algorithm/string/trim.hpp>
52 namespace LibUtilities
70 boost::algorithm::trim(
m_expr);
79 catch (
const std::runtime_error& e)
82 std::string msg(std::string(
"Equation::Equation() fails on expression [") +
m_expr + std::string(
"]\n"));
83 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e.what());
86 catch (
const std::string& e)
89 std::string msg(std::string(
"Equation::Equation() fails on expression [") +
m_expr + std::string(
"]\n"));
90 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e);
109 catch (
const std::runtime_error& e)
111 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
112 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e.what());
114 catch (
const std::string& e)
116 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
117 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e);
131 catch (
const std::runtime_error& e)
133 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
134 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e.what());
136 catch (
const std::string& e)
138 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
139 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e);
145 const Array<OneD, const NekDouble>& x,
146 const Array<OneD, const NekDouble>& y,
147 const Array<OneD, const NekDouble>& z,
148 Array<OneD, NekDouble>& result)
150 Array<OneD, NekDouble> zero(x.num_elements(), 0.0);
155 const Array<OneD, const NekDouble>& x,
156 const Array<OneD, const NekDouble>& y,
157 const Array<OneD, const NekDouble>& z,
159 Array<OneD, NekDouble>& result)
const
161 Array<OneD, NekDouble> time(x.num_elements(), t);
167 const Array<OneD, const NekDouble>& x,
168 const Array<OneD, const NekDouble>& y,
169 const Array<OneD, const NekDouble>& z,
170 const Array<OneD, const NekDouble>& t,
171 Array<OneD, NekDouble>& result)
const
180 catch (
const std::runtime_error& e)
182 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
183 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e.what());
186 catch (
const std::string& e)
188 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
189 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e);
224 #endif //NEKTAR_LIBUTILITIES_EQUATION_HPP