43 RegisterCreatorFunction(
"UnsteadyAdvectionDiffusion",
66 std::vector<std::string> vel;
86 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
88 CreateInstance(advName, advName);
91 m_session->LoadSolverInfo(
"UpwindType", riemName,
"Upwind");
93 CreateInstance(riemName);
100 std::string diffName;
101 m_session->LoadSolverInfo(
"DiffusionType", diffName,
"LDG");
103 CreateInstance(diffName, diffName);
115 m_session->LoadSolverInfo(
"AdvectionType", advName,
118 CreateInstance(advName, advName);
125 ASSERTL0(
false,
"Explicit Galerkin diffusion not set up.");
132 ASSERTL0(
false,
"Unsupported projection type.");
165 Array<OneD, NekDouble> tmp(nTracePts);
166 m_traceVn = Array<OneD, NekDouble>(nTracePts, 0.0);
171 for (i = 0; i <
m_velocity.num_elements(); ++i)
194 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
195 Array<
OneD, Array<OneD, NekDouble> >&outarray,
199 int nVariables = inarray.num_elements();
204 Array<OneD, Array<OneD, NekDouble> > outarrayDiff(nVariables);
206 for (
int i = 0; i < nVariables; ++i)
208 outarrayDiff[i] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
216 for (
int i = 0; i < nVariables; ++i)
226 for (
int i = 0; i < nVariables; ++i)
229 &outarrayDiff[i][0], 1, &outarray[i][0], 1);
244 const Array<
OneD,
const Array<OneD, NekDouble> > &inarray,
245 Array<
OneD, Array<OneD, NekDouble> > &outarray,
249 int nvariables = inarray.num_elements();
258 for(i = 0; i < nvariables; ++i)
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");
293 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
294 Array<
OneD, Array<OneD, NekDouble> >&outarray,
298 int nvariables = inarray.num_elements();
304 Array<OneD, Array< OneD, NekDouble> > F(nvariables);
305 F[0] = Array<OneD, NekDouble> (nq*nvariables);
307 for (
int n = 1; n < nvariables; ++n)
316 for (
int i = 0; i < nvariables; ++i)
320 inarray[i], 1, F[i], 1);
326 for (
int i = 0; i < nvariables; ++i)
343 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
344 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &flux)
347 "Dimension of flux array and velocity array do not match");
349 const int nq =
m_fields[0]->GetNpoints();
351 for (
int i = 0; i < flux.num_elements(); ++i)
353 for (
int j = 0; j < flux[0].num_elements(); ++j)
373 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
374 Array<
OneD, Array<OneD, NekDouble> > &derivatives,
375 Array<
OneD, Array<OneD, NekDouble> > &flux)
377 for (
int k = 0; k < flux.num_elements(); ++k)