64 [[maybe_unused]]
const int nDim,
69 static auto gamma =
m_params[
"gamma"]();
70 static size_t nVars = fwd.size();
71 static size_t spaceDim = nVars - 2;
74 ASSERTL0(spaceDim == 3,
"SIMD Roe implemented only for 3D case...");
81 size_t sizeScalar = fwd[0].size();
82 size_t sizeVec = (sizeScalar / vec_t::width) * vec_t::width;
96 for (; i < sizeVec; i += vec_t::width)
99 vec_t rhoL, rhoR, ER, EL;
106 vec_t tmpIn[3], tmpOut[3];
113 for (
size_t j = 0; j < 9; ++j)
121 vec_t rhouL = tmpOut[0];
122 vec_t rhovL = tmpOut[1];
123 vec_t rhowL = tmpOut[2];
133 vec_t rhouR = tmpOut[0];
134 vec_t rhovR = tmpOut[1];
135 vec_t rhowR = tmpOut[2];
139 RoeKernel(rhoL, rhouL, rhovL, rhowL, EL, rhoR, rhouR, rhovR, rhowR, ER,
140 rhof, tmpIn[0], tmpIn[1], tmpIn[2], Ef, gamma);
156 for (; i < sizeScalar; ++i)
167 tmpIn[0] = fwd[1][i];
168 tmpIn[1] = fwd[2][i];
169 tmpIn[2] = fwd[3][i];
173 for (
size_t j = 0; j < 9; ++j)
186 tmpIn[0] = bwd[1][i];
187 tmpIn[1] = bwd[2][i];
188 tmpIn[2] = bwd[3][i];
199 RoeKernel(rhoL, rhouL, rhovL, rhowL, EL, rhoR, rhouR, rhovR, rhowR, ER,
200 rhof, tmpIn[0], tmpIn[1], tmpIn[2], Ef, gamma);
207 flux[nVars - 1][i] = Ef;
210 flux[1][i] = tmpOut[0];
211 flux[2][i] = tmpOut[1];
212 flux[3][i] = tmpOut[2];
void v_Solve(const int nDim, const Array< OneD, const Array< OneD, ND > > &Fwd, const Array< OneD, const Array< OneD, ND > > &Bwd, Array< OneD, Array< OneD, ND > > &flux) final
void RoeKernel(T &rhoL, T &rhouL, T &rhovL, T &rhowL, T &EL, T &rhoR, T &rhouR, T &rhovR, T &rhowR, T &ER, T &rhof, T &rhouf, T &rhovf, T &rhowf, T &Ef, NekDouble gamma)