44 "Forcing for axi-symmetric flow (around x=0)");
48 const std::weak_ptr<SolverUtils::EquationSystem> &pEquation)
55 const unsigned int &pNumForcingFields,
56 [[maybe_unused]]
const TiXmlElement *pForce)
58 int spacedim = pFields[0]->GetGraph()->GetSpaceDimension();
59 int nPoints = pFields[0]->GetTotPoints();
67 for (
int i = 0; i < 3; i++)
71 pFields[0]->GetCoords(coords[0], coords[1], coords[2]);
75 for (
int i = 0; i < nPoints; ++i)
101 int nPoints = pFields[0]->GetTotPoints();
112 for (
int i = 1; i < 3; ++i)
131 Vmath::Vmul(nPoints, inarray[3], 1, inarray[3], 1, tmp, 1);
132 Vmath::Vdiv(nPoints, tmp, 1, inarray[0], 1, tmp, 1);
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
VariableConverterSharedPtr m_varConv
static std::string className
Name of the class.
Array< OneD, NekDouble > m_geomFactor
void v_InitObject(const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce) override
ForcingAxiSymmetric(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< SolverUtils::EquationSystem > &pEquation)
static SolverUtils::ForcingSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< SolverUtils::EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields, const TiXmlElement *pForce)
Creates an instance of this class.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
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.
int m_NumVariable
Number of variables.
Array< OneD, Array< OneD, NekDouble > > m_Forcing
Evaluated forcing function.
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
static const NekDouble kNekZeroTol
ForcingFactory & GetForcingFactory()
Declaration of the forcing factory singleton.
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 Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Vdiv(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.