57 for (
size_t i = 0; i <
m_fields.size(); i++)
68 "No UPWINDTYPE defined in session.");
100 for (
size_t n = 0; n < (size_t)
m_fields[0]->GetBndConditions().size(); ++n)
102 std::string type =
m_fields[0]->GetBndConditions()[n]->GetUserDefined();
104 if (
m_fields[0]->GetBndConditions()[n]->GetBoundaryConditionType() ==
116 cnt +=
m_fields[0]->GetBndCondExpansions()[n]->GetExpSize();
138 " is not supported by this solver";
157 "Local time stepping requires CFL parameter.");
168 "Unsupported projection type.");
170 std::string advName, riemName;
171 m_session->LoadSolverInfo(
"AdvectionType", advName,
"WeakDG");
188 m_session->LoadSolverInfo(
"UpwindType", riemName,
"Average");
218 size_t nvariables = inarray.size();
245 for (
size_t i = 0; i < nvariables; ++i)
249 m_fields[i]->GetFwdBwdTracePhys(tmpIn[i], Fwd[i], Bwd[i]);
260 for (
size_t i = 0; i < nvariables; ++i)
262 Vmath::Neg(outarray[i].size(), outarray[i], 1);
274 x->Apply(
m_fields, tmpIn, outarray, time);
279 size_t nElements =
m_fields[0]->GetExpSize();
288 for (
size_t n = 0; n < nElements; ++n)
290 nq =
m_fields[0]->GetExp(n)->GetTotPoints();
291 offset =
m_fields[0]->GetPhys_Offset(n);
293 for (
size_t i = 0; i < nvariables; ++i)
296 tmp = outarray[i] + offset, 1);
310 size_t nvariables = inarray.size();
323 for (
size_t i = 0; i < nvariables; ++i)
325 Vmath::Vcopy(inarray[i].size(), inarray[i], 1, outarray[i], 1);
341 "compressible Navier-Stokes equations");
359 int nvariables = inarray.size();
364 auto advWeakDGObject =
365 std::dynamic_pointer_cast<SolverUtils::AdvectionWeakDG>(
367 advWeakDGObject->AdvectCoeffs(nvariables,
m_fields, advVel, inarray,
368 outarray, time, pFwd, pBwd);
393 size_t nvariables = physarray.size();
408 for (
size_t i = 0; i < nvariables; ++i)
411 m_fields[i]->ExtractTracePhys(tmpIn[i], Fwd[i]);
419 x->Apply(Fwd, tmpIn, time);
449 size_t nVariables = physfield.size();
450 size_t nPts = physfield[0].size();
452 constexpr unsigned short maxVel = 3;
453 constexpr unsigned short maxFld = 5;
456 ASSERTL1(nVariables <= maxFld,
"GetFluxVector, hard coded max fields");
458 for (
size_t p = 0;
p < nPts; ++
p)
461 std::array<NekDouble, maxFld> fieldTmp = {0};
462 std::array<NekDouble, maxVel> velocity = {0};
465 for (
size_t f = 0; f < nVariables; ++f)
467 fieldTmp[f] = physfield[f][
p];
476 flux[0][
d][
p] = fieldTmp[
d + 1];
478 velocity[
d] = fieldTmp[
d + 1] * oneOrho;
488 flux[f + 1][
d][
p] = velocity[
d] * fieldTmp[f + 1];
510 for (
int k = 0; k < nPts; ++k)
531 size_t nq = physfield[0].size();
532 size_t nVariables =
m_fields.size();
536 nq =
m_fields[0]->Get1DScaledTotPoints(OneDptscale);
544 for (
size_t i = 0; i < nVariables; ++i)
548 m_fields[0]->PhysInterp1DScaled(OneDptscale, physfield[i],
549 physfield_interp[i]);
563 m_fields[0]->PhysGalerkinProjection1DScaled(
564 OneDptscale, physfield_interp[i + 1], flux[0][i]);
567 m_varConv->GetVelocityVector(physfield_interp, velocity);
575 Vmath::Vmul(nq, velocity[j], 1, physfield_interp[i + 1], 1,
576 flux_interp[i + 1][j], 1);
581 flux_interp[i + 1][i], 1);
589 m_fields[0]->PhysGalerkinProjection1DScaled(
590 OneDptscale, flux_interp[i + 1][j], flux[i + 1][j]);
604 m_fields[0]->PhysGalerkinProjection1DScaled(
618 size_t nElements =
m_fields[0]->GetExpSize();
631 for (
size_t n = 0; n < nElements; ++n)
646 int nElements =
m_fields[0]->GetExpSize();
661 if (
m_session->DefinesSolverInfo(
"ICTYPE"))
663 if (boost::iequals(
m_session->GetSolverInfo(
"ICTYPE"),
668 else if (boost::iequals(
m_session->GetSolverInfo(
"ICTYPE"),
684 NekDouble initialtime,
bool dumpInitialConditions,
685 [[maybe_unused]]
const int domain)
687 if (
m_session->DefinesSolverInfo(
"ICTYPE") &&
688 boost::iequals(
m_session->GetSolverInfo(
"ICTYPE"),
"IsentropicVortex"))
691 for (
int i = 0; i <
m_fields.size(); ++i)
706 int phystot =
m_fields[0]->GetTotPoints();
709 m_session->LoadParameter(
"Noise", Noise, 0.0);
710 int m_nConvectiveFields =
m_fields.size();
714 int seed = -
m_comm->GetSpaceComm()->GetRank() * m_nConvectiveFields;
715 for (
int i = 0; i < m_nConvectiveFields; i++)
728 !
m_comm->IsParallelInTime())
732 else if (dumpInitialConditions &&
m_nchk == 0 &&
m_comm->IsParallelInTime())
735 if (!fs::is_directory(newdir))
737 fs::create_directory(newdir);
739 if (
m_comm->GetTimeComm()->GetRank() == 0)
751 if (!
m_session->DefinesFunction(
"ExactSolution") &&
754 if (boost::iequals(
m_session->GetSolverInfo(
"ICTYPE"),
759 else if (boost::iequals(
m_session->GetSolverInfo(
"ICTYPE"),
779 size_t n_element =
m_fields[0]->GetExpSize();
780 size_t expdim =
m_fields[0]->GetGraph()->GetMeshDimension();
786 for (
size_t i = 0; i < nfields; ++i)
788 physfields[i] =
m_fields[i]->GetPhys();
807 m_varConv->GetVelocityVector(physfields, velocity);
808 m_varConv->GetSoundSpeed(physfields, soundspeed);
817 for (
int el = 0; el < n_element; ++el)
819 ptsKeys =
m_fields[0]->GetExp(el)->GetPointsKeys();
820 offset =
m_fields[0]->GetPhys_Offset(el);
821 int nq =
m_fields[0]->GetExp(el)->GetTotPoints();
824 m_fields[0]->GetExp(el)->GetGeom()->GetMetricInfo();
830 ->GetDerivFactors(ptsKeys);
838 for (
size_t i = 0; i < expdim; ++i)
840 Vmath::Vmul(nq, gmat[i], 1, velocity[0] + offset, 1,
841 tmp = stdVelocity[i] + offset, 1);
842 Vmath::Vmul(nq, gmat[i], 1, soundspeed + offset, 1,
843 tmp = stdSoundSpeed[i] + offset, 1);
844 for (
size_t j = 1; j < expdim; ++j)
847 velocity[j] + offset, 1,
848 stdVelocity[i] + offset, 1,
849 tmp = stdVelocity[i] + offset, 1);
851 soundspeed + offset, 1,
852 stdSoundSpeed[i] + offset, 1,
853 tmp = stdSoundSpeed[i] + offset, 1);
859 for (
size_t i = 0; i < expdim; ++i)
861 Vmath::Smul(nq, gmat[i][0], velocity[0] + offset, 1,
862 tmp = stdVelocity[i] + offset, 1);
863 Vmath::Smul(nq, gmat[i][0], soundspeed + offset, 1,
864 tmp = stdSoundSpeed[i] + offset, 1);
865 for (
size_t j = 1; j < expdim; ++j)
868 velocity[j] + offset, 1,
869 stdVelocity[i] + offset, 1,
870 tmp = stdVelocity[i] + offset, 1);
872 soundspeed + offset, 1,
873 stdSoundSpeed[i] + offset, 1,
874 tmp = stdSoundSpeed[i] + offset, 1);
880 for (
size_t i = 0; i < nq; ++i)
883 for (
size_t j = 0; j < expdim; ++j)
886 vel =
std::abs(stdVelocity[j][offset + i]) +
887 SpeedSoundFactor *
std::abs(stdSoundSpeed[j][offset + i]);
888 pntVelocity += vel * vel;
890 pntVelocity =
sqrt(pntVelocity);
891 if (pntVelocity > stdV[el])
893 stdV[el] = pntVelocity;
910 ASSERTL0(n <= 20,
"Illegal modes dimension for CFL calculation "
911 "(P has to be less then 20)");
913 NekDouble CFLDG[21] = {2.0000, 6.0000, 11.8424, 19.1569, 27.8419,
914 37.8247, 49.0518, 61.4815, 75.0797, 89.8181,
915 105.6700, 122.6200, 140.6400, 159.7300, 179.8500,
916 201.0100, 223.1800, 246.3600, 270.5300, 295.6900,
927 "coefficients not introduced yet.");
945 for (i = 0; i <
m_fields[0]->GetExpSize(); i++)
954 std::vector<std::string> &variables)
957 m_session->MatchSolverInfo(
"OutputExtraFields",
"True", extraFields,
true);
960 const int nPhys =
m_fields[0]->GetNpoints();
961 const int nCoeffs =
m_fields[0]->GetNcoeffs();
964 for (
int i = 0; i <
m_fields.size(); ++i)
982 m_varConv->GetVelocityVector(tmp, velocity);
984 m_varConv->GetTemperature(tmp, temperature);
986 m_varConv->GetSoundSpeed(tmp, soundspeed);
987 m_varConv->GetMach(tmp, soundspeed, mach);
990 m_session->LoadParameter(
"SensorOffset", sensorOffset, 1);
999 std::string velNames[3] = {
"u",
"v",
"w"};
1002 m_fields[0]->FwdTransLocalElmt(velocity[i], velFwd[i]);
1003 variables.push_back(velNames[i]);
1004 fieldcoeffs.push_back(velFwd[i]);
1008 m_fields[0]->FwdTransLocalElmt(temperature, TFwd);
1009 m_fields[0]->FwdTransLocalElmt(entropy, sFwd);
1010 m_fields[0]->FwdTransLocalElmt(soundspeed, aFwd);
1011 m_fields[0]->FwdTransLocalElmt(mach, mFwd);
1012 m_fields[0]->FwdTransLocalElmt(sensor, sensFwd);
1014 variables.push_back(
"p");
1015 variables.push_back(
"T");
1016 variables.push_back(
"s");
1017 variables.push_back(
"a");
1018 variables.push_back(
"Mach");
1019 variables.push_back(
"Sensor");
1020 fieldcoeffs.push_back(pFwd);
1021 fieldcoeffs.push_back(TFwd);
1022 fieldcoeffs.push_back(sFwd);
1023 fieldcoeffs.push_back(aFwd);
1024 fieldcoeffs.push_back(mFwd);
1025 fieldcoeffs.push_back(sensFwd);
1034 variables.push_back(
"ArtificialVisc");
1035 fieldcoeffs.push_back(sensorFwd);
1062 density = physfield[0];
1072 m_varConv->GetVelocityVector(physfield, velocity);
1079 const size_t nFields =
m_fields.size();
1082 for (
size_t i = 0; i < nFields; ++i)
1085 inarray[i] =
m_fields[i]->UpdatePhys();
1095 for (
size_t i = 0; i < nFields; ++i)
1106 for (
size_t i = 0; i < nFields; ++i)
1108 L2[i] =
sqrt(residual[i] * onPoints);
1134 m_session->LoadParameter(
"IsentropicU0", u0, 1.0);
1135 m_session->LoadParameter(
"IsentropicV0", v0, 0.5);
1136 m_session->LoadParameter(
"IsentropicX0", x0, 5.0);
1137 m_session->LoadParameter(
"IsentropicY0", y0, 0.0);
1150 for (
int i = 0; i < nTotQuadPoints; ++i)
1152 xbar = x[i] - u0 * time - x0;
1153 ybar = y[i] - v0 * time - y0;
1154 r =
sqrt(xbar * xbar + ybar * ybar);
1155 tmp =
beta * exp(1 - r * r);
1157 pow(1.0 - (
m_gamma - 1.0) * tmp * tmp * fac, 1.0 / (
m_gamma - 1.0));
1158 u[1][i + o] = u[0][i + o] * (u0 - tmp * ybar / (2 * M_PI));
1159 u[2][i + o] = u[0][i + o] * (v0 + tmp * xbar / (2 * M_PI));
1162 0.5 * (u[1][i + o] * u[1][i + o] + u[2][i + o] * u[2][i + o]) /
1187 NekDouble c, k, phi, r, J, VV, pp, sint,
P, ss;
1201 NekDouble gamma_1_2 = (gamma - 1.0) / 2.0;
1203 for (
int i = 0; i < nTotQuadPoints; ++i)
1205 while ((
abs(errV) > toll) || (
abs(errTheta) > toll))
1209 c =
sqrt(1.0 - gamma_1_2 * VV);
1213 J = 1.0 / c + 1.0 / (3.0 * c * c * c) +
1214 1.0 / (5.0 * c * c * c * c * c) -
1215 0.5 *
log((1.0 + c) / (1.0 - c));
1217 r = pow(c, 1.0 / gamma_1_2);
1218 xi = 1.0 / (2.0 * r) * (1.0 / VV - 2.0 * pp) + J / 2.0;
1219 yi = phi / (r * V) *
sqrt(1.0 - VV * pp);
1220 par1 = 25.0 - 5.0 * VV;
1227 39062.5 / pow(par1, 3.5) * (1.0 / VV - 2.0 / VV * ss) * V +
1228 1562.5 / pow(par1, 2.5) *
1229 (-2.0 / (VV * V) + 4.0 / (VV * V) * ss) +
1230 12.5 / pow(par1, 1.5) * V + 312.5 / pow(par1, 2.5) * V +
1231 7812.5 / pow(par1, 3.5) * V -
1233 (-1.0 / pow(par1, 0.5) * V / (1.0 - 0.2 * pow(par1, 0.5)) -
1234 (1.0 + 0.2 * pow(par1, 0.5)) /
1235 pow((1.0 - 0.2 * pow(par1, 0.5)), 2.0) /
1236 pow(par1, 0.5) * V) /
1237 (1.0 + 0.2 * pow(par1, 0.5)) * (1.0 - 0.2 * pow(par1, 0.5));
1239 J12 = -6250.0 / pow(par1, 2.5) / VV * sint * cos(theta);
1240 J21 = -6250.0 / (VV * V) * sint / pow(par1, 2.5) *
1241 pow((1.0 - ss), 0.5) +
1242 78125.0 / V * sint / pow(par1, 3.5) * pow((1.0 - ss), 0.5);
1245 if (
abs(y[i]) < toll &&
abs(cos(theta)) < toll)
1247 J22 = -39062.5 / pow(par1, 3.5) / V +
1248 3125 / pow(par1, 2.5) / (VV * V) +
1249 12.5 / pow(par1, 1.5) * V + 312.5 / pow(par1, 2.5) * V +
1250 7812.5 / pow(par1, 3.5) * V -
1252 (-1.0 / pow(par1, 0.5) * V /
1253 (1.0 - 0.2 * pow(par1, 0.5)) -
1254 (1.0 + 0.2 * pow(par1, 0.5)) /
1255 pow((1.0 - 0.2 * pow(par1, 0.5)), 2.0) /
1256 pow(par1, 0.5) * V) /
1257 (1.0 + 0.2 * pow(par1, 0.5)) *
1258 (1.0 - 0.2 * pow(par1, 0.5));
1261 dV = -1.0 / J22 * Fx;
1267 J22 = 3125.0 / VV * cos(theta) / pow(par1, 2.5) *
1268 pow((1.0 - ss), 0.5) -
1269 3125.0 / VV * ss / pow(par1, 2.5) / pow((1.0 - ss), 0.5) *
1272 det = -1.0 / (J11 * J22 - J12 * J21);
1275 dV = det * (J22 * Fx - J12 * Fy);
1276 dtheta = det * (-J21 * Fx + J11 * Fy);
1280 theta = theta + dtheta;
1283 errTheta =
abs(dtheta);
1286 c =
sqrt(1.0 - gamma_1_2 * VV);
1287 r = pow(c, 1.0 / gamma_1_2);
1290 rhou[i] = rho[i] * V * cos(theta);
1291 rhov[i] = rho[i] * V * sin(theta);
1292 P = (c * c) * rho[i] / gamma;
1293 E[i] =
P / (gamma - 1.0) +
1294 0.5 * (rhou[i] * rhou[i] / rho[i] + rhov[i] * rhov[i] / rho[i]);
1300 V = kExt * sin(theta);
1318 ASSERTL0(
false,
"Error in variable number!");
1332 for (
int i = 0; i < spaceDim; ++i)
#define ASSERTL0(condition, msg)
#define NEKERROR(type, msg)
Assert Level 0 – Fundamental assert which is used whether in FULLDEBUG, DEBUG or OPT compilation mode...
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
void GetFluxVector(const Array< OneD, const Array< OneD, NekDouble > > &physfield, TensorOfArray3D< NekDouble > &flux)
Return the flux vector for the compressible Euler equations.
CompressibleFlowSystem(const LibUtilities::SessionReaderSharedPtr &pSession, const SpatialDomains::MeshGraphSharedPtr &pGraph)
void v_ALEInitObject(int spaceDim, Array< OneD, MultiRegions::ExpListSharedPtr > &fields) override
void GetElmtTimeStep(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, NekDouble > &tstep)
Calculate the maximum timestep on each element subject to CFL restrictions.
void SetBoundaryConditions(Array< OneD, Array< OneD, NekDouble > > &physarray, NekDouble time)
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the projection and call the method for imposing the boundary conditions in case of discontinu...
NekDouble m_bndEvaluateTime
virtual bool v_SupportsShockCaptType(const std::string type) const =0
std::string m_shockCaptureType
MultiRegions::ExpListSharedPtr v_GetPressure() override
Array< OneD, NekDouble > GetStabilityLimitVector(const Array< OneD, int > &ExpOrder)
Function to calculate the stability limit for DG/CG (a vector of them).
void InitAdvection()
Create advection and diffusion objects for CFS.
NekDouble v_GetTimeStep(const Array< OneD, const Array< OneD, NekDouble > > &inarray) override
Calculate the maximum timestep subject to CFL restrictions.
const Array< OneD, const Array< OneD, NekDouble > > & GetNormals()
void v_GenerateSummary(SolverUtils::SummaryList &s) override
Print a summary of time stepping parameters.
virtual void v_DoDiffusion(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)=0
void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0) override
Set up logic for residual calculation.
void GetExactRinglebFlow(int field, Array< OneD, NekDouble > &outarray)
Ringleb Flow Test Case.
NekDouble m_filterExponent
void v_InitObject(bool DeclareFields=true) override
Initialization object for CompressibleFlowSystem class.
void v_GetDensity(const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, NekDouble > &density) override
void EvaluateIsentropicVortex(unsigned int field, Array< OneD, NekDouble > &outfield, NekDouble time, const int o=0)
Isentropic Vortex Test Case.
NekDouble GetStabilityLimit(int n)
Function to calculate the stability limit for DG/CG.
void GetFluxVectorDeAlias(const Array< OneD, const Array< OneD, NekDouble > > &physfield, TensorOfArray3D< NekDouble > &flux)
Return the flux vector for the compressible Euler equations by using the de-aliasing technique.
std::vector< CFSBndCondSharedPtr > m_bndConds
Array< OneD, Array< OneD, NekDouble > > m_vecLocs
void v_ExtraFldOutput(std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables) override
VariableConverterSharedPtr m_varConv
const Array< OneD, const Array< OneD, NekDouble > > & GetVecLocs()
void SetBoundaryConditionsBwdWeight()
Set up a weight on physical boundaries for boundary condition applications.
std::vector< SolverUtils::ForcingSharedPtr > m_forcing
ArtificialDiffusionSharedPtr m_artificialDiffusion
Array< OneD, NekDouble > v_GetMaxStdVelocity(const NekDouble SpeedSoundFactor) override
Compute the advection velocity in the standard space for each element of the expansion.
void DoAdvection(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)
Compute the advection terms for the right-hand side.
void InitialiseParameters()
Load CFS parameters from the session file.
void DoDiffusion(const Array< OneD, Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const Array< OneD, Array< OneD, NekDouble > > &pFwd, const Array< OneD, Array< OneD, NekDouble > > &pBwd)
Add the diffusions terms to the right-hand side.
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Compute the right-hand side.
void v_SteadyStateResidual(int step, Array< OneD, NekDouble > &L2) override
void v_EvaluateExactSolution(unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time=0.0) override
void v_GetVelocity(const Array< OneD, const Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, NekDouble > > &velocity) override
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
void AccumulateRegion(std::string, int iolevel=0)
Accumulate elapsed time for a region.
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fieldsALE
SOLVER_UTILS_EXPORT void InitObject(int spaceDim, Array< OneD, MultiRegions::ExpListSharedPtr > &fields)
Array< OneD, Array< OneD, NekDouble > > m_gridVelocityTrace
SOLVER_UTILS_EXPORT void ALEDoElmtInvMassBwdTrans(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray)
SOLVER_UTILS_EXPORT void ExtraFldOutputGridVelocity(std::vector< Array< OneD, NekDouble > > &fieldcoeffs, std::vector< std::string > &variables)
SOLVER_UTILS_EXPORT void MoveMesh(const NekDouble &time, Array< OneD, Array< OneD, NekDouble > > &traceNormals)
SOLVER_UTILS_EXPORT const Array< OneD, const Array< OneD, NekDouble > > & GetGridVelocityTrace()
Array< OneD, Array< OneD, NekDouble > > m_gridVelocity
A base class for PDEs which include an advection component.
SolverUtils::AdvectionSharedPtr m_advObject
Advection term.
SOLVER_UTILS_EXPORT Array< OneD, NekDouble > GetElmtCFLVals(const bool FlagAcousticCFL=true)
SOLVER_UTILS_EXPORT void v_InitObject(bool DeclareField=true) override
Initialisation object for EquationSystem.
int m_spacedim
Spatial dimension (>= expansion dim).
virtual SOLVER_UTILS_EXPORT void v_SetInitialConditions(NekDouble initialtime=0.0, bool dumpInitialConditions=true, const int domain=0)
SpatialDomains::MeshGraphSharedPtr m_graph
Pointer to graph defining mesh.
LibUtilities::CommSharedPtr m_comm
Communicator.
NekDouble m_timestep
Time step size.
NekDouble m_time
Current time of simulation.
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
SOLVER_UTILS_EXPORT void Checkpoint_Output(const int n)
Write checkpoint file of m_fields.
virtual SOLVER_UTILS_EXPORT void v_EvaluateExactSolution(unsigned int field, Array< OneD, NekDouble > &outfield, const NekDouble time)
SOLVER_UTILS_EXPORT void WriteFld(const std::string &outname)
Write field data to the given filename.
SOLVER_UTILS_EXPORT int GetExpSize()
std::string m_sessionName
Name of the session.
bool m_specHP_dealiasing
Flag to determine if dealisising is usde for the Spectral/hp element discretisation.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Array holding trace normals for DG simulations in the forwards direction.
enum HomogeneousType m_HomogeneousType
SOLVER_UTILS_EXPORT int GetTotPoints()
int m_nchk
Number of checkpoints written so far.
enum MultiRegions::ProjectionType m_projectionType
Type of projection; e.g continuous or discontinuous.
SOLVER_UTILS_EXPORT int GetTraceTotPoints()
int m_checksteps
Number of steps between checkpoints.
static SOLVER_UTILS_EXPORT std::vector< ForcingSharedPtr > Load(const LibUtilities::SessionReaderSharedPtr &pSession, const std::weak_ptr< EquationSystem > &pEquation, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const unsigned int &pNumForcingFields=0)
Base class for unsteady solvers.
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
NekDouble m_cflSafetyFactor
CFL safety factor (comprise between 0 to 1).
SOLVER_UTILS_EXPORT NekDouble MaxTimeStepEstimator()
Get the maximum timestep estimator for cfl control.
SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s) override
Print a summary of time stepping parameters.
bool m_homoInitialFwd
Flag to determine if simulation should start in homogeneous forward transformed state.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::vector< PointsKey > PointsKeyVector
@ beta
Gauss Radau pinned at x=-1,.
@ P
Monomial polynomials .
@ eMixed_CG_Discontinuous
std::shared_ptr< RiemannSolver > RiemannSolverSharedPtr
A shared pointer to an EquationSystem object.
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
std::vector< std::pair< std::string, std::string > > SummaryList
void AddSummaryItem(SummaryList &l, const std::string &name, const std::string &value)
Adds a summary item to the summary info list.
RiemannSolverFactory & GetRiemannSolverFactory()
std::shared_ptr< GeomFactors > GeomFactorsSharedPtr
Pointer to a GeomFactors object.
@ eDeformed
Geometry is curved or has non-constant factors.
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
std::vector< double > z(NPUPPER)
std::vector< double > d(NPUPPER *NPUPPER)
CFSBndCondFactory & GetCFSBndCondFactory()
Declaration of the boundary condition factory singleton.
static Array< OneD, Array< OneD, NekDouble > > NullNekDoubleArrayOfArray
ArtificialDiffusionFactory & GetArtificialDiffusionFactory()
Declaration of the artificial diffusion factory singleton.
void Vmul(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Multiply vector z = x*y.
void Svtvp(int n, const T alpha, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Svtvp (scalar times vector plus vector): z = alpha*x + y.
void Neg(int n, T *x, const int incx)
Negate x = -x.
T Vmin(int n, const T *x, const int incx)
Return the minimum element in x - called vmin to avoid conflict with min.
void Vvtvp(int n, const T *w, const int incw, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
vvtvp (vector times vector plus vector): z = w*x + y
T Vsum(int n, const T *x, const int incx)
Subtract return sum(x)
void Vadd(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Add vector z = x+y.
void Smul(int n, const T alpha, const T *x, const int incx, T *y, const int incy)
Scalar multiply y = alpha*x.
void Zero(int n, T *x, const int incx)
Zero vector.
void FillWhiteNoise(int n, const T eps, T *x, const int incx, int outseed)
Fills a vector with white noise.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
void Vsub(int n, const T *x, const int incx, const T *y, const int incy, T *z, const int incz)
Subtract vector z = x-y.
scalarT< T > abs(scalarT< T > in)
scalarT< T > log(scalarT< T > in)
scalarT< T > sqrt(scalarT< T > in)