77 const int nConvectiveFields,
89 size_t nCoeffs = fields[0]->GetNcoeffs();
92 for (
int i = 0; i < nConvectiveFields; ++i)
98 AdvectCoeffs(nConvectiveFields, fields, advVel, inarray, tmp, time, pFwd,
104 for (
int i = 0; i < nConvectiveFields; ++i)
106 fields[i]->BwdTrans(tmp[i], outarray[i]);
118 const int nConvectiveFields,
126 size_t nPointsTot = fields[0]->GetTotPoints();
127 size_t nCoeffs = fields[0]->GetNcoeffs();
128 size_t nTracePointsTot = fields[0]->GetTrace()->GetTotPoints();
133 for (
int i = 0; i < nConvectiveFields; ++i)
150 for (
int i = 0; i < nConvectiveFields; ++i)
152 Vmath::Fill(outarray[i].size(), 0.0, outarray[i], 1);
153 fields[i]->IProductWRTDerivBase(fluxvector[i], outarray[i]);
160 for (
int i = 0; i < nConvectiveFields; ++i)
165 AdvectTraceFlux(nConvectiveFields, fields, advVel, inarray, numflux, time,
169 for (
int i = 0; i < nConvectiveFields; ++i)
174 fields[i]->AddTraceIntegral(numflux[i], outarray[i]);
179 if (!fields[0]->GetGraph()->GetMovement()->GetMoveFlag() ||
180 fields[0]->GetGraph()->GetMovement()->GetImplicitALESolverFlag())
182 for (
int i = 0; i < nConvectiveFields; ++i)
185 fields[i]->MultiplyByElmtInvMass(outarray[i], outarray[i]);
196 const int nConvectiveFields,
205 int nTracePointsTot = fields[0]->GetTrace()->GetTotPoints();
215 for (
int i = 0; i < nConvectiveFields; ++i)
219 fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
224 for (
int i = 0; i < nConvectiveFields; ++i)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
void AccumulateRegion(std::string, int iolevel=0)
Accumulate elapsed time for a region.
int m_spaceDim
Storage for space dimension. Used for homogeneous extension.
virtual SOLVER_UTILS_EXPORT void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields)
Initialises the advection object.
RiemannSolverSharedPtr m_riemann
Riemann solver for DG-type schemes.
SOLVER_UTILS_EXPORT void AdvectVolumeFlux(const Array< OneD, Array< OneD, NekDouble > > &inarray, TensorOfArray3D< NekDouble > &VolumeFlux)
void v_InitObject(LibUtilities::SessionReaderSharedPtr pSession, Array< OneD, MultiRegions::ExpListSharedPtr > pFields) override
Initialise AdvectionWeakDG objects and store them before starting the time-stepping.
SOLVER_UTILS_EXPORT void AdvectTraceFlux(const int nConvective, 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 > > &TraceFlux, const NekDouble &time, const Array< OneD, Array< OneD, NekDouble > > &pFwd=NullNekDoubleArrayOfArray, const Array< OneD, Array< OneD, NekDouble > > &pBwd=NullNekDoubleArrayOfArray)
static AdvectionSharedPtr create(std::string advType)
void v_Advect(const int nConvective, 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 term at each time-step using the Discontinuous Galerkin approach (DG).
SOLVER_UTILS_EXPORT void AdvectCoeffs(const int nConvective, 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)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray
void Neg(int n, T *x, const int incx)
Negate x = -x.
void Fill(int n, const T alpha, T *x, const int incx)
Fill a vector with a constant value.