36 #ifndef NEKTAR_SOLVERUTILS_SESSIONFUNCTION_H
37 #define NEKTAR_SOLVERUTILS_SESSIONFUNCTION_H
67 std::string functionName,
68 bool toCache =
false);
74 const int domain = 0);
78 std::vector<std::string> pFieldNames,
81 const int domain = 0);
85 std::vector<std::string> pFieldNames,
88 const int domain = 0);
94 const int domain = 0);
98 const int domain = 0);
130 const int domain = 0);
136 const int domain = 0);
142 const int domain = 0);
145 const int goal)
const
#define SOLVER_UTILS_EXPORT
MultiRegions::ExpListSharedPtr m_field
The expansion we want to evaluate this function for.
bool m_toCache
Store resulting arrays (and interpolators)
std::map< std::pair< std::string, int >, Array< OneD, NekDouble > > m_arrays
Cached result arrays.
SOLVER_UTILS_EXPORT void EvaluateFld(std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
SOLVER_UTILS_EXPORT void Evaluate(Array< OneD, Array< OneD, NekDouble > > &pArray, const NekDouble pTime=0.0, const int domain=0)
Evaluates a function defined in the xml session file at each quadrature point.
SOLVER_UTILS_EXPORT const LibUtilities::SessionReaderSharedPtr & GetSession()
SOLVER_UTILS_EXPORT void EvaluatePts(std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
Evaluates a function from pts file.
SOLVER_UTILS_EXPORT SessionFunction(const LibUtilities::SessionReaderSharedPtr &session, const MultiRegions::ExpListSharedPtr &field, std::string functionName, bool toCache=false)
Representation of a FUNCTION defined in the session xml file.
SOLVER_UTILS_EXPORT void PrintProgressbar(const int position, const int goal) const
std::map< std::pair< std::string, int >, NekDouble > m_lastCached
Last time the cache for this variable & domain combo was updated.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
std::map< std::string, FieldUtils::Interpolator > m_interpolators
Interpolator for pts file input for a variable & domain combination.
SOLVER_UTILS_EXPORT const MultiRegions::ExpListSharedPtr & GetExpansion()
SOLVER_UTILS_EXPORT std::string Describe(std::string pFieldName, const int domain=0)
Provide a description of a function for a given field name.
SOLVER_UTILS_EXPORT void EvaluateExp(std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
int PrintProgressbar(const int position, const int goal, const std::string message, int lastprogress=-1)
Prints a progressbar.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
static SessionFunctionSharedPtr NullSessionFunction
std::shared_ptr< SessionFunction > SessionFunctionSharedPtr
The above copyright notice and this permission notice shall be included.