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)
73 Advection3DHomogeneous1D::Advection3DHomogeneous1D(std::string advType)
78 string advName = advType.substr(0, advType.length()-15);
93 int nConvectiveFields = pFields.size();
99 for (
int i = 0; i < nConvectiveFields; ++i)
101 pFields_plane0[i] = pFields[i]->GetPlane(0);
103 m_planeAdv->InitObject(pSession, pFields_plane0);
117 map<string, RSScalarFuncType> scalars =
m_riemann->GetScalars();
118 map<string, RSVecFuncType> vectors =
m_riemann->GetVectors();
120 for (
auto &it1 : scalars)
127 for (
auto &it2 : vectors)
138 for (
int i = 0; i < nConvectiveFields; ++i)
141 for (
int j = 0; j < 3; ++j)
166 for (
int j = 0; j < nConvectiveFields; ++j)
170 for (
int k = 0; k < 3; ++k)
191 const int nConvectiveFields,
200 boost::ignore_unused(pFwd, pBwd);
203 int nVel = advVel.size();
214 for (
int j = 0; j < nConvectiveFields; ++j)
223 for (
int j = 0; j < nVel; ++j)
225 if (advVel[j].size() != 0)
239 for (
int i = 0; i < nConvectiveFields; ++i)
252 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
void ModifiedFluxVector(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &flux)
Array< OneD, Array< OneD, NekDouble > > m_outarrayPlane
virtual void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Initiliase Advection3DHomogeneous1D objects and store them before starting the time-stepping.
Array< OneD, unsigned int > m_planePos
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
SolverUtils::AdvectionSharedPtr m_planeAdv
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)
Compute the advection operator for a given input inarray and put the result in outarray.
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.