Nektar++
|
#include <Equation.h>
Public Member Functions | |
Equation (const Equation &src) | |
Equation (const SessionReaderSharedPtr &session, const std::string &expr="") | |
Equation & | operator= (const Equation &src) |
NekDouble | Evaluate () const |
NekDouble | Evaluate (NekDouble x, NekDouble y=0, NekDouble z=0, NekDouble t=0) const |
void | Evaluate (const Array< OneD, const NekDouble > &x, const Array< OneD, const NekDouble > &y, const Array< OneD, const NekDouble > &z, Array< OneD, NekDouble > &result) |
void | Evaluate (const Array< OneD, const NekDouble > &x, const Array< OneD, const NekDouble > &y, const Array< OneD, const NekDouble > &z, const NekDouble t, Array< OneD, NekDouble > &result) const |
void | Evaluate (const Array< OneD, const NekDouble > &x, const Array< OneD, const NekDouble > &y, const Array< OneD, const NekDouble > &z, const Array< OneD, const NekDouble > &t, Array< OneD, NekDouble > &result) const |
void | SetParameter (const std::string &name, NekDouble value) |
void | SetConstants (const std::map< std::string, NekDouble > &constants) |
std::string | GetExpression (void) const |
NekDouble | GetTime () const |
Returns time spend on expression evaluation at points (it does not include parse/pre-processing time). |
Private Attributes | |
std::string | m_expr |
int | m_expr_id |
AnalyticExpressionEvaluator & | m_evaluator |
This class stores a string form of a symbolic expression to be evaluated e.g. for the boundary conditions, the unique numeric ID of that expression and a reference to the unique static instance of AnalyticExpressionEvaluator.
The scenario is that for multiple copies of Equation class holding their symbolic expressions in the std::string form, there is a unique instance of AnalyticExpressionEvaluator which holds a set of pre-processed symbolic expressions in the form of sequential containers of execution functors, ready for fast evaluation.
AnalyticExpressionEvaluator also keeps all constants and parameters specified in an XML file. There should be only one copy of Equation class per each symbolic expression specified in XML file, modulo possible bugs. Classes Equation and AnalyticExpressionEvaluator live symbiotic in a sense that the expression id stored in Equation class is generated by AnalyticExpressionEvaluator which holds ordered container of pre-processed expressions.
Definition at line 54 of file Equation.h.
|
inline |
Definition at line 58 of file Equation.h.
|
inline |
Definition at line 65 of file Equation.h.
References ASSERTL0, Nektar::LibUtilities::AnalyticExpressionEvaluator::DefineFunction(), m_evaluator, m_expr, and m_expr_id.
|
inline |
Definition at line 100 of file Equation.h.
References ASSERTL0, Nektar::LibUtilities::AnalyticExpressionEvaluator::Evaluate(), m_evaluator, m_expr, and m_expr_id.
Referenced by Evaluate(), Nektar::SpatialDomains::MeshGraph::ReadExpansions(), Nektar::LibUtilities::SessionReader::ReadParameters(), Nektar::MultiRegions::DisContField3D::v_EvaluateBoundaryConditions(), Nektar::MultiRegions::DisContField2D::v_EvaluateBoundaryConditions(), and Nektar::IncNavierStokes::v_InitObject().
|
inline |
Definition at line 122 of file Equation.h.
References ASSERTL0, Nektar::LibUtilities::AnalyticExpressionEvaluator::Evaluate(), m_evaluator, m_expr, and m_expr_id.
|
inline |
Definition at line 144 of file Equation.h.
References Evaluate().
|
inline |
Definition at line 154 of file Equation.h.
References Evaluate().
|
inline |
Definition at line 166 of file Equation.h.
References ASSERTL0, Nektar::LibUtilities::AnalyticExpressionEvaluator::Evaluate(), m_evaluator, m_expr, and m_expr_id.
|
inline |
|
inline |
Returns time spend on expression evaluation at points (it does not include parse/pre-processing time).
Definition at line 211 of file Equation.h.
References Nektar::LibUtilities::AnalyticExpressionEvaluator::GetTime(), and m_evaluator.
Definition at line 95 of file Equation.h.
|
inline |
Definition at line 199 of file Equation.h.
References Nektar::LibUtilities::AnalyticExpressionEvaluator::AddConstants(), and m_evaluator.
|
inline |
Definition at line 194 of file Equation.h.
References m_evaluator, and Nektar::LibUtilities::AnalyticExpressionEvaluator::SetParameter().
|
private |
Definition at line 219 of file Equation.h.
Referenced by Equation(), Evaluate(), GetTime(), SetConstants(), and SetParameter().
|
private |
Definition at line 217 of file Equation.h.
Referenced by Equation(), Evaluate(), and GetExpression().
|
private |
Definition at line 218 of file Equation.h.
Referenced by Equation(), and Evaluate().