36#ifndef NEKTAR_SOLVERUTILS_SESSIONFUNCTION_H
37#define NEKTAR_SOLVERUTILS_SESSIONFUNCTION_H
53template <
typename T>
class Interpolator;
66 bool toCache =
false);
72 const NekDouble pTime = 0.0,
const int domain = 0);
77 std::vector<std::string> pFieldNames,
79 const NekDouble &pTime = 0.0,
const int domain = 0);
84 std::vector<std::string> pFieldNames,
86 const NekDouble &pTime = 0.0,
const int domain = 0);
93 const int domain = 0);
97 const int domain = 0);
122 std::vector<MultiRegions::ExpListSharedPtr>>>
131 const int domain = 0);
137 const int domain = 0);
143 const int domain = 0);
146 const int goal)
const
#define SOLVER_UTILS_EXPORT
A class that contains algorithms for interpolation between pts fields, expansions and different meshe...
std::map< std::string, FieldUtils::Interpolator< std::vector< MultiRegions::ExpListSharedPtr > > > m_interpolators
Interpolator for pts file input for a variable & domain combination.
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 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.
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 const LibUtilities::SessionReaderSharedPtr & GetSession()
SOLVER_UTILS_EXPORT void EvaluateExp(std::string pFieldName, Array< OneD, NekDouble > &pArray, const NekDouble &pTime=0.0, const int domain=0)
SOLVER_UTILS_EXPORT const MultiRegions::ExpListSharedPtr & GetExpansion()
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