44 "UnsteadyAdvectionDiffusion",
49 : UnsteadySystem(pSession),
50 AdvectionSystem(pSession)
68 std::vector<std::string> vel;
97 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
99 CreateInstance(advName, advName);
102 m_session->LoadSolverInfo(
"UpwindType", riemName,
"Upwind");
104 CreateInstance(riemName);
111 std::string diffName;
112 m_session->LoadSolverInfo(
"DiffusionType", diffName,
"LDG");
114 CreateInstance(diffName, diffName);
126 m_session->LoadSolverInfo(
"AdvectionType", advName,
129 CreateInstance(advName, advName);
136 ASSERTL0(
false,
"Explicit Galerkin diffusion not set up.");
143 ASSERTL0(
false,
"Unsupported projection type.");
176 Array<OneD, NekDouble> tmp(nTracePts);
177 m_traceVn = Array<OneD, NekDouble>(nTracePts, 0.0);
182 for (i = 0; i <
m_velocity.num_elements(); ++i)
205 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
206 Array<
OneD, Array<OneD, NekDouble> >&outarray,
210 int nVariables = inarray.num_elements();
215 Array<OneD, Array<OneD, NekDouble> > outarrayDiff(nVariables);
217 for (
int i = 0; i < nVariables; ++i)
219 outarrayDiff[i] = Array<OneD, NekDouble>(nSolutionPts, 0.0);
224 inarray, outarray, time);
227 for (
int i = 0; i < nVariables; ++i)
237 for (
int i = 0; i < nVariables; ++i)
240 &outarrayDiff[i][0], 1, &outarray[i][0], 1);
255 const Array<
OneD,
const Array<OneD, NekDouble> > &inarray,
256 Array<
OneD, Array<OneD, NekDouble> > &outarray,
260 int nvariables = inarray.num_elements();
269 for(i = 0; i < nvariables; ++i)
280 for(i = 0; i < nvariables; ++i)
282 m_fields[i]->FwdTrans(inarray[i], coeffs);
283 m_fields[i]->BwdTrans_IterPerExp(coeffs, outarray[i]);
289 ASSERTL0(
false,
"Unknown projection scheme");
304 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
305 Array<
OneD, Array<OneD, NekDouble> >&outarray,
309 int nvariables = inarray.num_elements();
321 Array<OneD, Array< OneD, NekDouble> > F(nvariables);
322 F[0] = Array<OneD, NekDouble> (nq*nvariables);
324 for (
int n = 1; n < nvariables; ++n)
333 for (
int i = 0; i < nvariables; ++i)
337 inarray[i], 1, F[i], 1);
343 for (
int i = 0; i < nvariables; ++i)
360 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
361 Array<
OneD, Array<
OneD, Array<OneD, NekDouble> > > &flux)
364 "Dimension of flux array and velocity array do not match");
366 const int nq =
m_fields[0]->GetNpoints();
368 for (
int i = 0; i < flux.num_elements(); ++i)
370 for (
int j = 0; j < flux[0].num_elements(); ++j)
390 const Array<
OneD, Array<OneD, NekDouble> > &physfield,
391 Array<
OneD, Array<OneD, NekDouble> > &derivatives,
392 Array<
OneD, Array<OneD, NekDouble> > &flux)
394 for (
int k = 0; k < flux.num_elements(); ++k)