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). More... | |
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, m_expr_id, and CellMLToNektar.pycml::msg.
|
inline |
Definition at line 102 of file Equation.h.
References ASSERTL0, Nektar::LibUtilities::AnalyticExpressionEvaluator::Evaluate(), m_evaluator, m_expr, m_expr_id, and CellMLToNektar.pycml::msg.
Referenced by Evaluate(), Nektar::SolverUtils::FilterAeroForces::FilterAeroForces(), Nektar::FilterBenchmark::FilterBenchmark(), Nektar::FilterElectrogram::FilterElectrogram(), Nektar::SolverUtils::FilterEnergy1D::FilterEnergy1D(), Nektar::SolverUtils::FilterFieldConvert::FilterFieldConvert(), Nektar::SolverUtils::FilterHistoryPoints::FilterHistoryPoints(), Nektar::SolverUtils::FilterModalEnergy::FilterModalEnergy(), Nektar::SolverUtils::FilterMovingAverage::FilterMovingAverage(), Nektar::FilterMovingBody::FilterMovingBody(), Nektar::SolverUtils::FilterReynoldsStresses::FilterReynoldsStresses(), Nektar::SolverUtils::FilterThresholdMax::FilterThresholdMax(), Nektar::SolverUtils::FilterThresholdMin::FilterThresholdMin(), Nektar::Extrapolate::GenerateHOPBCMap(), Nektar::SpatialDomains::MeshGraph::ReadExpansions(), Nektar::LibUtilities::SessionReader::ReadParameters(), Nektar::MultiRegions::DisContField3D::v_EvaluateBoundaryConditions(), Nektar::MultiRegions::DisContField2D::v_EvaluateBoundaryConditions(), Nektar::MultiRegions::DisContField3D::v_GetRobinBCInfo(), Nektar::MultiRegions::DisContField2D::v_GetRobinBCInfo(), Nektar::IncNavierStokes::v_InitObject(), and Nektar::GlobalMapping::Mapping::v_UpdateBCs().
|
inline |
Definition at line 124 of file Equation.h.
References ASSERTL0, Nektar::LibUtilities::AnalyticExpressionEvaluator::Evaluate(), m_evaluator, m_expr, m_expr_id, and CellMLToNektar.pycml::msg.
|
inline |
|
inline |
|
inline |
Definition at line 168 of file Equation.h.
References ASSERTL0, Nektar::LibUtilities::AnalyticExpressionEvaluator::Evaluate(), m_evaluator, m_expr, m_expr_id, and CellMLToNektar.pycml::msg.
|
inline |
Definition at line 206 of file Equation.h.
References m_expr.
Referenced by Nektar::Extrapolate::GenerateHOPBCMap().
|
inline |
Returns time spend on expression evaluation at points (it does not include parse/pre-processing time).
Definition at line 213 of file Equation.h.
References Nektar::LibUtilities::AnalyticExpressionEvaluator::GetTime(), and m_evaluator.
Definition at line 97 of file Equation.h.
|
inline |
Definition at line 201 of file Equation.h.
References Nektar::LibUtilities::AnalyticExpressionEvaluator::AddConstants(), and m_evaluator.
|
inline |
Definition at line 196 of file Equation.h.
References m_evaluator, and Nektar::LibUtilities::AnalyticExpressionEvaluator::SetParameter().
|
private |
Definition at line 221 of file Equation.h.
Referenced by Equation(), Evaluate(), GetTime(), SetConstants(), and SetParameter().
|
private |
Definition at line 219 of file Equation.h.
Referenced by Equation(), Evaluate(), and GetExpression().
|
private |
Definition at line 220 of file Equation.h.
Referenced by Equation(), and Evaluate().