60 Array<OneD, MultiRegions::ExpListSharedPtr> pFields)
77 const int nConvectiveFields,
78 const Array<OneD, MultiRegions::ExpListSharedPtr> &fields,
79 const Array<
OneD, Array<OneD, NekDouble> > &advVel,
80 const Array<
OneD, Array<OneD, NekDouble> > &inarray,
81 Array<
OneD, Array<OneD, NekDouble> > &outarray)
83 int nDim = fields[0]->GetCoordim(0);
84 int nPointsTot = fields[0]->GetTotPoints();
85 int nCoeffs = fields[0]->GetNcoeffs();
86 int nTracePointsTot = fields[0]->GetTrace()->GetTotPoints();
89 Array<OneD, Array<OneD, NekDouble> > tmp(nConvectiveFields);
90 Array<OneD, Array<OneD, Array<OneD, NekDouble> > > fluxvector(
94 for (i = 0; i < nConvectiveFields; ++i)
97 Array<OneD, Array<OneD, NekDouble> >(
m_spaceDim);
100 fluxvector[i][j] = Array<OneD, NekDouble>(nPointsTot);
105 "Riemann solver must be provided for AdvectionWeakDG.");
110 for(i = 0; i < nConvectiveFields; ++i)
112 tmp[i] = Array<OneD, NekDouble>(nCoeffs, 0.0);
114 for (j = 0; j < nDim; ++j)
116 fields[i]->IProductWRTDerivBase(j, fluxvector[i][j],
118 Vmath::Vadd(nCoeffs, outarray[i], 1, tmp[i], 1, tmp[i], 1);
123 Array<OneD, Array<OneD, NekDouble> > Fwd (nConvectiveFields);
124 Array<OneD, Array<OneD, NekDouble> > Bwd (nConvectiveFields);
125 Array<OneD, Array<OneD, NekDouble> > numflux(nConvectiveFields);
127 for(i = 0; i < nConvectiveFields; ++i)
129 Fwd[i] = Array<OneD, NekDouble>(nTracePointsTot, 0.0);
130 Bwd[i] = Array<OneD, NekDouble>(nTracePointsTot, 0.0);
131 numflux[i] = Array<OneD, NekDouble>(nTracePointsTot, 0.0);
132 fields[i]->GetFwdBwdTracePhys(inarray[i], Fwd[i], Bwd[i]);
138 for(i = 0; i < nConvectiveFields; ++i)
141 fields[i]->AddTraceIntegral (numflux[i], tmp[i]);
142 fields[i]->MultiplyByElmtInvMass(tmp[i], tmp[i]);
143 fields[i]->BwdTrans (tmp[i], outarray[i]);