38 #include <boost/algorithm/string.hpp>
45 "Euler equations in conservative variables with "
46 "artificial diffusion.");
61 "Not enough variables for smooth shock capturing; "
62 "make sure you have added eps to variable list.");
69 if(
m_session->DefinesSolverInfo(
"PROBLEMTYPE"))
71 std::string ProblemTypeStr =
m_session->GetSolverInfo(
"PROBLEMTYPE");
96 ASSERTL0(
false,
"Implicit CFE not set up.");
114 bool dumpInitialConditions,
119 if(dumpInitialConditions)
127 const Array<
OneD,
const Array<OneD, NekDouble> > &inarray,
128 Array<
OneD, Array<OneD, NekDouble> > &outarray,
132 int nvariables = inarray.num_elements();
135 Array<OneD, Array<OneD, NekDouble> > advVel;
136 Array<OneD, Array<OneD, NekDouble> > outarrayAdv(nvariables);
137 Array<OneD, Array<OneD, NekDouble> > outarrayDiff(nvariables);
139 for (i = 0; i < nvariables; ++i)
141 outarrayAdv[i] = Array<OneD, NekDouble>(npoints, 0.0);
142 outarrayDiff[i] = Array<OneD, NekDouble>(npoints, 0.0);
148 for (i = 0; i < nvariables; ++i)
157 for (i = 0; i < nvariables; ++i)
171 Array <OneD, NekDouble > a_vel (npoints, 0.0);
172 Array <OneD, NekDouble > u_abs (npoints, 0.0);
173 Array <OneD, NekDouble > pres (npoints, 0.0);
174 Array <OneD, NekDouble > wave_sp(npoints, 0.0);
180 Vmath::Vadd(npoints, a_vel, 1, u_abs, 1, wave_sp, 1);
186 outarrayDiff[nvariables-1], 1,
187 outarrayDiff[nvariables-1], 1);
191 outarrayDiff[nvariables-1], 1,
192 outarrayDiff[nvariables-1], 1);
196 outarrayDiff[nvariables-1], 1,
197 outarrayDiff[nvariables-1], 1);
199 for (i = 0; i < nvariables; ++i)
207 Array<OneD, Array<OneD, NekDouble> > outarrayForcing(nvariables);
209 for (i = 0; i < nvariables; ++i)
211 outarrayForcing[i] = Array<OneD, NekDouble>(npoints, 0.0);
216 for (i = 0; i < nvariables; ++i)
221 outarrayForcing[i], 1,
228 const Array<
OneD,
const Array<OneD, NekDouble> > &inarray,
229 Array<
OneD, Array<OneD, NekDouble> > &outarray,
233 int nvariables = inarray.num_elements();
242 for(i = 0; i < nvariables; ++i)
252 ASSERTL0(
false,
"No Continuous Galerkin for Euler equations");
256 ASSERTL0(
false,
"Unknown projection scheme");
262 Array<
OneD, Array<OneD, NekDouble> > &inarray,
266 int nvariables =
m_fields.num_elements();
270 for (
int n = 0; n <
m_fields[0]->GetBndConditions().num_elements(); ++n)
273 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
280 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
283 ASSERTL0(
false,
"WallViscous is a wrong bc for the "
288 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
295 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
302 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
309 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined()
312 for (
int i = 0; i < nvariables; ++i)
315 m_fields[i]->EvaluateBoundaryConditions(time, varName);
319 cnt +=
m_fields[0]->GetBndCondExpansions()[n]->GetExpSize();