35 #include <boost/core/ignore_unused.hpp>
48 std::string Advection3DHomogeneous1D::type[] = {
50 "WeakDG3DHomogeneous1D", Advection3DHomogeneous1D::create),
52 "FRDG3DHomogeneous1D", Advection3DHomogeneous1D::create),
54 "FRDG3DHomogeneous1D", Advection3DHomogeneous1D::create),
56 "FRSD3DHomogeneous1D", Advection3DHomogeneous1D::create),
58 "FRHU3DHomogeneous1D", Advection3DHomogeneous1D::create),
60 "FRcmin3DHomogeneous1D", Advection3DHomogeneous1D::create),
62 "FRcinf3DHomogeneous1D", Advection3DHomogeneous1D::create)};
72 Advection3DHomogeneous1D::Advection3DHomogeneous1D(std::string advType)
77 string advName = advType.substr(0, advType.length() - 15);
92 int nConvectiveFields = pFields.size();
98 for (
int i = 0; i < nConvectiveFields; ++i)
100 pFields_plane0[i] = pFields[i]->GetPlane(0);
102 m_planeAdv->InitObject(pSession, pFields_plane0);
116 map<string, RSScalarFuncType> scalars =
m_riemann->GetScalars();
117 map<string, RSVecFuncType> vectors =
m_riemann->GetVectors();
119 for (
auto &it1 : scalars)
121 std::shared_ptr<HomoRSScalar> tmp =
127 for (
auto &it2 : vectors)
129 std::shared_ptr<HomoRSVector> tmp =
139 for (
int i = 0; i < nConvectiveFields; ++i)
142 for (
int j = 0; j < 3; ++j)
165 for (
int j = 0; j < nConvectiveFields; ++j)
168 for (
int k = 0; k < 3; ++k)
188 const int nConvectiveFields,
196 boost::ignore_unused(pFwd, pBwd);
199 int nVel = advVel.size();
210 for (
int j = 0; j < nConvectiveFields; ++j)
219 for (
int j = 0; j < nVel; ++j)
221 if (advVel[j].size() != 0)
234 for (
int i = 0; i < nConvectiveFields; ++i)
246 boost::ignore_unused(inarray);
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Array< OneD, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > > m_fluxVecPlane
Array< OneD, Array< OneD, NekDouble > > m_outarrayPlane
Array< OneD, unsigned int > m_planePos
virtual void v_Advect(const int nConvField, const Array< OneD, MultiRegions::ExpListSharedPtr > &fields, const Array< OneD, Array< OneD, NekDouble >> &advVel, const Array< OneD, Array< OneD, NekDouble >> &inarray, Array< OneD, Array< OneD, NekDouble >> &outarray, const NekDouble &time, const Array< OneD, Array< OneD, NekDouble >> &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble >> &pBwd=NullNekDoubleArrayOfArray) override
Compute the advection operator for a given input inarray and put the result in outarray.
Array< OneD, Array< OneD, NekDouble > > m_advVelPlane
Array< OneD, unsigned int > m_planes
Array< OneD, Array< OneD, NekDouble > > m_inarrayPlane
Array< OneD, MultiRegions::ExpListSharedPtr > m_fieldsPlane
Array< OneD, Array< OneD, Array< OneD, NekDouble > > > m_fluxVecStore
virtual void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) override
Initiliase Advection3DHomogeneous1D objects and store them before starting the time-stepping.
void ModifiedFluxVector(const Array< OneD, Array< OneD, NekDouble >> &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble >>> &flux)
SolverUtils::AdvectionSharedPtr m_planeAdv
AdvectionFluxVecCB m_fluxVector
Callback function to the flux vector (set when advection is in conservative form).
RiemannSolverSharedPtr m_riemann
Riemann solver for DG-type schemes.
const Array< OneD, const NekDouble > & Exec()
const Array< OneD, const Array< OneD, NekDouble > > & Exec()
std::shared_ptr< SessionReader > SessionReaderSharedPtr
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
The above copyright notice and this permission notice shall be included.
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.