84 double rhowL,
double EL,
double rhoR,
double rhouR,
85 double rhovR,
double rhowR,
double ER,
86 double &rhof,
double &rhouf,
double &rhovf,
87 double &rhowf,
double &Ef)
91 RoeKernel(rhoL, rhouL, rhovL, rhowL, EL, rhoR, rhouR, rhovR, rhowR, ER,
92 rhof, rhouf, rhovf, rhowf, Ef, gamma);
100 static auto gamma =
m_params[
"gamma"]();
101 static size_t nVars = fwd.size();
102 static size_t spaceDim = nVars - 2;
108 size_t sizeScalar = fwd[0].size();
109 size_t sizeVec = (sizeScalar / vec_t::width) * vec_t::width;
113 for (; i < sizeVec; i += vec_t::width)
115 vec_t rhoL{}, rhouL{}, rhovL{}, rhowL{}, EL{};
116 vec_t rhoR{}, rhouR{}, rhovR{}, rhowR{}, ER{};
131 else if (spaceDim == 3)
139 vec_t rhof{}, rhouf{}, rhovf{}, rhowf{}, Ef{};
141 RoeKernel(rhoL, rhouL, rhovL, rhowL, EL, rhoR, rhouR, rhovR, rhowR, ER,
142 rhof, rhouf, rhovf, rhowf, Ef, gamma);
152 else if (spaceDim == 3)
161 for (; i < sizeScalar; ++i)
163 NekDouble rhoL{}, rhouL{}, rhovL{}, rhowL{}, EL{};
164 NekDouble rhoR{}, rhouR{}, rhovR{}, rhowR{}, ER{};
169 EL = fwd[spaceDim + 1][i];
172 ER = bwd[spaceDim + 1][i];
179 else if (spaceDim == 3)
187 NekDouble rhof{}, rhouf{}, rhovf{}, rhowf{}, Ef{};
189 RoeKernel(rhoL, rhouL, rhovL, rhowL, EL, rhoR, rhouR, rhovR, rhowR, ER,
190 rhof, rhouf, rhovf, rhowf, Ef, gamma);
195 flux[nVars - 1][i] = Ef;
200 else if (spaceDim == 3)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
virtual void v_PointSolve(ND rhoL, ND rhouL, ND rhovL, ND rhowL, ND EL, ND rhoR, ND rhouR, ND rhovR, ND rhowR, ND ER, ND &rhof, ND &rhouf, ND &rhovf, ND &rhowf, ND &Ef) override final
Roe Riemann solver.
RoeSolver()
programmatic ctor
virtual void v_ArraySolve(const Array< OneD, const Array< OneD, ND >> &Fwd, const Array< OneD, const Array< OneD, ND >> &Bwd, Array< OneD, Array< OneD, ND >> &flux) override final
static RiemannSolverSharedPtr create(const LibUtilities::SessionReaderSharedPtr &pSession)
static std::string solverName
std::map< std::string, RSParamFuncType > m_params
Map of parameter function types.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
RiemannSolverFactory & GetRiemannSolverFactory()
The above copyright notice and this permission notice shall be included.
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)
tinysimd::simd< NekDouble > vec_t
static constexpr struct tinysimd::is_not_aligned_t is_not_aligned
typename abi< ScalarType, width >::type simd