42 RegisterCreatorFunction(
"UnsteadyAdvection",
44 "Unsteady Advection equation.");
48 : UnsteadySystem(pSession),
49 AdvectionSystem(pSession)
65 std::vector<std::string> vel;
85 "AdvectionType", advName,
"NonConservative");
115 "AdvectionType", advName,
"WeakDG");
129 "UpwindType", riemName,
"Upwind");
141 ASSERTL0(
false,
"Unsupported projection type.");
155 ASSERTL0(
false,
"Implicit unsteady Advection not set up.");
176 Array<OneD, NekDouble> tmp(nTracePts);
181 for (i = 0; i <
m_velocity.num_elements(); ++i)
203 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
204 Array<
OneD, Array<OneD, NekDouble> >&outarray,
211 int nVariables = inarray.num_elements();
221 for (i = 0; i < nVariables; ++i)
235 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
236 Array<
OneD, Array<OneD, NekDouble> >&outarray,
243 int nVariables = inarray.num_elements();
258 for(i = 0; i < nVariables; ++i)
260 Vmath::Vcopy(nQuadraturePts, inarray[i], 1, outarray[i], 1);
270 for(i = 0; i < nVariables; ++i)
272 m_fields[i]->FwdTrans(inarray[i], coeffs);
273 m_fields[i]->BwdTrans_IterPerExp(coeffs, outarray[i]);
279 ASSERTL0(
false,
"Unknown projection scheme");
292 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
293 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &flux)
296 "Dimension of flux array and velocity array do not match");
299 int nq = physfield[0].num_elements();
301 for (i = 0; i < flux.num_elements(); ++i)
303 for (j = 0; j < flux[0].num_elements(); ++j)
320 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
321 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &flux)
324 "Dimension of flux array and velocity array do not match");
327 int nq = physfield[0].num_elements();
328 int nVariables = physfield.num_elements();
333 Array<OneD, Array<OneD, NekDouble> >
337 nq =
m_fields[0]->Get1DScaledTotPoints(OneDptscale);
340 Array<OneD, Array<OneD, NekDouble> >physfieldInterp(nVariables);
341 Array<OneD, Array<OneD, NekDouble> >velocityInterp(
m_expdim);
342 Array<OneD, Array<OneD, Array<OneD, NekDouble> > >fluxInterp(nVariables);
345 for (i = 0; i < nVariables; ++i)
347 physfieldInterp[i] = Array<OneD, NekDouble>(nq);
348 fluxInterp[i] = Array<OneD, Array<OneD, NekDouble> >(
m_expdim);
351 fluxInterp[i][j] = Array<OneD, NekDouble>(nq);
355 OneDptscale, physfield[i], physfieldInterp[i]);
361 velocityInterp[j] = Array<OneD, NekDouble>(nq);
364 OneDptscale,
m_velocity[j], velocityInterp[j]);
368 for (i = 0; i < flux.num_elements(); ++i)
370 for (j = 0; j < flux[0].num_elements(); ++j)
372 Vmath::Vmul(nq, physfieldInterp[i], 1, velocityInterp[j], 1,
373 fluxInterp[i][j], 1);
378 for (i = 0; i < nVariables; ++i)
382 m_fields[0]->PhysGalerkinProjection1DScaled(
383 OneDptscale, fluxInterp[i][j], flux[i][j]);