18 IF_CONSTEXPR(
nDim == 3) {
28 const MUint surfaceVarMemory = 2 * noVars;
41#pragma omp parallel for
43 for(
MUint srfcId = 0; srfcId < noSurfaces; ++srfcId) {
46 const MUint offset = srfcId * surfaceVarMemory;
47 const MFloat*
const RESTRICT leftVars = ALIGNED_F(surfaceVars + offset);
48 const MFloat*
const RESTRICT rightVars = ALIGNED_F(leftVars + noVars);
53 const MFloat PL = leftVars[
CV->RHO_E];
57 const MFloat PR = rightVars[
CV->RHO_E];
60 const MFloat A = area[srfcId];
65 const MUint fluxOffset = srfcId * noVars;
66 MFloat*
const RESTRICT flux = ALIGNED_MF(fluxes + fluxOffset);
102 orientations[srfcId] == 0 ? (uBar > 0.0 ? UL : UR) * A * uBar : (vBar > 0.0 ? UL : UR) * A * vBar;
103 flux[
FV->RHO_V] = 0.0;
104 flux[
FV->RHO_E] = 0.0;
107 static_cast<void>(PL);
108 static_cast<void>(PR);
109 static_cast<void>(VL);
110 static_cast<void>(VR);
123 MFloat domainErrorSquared = 0.0;
125#pragma omp parallel for reduction(+ : domainErrorSquared)
128 if(!
a_hasProperty(cellId, SolverCell::IsOnCurrentMGLevel))
continue;
130 if(
a_hasProperty(cellId, SolverCell::IsPeriodicWithRot))
continue;
133 MInt gridcellId = cellId;
140 MFloat cellErrorSquared = 0.0;
141 for(
MInt var = 0; var < noVars; var++) {
149 for(
MInt spaceId = 0; spaceId <
nDim; spaceId++) {
153 cellErrorSquared +=
POW2(analyticalSolutionCell -
a_variable(cellId, var));
156 domainErrorSquared += cellErrorSquared;
158 m_log <<
"time: " <<
m_time <<
" domainerror: " << std::sqrt(domainErrorSquared) << std::endl;
FvApeSolver2D(MInt, MInt, MBool *, maia::grid::Proxy< 2 > &gridProxy_, Geometry< 2 > &geometry_, const MPI_Comm comm)
MBool maxResidual(MInt)
Computes the global root-mean-square residual. The residual is defined as time derivative of conserva...
void Ausm()
Dispatches the AUSM flux computation for different number of species.
MFloat m_advectionVelocity[nDim]
static constexpr const MInt nDim
Collector< FvBndryCell< nDim, SysEqn > > * m_bndryCells
MInt a_noSurfaces()
Returns the number of surfaces.
MBool a_isPeriodic(const MInt cellId) const
Returns IsPeriodic of the cell cellId.
FvBndryCndXD< nDim_, FvSysEqnNS< 2 > > * m_fvBndryCnd
MFloat m_rhoVVInfinity[3]
MFloat & a_surfaceVariable(const MInt srfcId, const MInt dir, const MInt varId)
Returns the variable varId of surface srfcId in direction dir.
std::map< MInt, MInt > m_splitChildToSplitCell
MInt & a_surfaceOrientation(const MInt srfcId)
Returns the orientation of surface srfcId.
SysEqn::PrimitiveVariables * PV
MFloat & a_surfaceArea(const MInt srfcId)
Returns the area of surface srfcId.
SysEqn::FluxVariables * FV
MFloat & a_variable(const MInt cellId, const MInt varId)
Returns conservative variable v of the cell cellId for variables varId.
MInt noInternalCells() const override
SysEqn::ConservativeVariables * CV
MFloat & a_surfaceFlux(const MInt srfcId, const MInt fVarId)
Returns the flux fVarId for surface srfcId.
MBool a_hasProperty(const MInt cellId, const Cell p) const
Returns grid cell property p of the cell cellId.
MInt c_noChildren(const MInt cellId) const
Returns the number of children of the cell cellId.
MFloat & a_coordinate(const MInt cellId, const MInt dir)
Returns the coordinate of the cell from the fvcellcollector cellId for dimension dir.
MInt & a_bndryId(const MInt cellId)
Returns the bndryId of the cell cellId.
const MInt m_solverId
a unique solver identifier
constexpr Real POW2(const Real x)