41 static const std::string
name;
51 template<
int direction>
57 static_assert(direction < 3,
"We only support three dimensions.");
61 computeHLLSpeeds<direction>(eq, left, right, speedLeft, speedRight);
65 }
else if (speedLeft > 0) {
66 eq.template computePointFlux<direction>(left, F);
67 }
else if (speedRight < 0) {
68 eq.template computePointFlux<direction>(right, F);
71 eq.template computePointFlux<direction>(left, leftFlux);
72 eq.template computePointFlux<direction>(right, rightFlux);
73 F = (speedRight * leftFlux - speedLeft * rightFlux + speedRight * speedLeft *
74 (right.conserved() - left.conserved())) / (speedRight - speedLeft);
77 return fmax(fabs(speedLeft), fabs(speedRight));
89 template<
int direction>
96 static_assert(direction < 3,
"We only support up to three dimensions.");
98 const real waveLeft = sqrt(left.
rho);
99 const real waveRight = sqrt(right.
rho);
102 const rvec u = (waveLeft * left.
u + waveRight * right.
u) /
103 (waveLeft + waveRight);
105 const real p = (left.
p * waveLeft + right.
p * waveRight) /
106 (waveLeft + waveRight);
110 speedLeft = fmin(left.
u[direction] - sqrt(eq.
getGamma() * left.
p / left.
rho),
112 speedRight = fmax(right.
u[direction] + sqrt(eq.
getGamma() * right.
p /
113 right.
rho), u[direction] + cs);
Definition: types.hpp:104
__device__ __host__ real getGamma() const
Definition: Euler.hpp:299
#define __host__
Definition: types.hpp:46
__device__ static __host__ void computeHLLSpeeds(const equation::euler::Euler< nsd > eq, const equation::euler::AllVariables< nsd > &left, const equation::euler::AllVariables< nsd > &right, real &speedLeft, real &speedRight)
Definition: HLL.hpp:90
Definition: ConservedVariables.hpp:30
double real
Definition: types.hpp:65
int rho
Definition: sodshocktube.py:3
#define static_assert(x, y)
Definition: types.hpp:52
__device__ static __host__ real computeFlux(const equation::euler::Euler< nsd > eq, const equation::euler::AllVariables< nsd > &left, const equation::euler::AllVariables< nsd > &right, equation::euler::ConservedVariables< nsd > &F)
Definition: HLL.hpp:52
#define __device__
Definition: types.hpp:45
static const std::string name
name is "hll"
Definition: HLL.hpp:41
real rho
Definition: ConservedVariables.hpp:92
Definition: AllVariables.hpp:27
Various utility functions to implement the tecno flux.
Definition: types.hpp:30
float p
Definition: sodshocktube.py:5
Types< nsd >::rvec rvec
Definition: HLL.hpp:43