35 #ifndef NEKTAR_SOLVERUTILS_FORCING 36 #define NEKTAR_SOLVERUTILS_FORCING 60 const std::weak_ptr<EquationSystem>&,
79 const Array<OneD, MultiRegions::ExpListSharedPtr>& pFields,
80 const unsigned int& pNumForcingFields,
81 const TiXmlElement* pForce);
85 const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
91 const LibUtilities::SessionReaderSharedPtr &pSession,
92 const std::weak_ptr<EquationSystem> &pEquation,
93 const Array<OneD, MultiRegions::ExpListSharedPtr>& pFields,
94 const unsigned int& pNumForcingFields = 0);
105 const std::weak_ptr<EquationSystem>
m_equ;
115 const LibUtilities::SessionReaderSharedPtr &pSession,
116 const std::weak_ptr<EquationSystem> &pEquation);
119 const Array<OneD, MultiRegions::ExpListSharedPtr>& pFields,
120 const unsigned int& pNumForcingFields,
121 const TiXmlElement* pForce) = 0;
124 const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
131 const Array<OneD, MultiRegions::ExpListSharedPtr> &pFields,
132 const LibUtilities::SessionReaderSharedPtr &pSession,
134 bool pCache =
false);
137 LibUtilities::SessionReaderSharedPtr pSession,
138 std::string pFieldName,
140 const std::string& pFunctionName,
SOLVER_UTILS_EXPORT void EvaluateTimeFunction(LibUtilities::SessionReaderSharedPtr pSession, std::string pFieldName, Array< OneD, NekDouble > &pArray, const std::string &pFunctionName, NekDouble pTime=NekDouble(0))
Array< OneD, Array< OneD, NekDouble > > m_Forcing
Evaluated forcing function.
SOLVER_UTILS_EXPORT typedef std::shared_ptr< Forcing > ForcingSharedPtr
A shared pointer to an EquationSystem object.
std::map< std::string, SolverUtils::SessionFunctionSharedPtr > m_sessionFunctions
Map of known SessionFunctions.
SOLVER_UTILS_EXPORT void InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce)
Initialise the forcing object.
A base class for describing how to solve specific equations.
SOLVER_UTILS_EXPORT SessionFunctionSharedPtr GetFunction(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const LibUtilities::SessionReaderSharedPtr &pSession, std::string pName, bool pCache=false)
Get a SessionFunction by name.
SOLVER_UTILS_EXPORT void Apply(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time)
Apply the forcing.
SOLVER_UTILS_EXPORT Array< OneD, Array< OneD, NekDouble > > & UpdateForces()
ForcingFactory & GetForcingFactory()
Declaration of the forcing factory singleton.
static SOLVER_UTILS_EXPORT std::vector< ForcingSharedPtr > Load(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields=0)
SOLVER_UTILS_EXPORT const Array< OneD, const Array< OneD, NekDouble > > & GetForces()
SOLVER_UTILS_EXPORT Forcing(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation)
Constructor.
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
std::shared_ptr< Equation > EquationSharedPtr
int m_NumVariable
Number of variables.
virtual SOLVER_UTILS_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce)=0
#define SOLVER_UTILS_EXPORT
virtual SOLVER_UTILS_EXPORT ~Forcing()
std::shared_ptr< SessionFunction > SessionFunctionSharedPtr
Defines a forcing term to be explicitly applied.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
LibUtilities::NekFactory< std::string, Forcing, const LibUtilities::SessionReaderSharedPtr &, const std::weak_ptr< EquationSystem > &, const Array< OneD, MultiRegions::ExpListSharedPtr > &, const unsigned int &, const TiXmlElement * > ForcingFactory
Declaration of the forcing factory.
Provides a generic Factory class.
virtual SOLVER_UTILS_EXPORT void v_Apply(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble &time)=0
const std::weak_ptr< EquationSystem > m_equ
Weak pointer to equation system using this forcing.