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);
147 for (i = 0; i < nvariables; ++i)
156 for (i = 0; i < nvariables; ++i)
170 Array <OneD, NekDouble > a_vel (npoints, 0.0);
171 Array <OneD, NekDouble > u_abs (npoints, 0.0);
172 Array <OneD, NekDouble > pres (npoints, 0.0);
173 Array <OneD, NekDouble > wave_sp(npoints, 0.0);
179 Vmath::Vadd(npoints, a_vel, 1, u_abs, 1, wave_sp, 1);
185 outarrayDiff[nvariables-1], 1,
186 outarrayDiff[nvariables-1], 1);
190 outarrayDiff[nvariables-1], 1,
191 outarrayDiff[nvariables-1], 1);
195 outarrayDiff[nvariables-1], 1,
196 outarrayDiff[nvariables-1], 1);
198 for (i = 0; i < nvariables; ++i)
206 Array<OneD, Array<OneD, NekDouble> > outarrayForcing(nvariables);
208 for (i = 0; i < nvariables; ++i)
210 outarrayForcing[i] = Array<OneD, NekDouble>(npoints, 0.0);
215 for (i = 0; i < nvariables; ++i)
220 outarrayForcing[i], 1,
227 const Array<
OneD,
const Array<OneD, NekDouble> > &inarray,
228 Array<
OneD, Array<OneD, NekDouble> > &outarray,
232 int nvariables = inarray.num_elements();
241 for(i = 0; i < nvariables; ++i)
251 ASSERTL0(
false,
"No Continuous Galerkin for Euler equations");
255 ASSERTL0(
false,
"Unknown projection scheme");
261 Array<
OneD, Array<OneD, NekDouble> > &inarray,
265 int nvariables =
m_fields.num_elements();
269 for (
int n = 0; n <
m_fields[0]->GetBndConditions().num_elements(); ++n)
272 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
279 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
282 ASSERTL0(
false,
"WallViscous is a wrong bc for the "
287 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
294 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
301 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined() ==
308 if (
m_fields[0]->GetBndConditions()[n]->GetUserDefined()
311 for (
int i = 0; i < nvariables; ++i)
314 m_fields[i]->EvaluateBoundaryConditions(time, varName);
318 cnt +=
m_fields[0]->GetBndCondExpansions()[n]->GetExpSize();