36 #ifndef NEKTAR_SOLVERUTILS_FORCINGMOVINGREFERENCEFRAME
37 #define NEKTAR_SOLVERUTILS_FORCINGMOVINGREFERENCEFRAME
48 #include <boost/numeric/ublas/io.hpp>
49 #include <boost/numeric/ublas/matrix.hpp>
50 #include <boost/numeric/ublas/vector.hpp>
58 namespace bn = boost::numeric;
69 const std::weak_ptr<EquationSystem> &pEquation,
71 const unsigned int &pNumForcingFields,
const TiXmlElement *pForce)
76 p->InitObject(pFields, pNumForcingFields, pForce);
86 const unsigned int &pNumForcingFields,
87 const TiXmlElement *pForce)
override;
154 const std::weak_ptr<EquationSystem> &pEquation);
#define SOLVER_UTILS_EXPORT
General purpose memory allocation routines with the ability to allocate from thread specific memory p...
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Defines a forcing term to be explicitly applied.
virtual SOLVER_UTILS_EXPORT void v_PreApply(const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble &time) override
void addRotation(int npoints, const Array< OneD, Array< OneD, NekDouble >> &inarray0, NekDouble angVelScale, const Array< OneD, Array< OneD, NekDouble >> &inarray1, Array< OneD, Array< OneD, NekDouble >> &outarray)
outarray = inarray0 + angVelScale Omega x inarray1
bn::ublas::matrix< NekDouble > m_ProjMatY
std::map< int, bool > m_hasVel
static std::string classNameBody
Name of the class.
bn::ublas::matrix< NekDouble > m_ProjMatZ
void UpdateTheta(const NekDouble &time)
std::map< int, LibUtilities::EquationSharedPtr > m_omegaFunction
void CheckForRestartTheta(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, Array< OneD, NekDouble > &theta)
Array< OneD, NekDouble > m_theta
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) override
Adds the body force, -Omega X u.
ForcingMovingReferenceFrame(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation)
std::map< int, NekDouble > m_omegaXYZ
Array< OneD, NekDouble > m_pivotPoint
bn::ublas::matrix< NekDouble > m_ProjMatX
std::string m_velFuncName
virtual SOLVER_UTILS_EXPORT void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override
Initialise the forcing module.
std::string m_omegaFuncName
std::map< int, LibUtilities::EquationSharedPtr > m_velFunction
virtual ~ForcingMovingReferenceFrame(void)
std::map< int, LibUtilities::EquationSharedPtr > m_frameFunction
static SOLVER_UTILS_EXPORT ForcingSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce)
Creates an instance of this class.
void Update(const NekDouble &time)
Updates the forcing array with the current required forcing.
std::map< int, bool > m_hasOmega
std::map< int, NekDouble > m_omegaxyz
Array< OneD, Array< OneD, NekDouble > > m_coords
std::map< int, NekDouble > m_velxyz
std::map< int, NekDouble > m_velXYZ
std::shared_ptr< SessionReader > SessionReaderSharedPtr
SOLVER_UTILS_EXPORT typedef std::shared_ptr< Forcing > ForcingSharedPtr
A shared pointer to an EquationSystem object.
The above copyright notice and this permission notice shall be included.