50 const std::shared_ptr<SolverUtils::EquationSystem> &pEquation,
52 :
Filter(pSession, pEquation)
55 std::string ext =
".fce";
59 auto it = pParams.find(
"OutputFrequency");
60 if (it == pParams.end())
71 it = pParams.find(
"StartTime");
72 if (it == pParams.end())
91 m_spaceDim = pFields[0]->GetGraph()->GetMeshDimension();
109 if (vComm->GetRank() == 0)
113 m_session->MatchSolverInfo(
"Driver",
"Adaptive", adaptive,
false);
155 if (vComm->GetRank() == 0)
178 if (pFields[0]->GetComm()->GetRank() == 0)
216 int nq = pIntVel[0].size();
225 Vmath::Vsub(nq, pIntVel[i], 1, pUpPrev[i], 1, tmp, 1);
226 Vmath::Vmul(nq, pPhi->GetPhys(), 1, tmp, 1, tmp, 1);
229 m_Forces[i] = pPhi->Integral(tmp) / dt;
void v_Initialise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
NekDouble m_spaceDim
Dimension of the fluid domain.
void v_Update(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
unsigned int m_outputFrequency
void CalculateForces(const Array< OneD, Array< OneD, NekDouble > > &pIntVel, const Array< OneD, Array< OneD, NekDouble > > &pUpPrev, const MultiRegions::ExpListSharedPtr &pPhi, NekDouble time, NekDouble dt)
Determine the total force on the body defined by (note that if the shape function represents more th...
static std::string className
Name of the class.
FilterAeroForcesSPM(const LibUtilities::SessionReaderSharedPtr &pSession, const std::shared_ptr< SolverUtils::EquationSystem > &pEquation, const std::map< std::string, std::string > &pParams)
static SolverUtils::FilterSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const std::shared_ptr< SolverUtils::EquationSystem > &pEquation, const std::map< std::string, std::string > &pParams)
Creates an instance of this class.
std::vector< std::string > m_dirNames
STL vector containing the names of the different directions.
bool v_IsTimeDependent() override
Array< OneD, NekDouble > m_Forces
Array storing the last value of the aerodynamic forces.
void v_Finalise(const Array< OneD, const MultiRegions::ExpListSharedPtr > &pFields, const NekDouble &time) override
std::ofstream m_outputStream
NekDouble Evaluate() const
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
SOLVER_UTILS_EXPORT std::string SetupOutput(const std::string ext, const ParamMap &pParams)
LibUtilities::SessionReaderSharedPtr m_session
std::map< std::string, std::string > ParamMap
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< Comm > CommSharedPtr
Pointer to a Communicator object.
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
FilterFactory & GetFilterFactory()
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.