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"));
87 catch (
const std::string& e)
90 std::string msg(std::string(
"Equation::Equation() fails on expression [") +
m_expr + std::string(
"]\n"));
111 catch (
const std::runtime_error& e)
113 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
114 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e.what());
116 catch (
const std::string& e)
118 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
119 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e);
133 catch (
const std::runtime_error& e)
135 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
136 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e.what());
138 catch (
const std::string& e)
140 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
141 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e);
147 const Array<OneD, const NekDouble>& x,
148 const Array<OneD, const NekDouble>& y,
149 const Array<OneD, const NekDouble>& z,
150 Array<OneD, NekDouble>& result)
152 Array<OneD, NekDouble> zero(x.num_elements(), 0.0);
157 const Array<OneD, const NekDouble>& x,
158 const Array<OneD, const NekDouble>& y,
159 const Array<OneD, const NekDouble>& z,
161 Array<OneD, NekDouble>& result)
const
163 Array<OneD, NekDouble> time(x.num_elements(), t);
169 const Array<OneD, const NekDouble>& x,
170 const Array<OneD, const NekDouble>& y,
171 const Array<OneD, const NekDouble>& z,
172 const Array<OneD, const NekDouble>& t,
173 Array<OneD, NekDouble>& result)
const
182 catch (
const std::runtime_error& e)
184 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
185 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e.what());
188 catch (
const std::string& e)
190 std::string msg(std::string(
"Equation::Evaluate fails on expression [") +
m_expr + std::string(
"]\n"));
191 ASSERTL0(
false, msg + std::string(
"ERROR: ") + e);
226 #endif //NEKTAR_LIBUTILITIES_EQUATION_HPP