31 template<
class Equation>
37 static const std::string
name;
39 template<
int direction>
41 const typename Equation::AllVariables& left,
42 const typename Equation::AllVariables& right,
43 typename Equation::ConservedVariables& F) {
44 typename Equation::ConservedVariables fluxLeft;
45 eq.template computePointFlux<direction>(left, fluxLeft);
46 typename Equation::ConservedVariables fluxRight;
47 eq.template computePointFlux<direction>(right, fluxRight);
48 real eigenLeft = fabs(eq.template computeEigenValues<direction>(left));
49 real eigenRight = fabs(eq.template computeEigenValues<direction>(right));
51 real eigenMax = fmax(eigenLeft, eigenRight);
52 F = 0.5 * (fluxLeft + fluxRight) - 0.5 * eigenMax * (right.u - left.u);
57 return fmax(eq.template computeWaveSpeed<direction>(left, left),
58 eq.template computeWaveSpeed<direction>(right, right));
#define __host__
Definition: types.hpp:46
Definition: Rusanov.hpp:32
double real
Definition: types.hpp:65
static const std::string name
name is "rusanov"
Definition: Rusanov.hpp:37
#define __device__
Definition: types.hpp:45
__device__ static __host__ real computeFlux(const Equation &eq, const typename Equation::AllVariables &left, const typename Equation::AllVariables &right, typename Equation::ConservedVariables &F)
Definition: Rusanov.hpp:40
Various utility functions to implement the tecno flux.
Definition: types.hpp:30