42 RegisterCreatorFunction(
"UnsteadyAdvection",
44 "Unsteady Advection equation.");
64 std::vector<std::string> vel;
84 "AdvectionType", advName,
"NonConservative");
114 "AdvectionType", advName,
"WeakDG");
128 "UpwindType", riemName,
"Upwind");
140 ASSERTL0(
false,
"Unsupported projection type.");
154 ASSERTL0(
false,
"Implicit unsteady Advection not set up.");
175 Array<OneD, NekDouble> tmp(nTracePts);
180 for (i = 0; i <
m_velocity.num_elements(); ++i)
202 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
203 Array<
OneD, Array<OneD, NekDouble> >&outarray,
210 int nVariables = inarray.num_elements();
220 for (i = 0; i < nVariables; ++i)
234 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
235 Array<
OneD, Array<OneD, NekDouble> >&outarray,
242 int nVariables = inarray.num_elements();
257 for(i = 0; i < nVariables; ++i)
259 Vmath::Vcopy(nQuadraturePts, inarray[i], 1, outarray[i], 1);
269 for(i = 0; i < nVariables; ++i)
271 m_fields[i]->FwdTrans(inarray[i], coeffs);
272 m_fields[i]->BwdTrans_IterPerExp(coeffs, outarray[i]);
278 ASSERTL0(
false,
"Unknown projection scheme");
291 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
292 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &flux)
295 "Dimension of flux array and velocity array do not match");
298 int nq = physfield[0].num_elements();
300 for (i = 0; i < flux.num_elements(); ++i)
302 for (j = 0; j < flux[0].num_elements(); ++j)
319 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
320 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &flux)
323 "Dimension of flux array and velocity array do not match");
326 int nq = physfield[0].num_elements();
327 int nVariables = physfield.num_elements();
332 Array<OneD, Array<OneD, NekDouble> >
336 nq =
m_fields[0]->Get1DScaledTotPoints(OneDptscale);
339 Array<OneD, Array<OneD, NekDouble> >physfieldInterp(nVariables);
340 Array<OneD, Array<OneD, NekDouble> >velocityInterp(
m_expdim);
341 Array<OneD, Array<OneD, Array<OneD, NekDouble> > >fluxInterp(nVariables);
344 for (i = 0; i < nVariables; ++i)
346 physfieldInterp[i] = Array<OneD, NekDouble>(nq);
347 fluxInterp[i] = Array<OneD, Array<OneD, NekDouble> >(
m_expdim);
350 fluxInterp[i][j] = Array<OneD, NekDouble>(nq);
354 OneDptscale, physfield[i], physfieldInterp[i]);
360 velocityInterp[j] = Array<OneD, NekDouble>(nq);
363 OneDptscale,
m_velocity[j], velocityInterp[j]);
367 for (i = 0; i < flux.num_elements(); ++i)
369 for (j = 0; j < flux[0].num_elements(); ++j)
371 Vmath::Vmul(nq, physfieldInterp[i], 1, velocityInterp[j], 1,
372 fluxInterp[i][j], 1);
377 for (i = 0; i < nVariables; ++i)
381 m_fields[0]->PhysGalerkinProjection1DScaled(
382 OneDptscale, fluxInterp[i][j], flux[i][j]);