Compute the advection term at each time-step using the Discontinuous Galerkin approach (DG).
87 boost::ignore_unused(advVel, time);
89 int nPointsTot = fields[0]->GetTotPoints();
90 int nCoeffs = fields[0]->GetNcoeffs();
91 int nTracePointsTot = fields[0]->GetTrace()->GetTotPoints();
94 Array<OneD, Array<OneD, NekDouble> > tmp(nConvectiveFields);
95 Array<OneD, Array<OneD, Array<OneD, NekDouble> > > fluxvector(
99 for (i = 0; i < nConvectiveFields; ++i)
102 Array<OneD, Array<OneD, NekDouble> >(
m_spaceDim);
105 fluxvector[i][j] = Array<OneD, NekDouble>(nPointsTot);
110 "Riemann solver must be provided for AdvectionWeakDG.");
115 for(i = 0; i < nConvectiveFields; ++i)
117 tmp[i] = Array<OneD, NekDouble>(nCoeffs, 0.0);
119 fields[i]->IProductWRTDerivBase(fluxvector[i],tmp[i]);
123 Array<OneD, Array<OneD, NekDouble> > Fwd (nConvectiveFields);
124 Array<OneD, Array<OneD, NekDouble> > Bwd (nConvectiveFields);
125 Array<OneD, Array<OneD, NekDouble> > numflux(nConvectiveFields);
130 for(i = 0; i < nConvectiveFields; ++i)
132 Fwd[i] = Array<OneD, NekDouble>(nTracePointsTot, 0.0);
133 Bwd[i] = Array<OneD, NekDouble>(nTracePointsTot, 0.0);
134 numflux[i] = Array<OneD, NekDouble>(nTracePointsTot, 0.0);
135 fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
140 for(i = 0; i < nConvectiveFields; ++i)
144 numflux[i] = Array<OneD, NekDouble>(nTracePointsTot, 0.0);
151 for(i = 0; i < nConvectiveFields; ++i)
154 fields[i]->AddTraceIntegral (numflux[i], tmp[i]);
155 fields[i]->MultiplyByElmtInvMass(tmp[i], tmp[i]);
156 fields[i]->BwdTrans (tmp[i], outarray[i]);
RiemannSolverSharedPtr m_riemann
Riemann solver for DG-type schemes.
void Neg(int n, T *x, const int incx)
Negate x = -x.
AdvectionFluxVecCB m_fluxVector
Callback function to the flux vector (set when advection is in conservative form).
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayofArray
int m_spaceDim
Storage for space dimension. Used for homogeneous extension.
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode...