4template <
class T,
class Shortcuts,
int NumberOfUnknowns>
6 const T*
const NOALIAS Q,
7 const tarch::la::Vector<DIMENSIONS, double>& x,
8 const tarch::la::Vector<DIMENSIONS, double>& h,
14 for (
int n = 0; n < NumberOfUnknowns; n++) {
18 if (Q[Shortcuts::h] <= hThreshold) {
22 const auto Vn{Q[Shortcuts::hu + normal] / Q[Shortcuts::h]};
23 F[Shortcuts::h] = Q[Shortcuts::hu + normal];
24 F[Shortcuts::hu] = Vn * Q[Shortcuts::hu];
25 F[Shortcuts::hv] = Vn * Q[Shortcuts::hv];
29template <
class T,
class Shortcuts>
31 const T*
const NOALIAS Q,
32 const tarch::la::Vector<DIMENSIONS, double>& x,
33 const tarch::la::Vector<DIMENSIONS, double>& h,
38 if (Q[Shortcuts::h] <= hThreshold) {
43 const auto Vn{Q[Shortcuts::hu + normal] / Q[Shortcuts::h]};
44 const auto c{std::sqrt(g * Q[Shortcuts::h])};
45 return {std::fmax(std::fabs(Vn + c), std::fabs(Vn - c))};
48template <
class T,
class Shortcuts,
int NumberOfUnknowns>
50 const T*
const NOALIAS Q,
51 const T*
const NOALIAS deltaQ,
52 const tarch::la::Vector<DIMENSIONS, double>& x,
53 const tarch::la::Vector<DIMENSIONS, double>& h,
57 T*
const NOALIAS BTimesDeltaQ
59 for (
int n = 0; n < NumberOfUnknowns; n++) {
60 BTimesDeltaQ[n] = 0.0;
63 if (Q[Shortcuts::h] <= hThreshold) {
68 BTimesDeltaQ[Shortcuts::hu + normal] =
g * Q[Shortcuts::h] * (deltaQ[Shortcuts::h] + deltaQ[Shortcuts::z]);
static GPU_CALLABLE_METHOD void flux(const T *const NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h, const double t, const double dt, const int normal, T *const NOALIAS F)
static GPU_CALLABLE_METHOD void nonconservativeProduct(const T *const NOALIAS Q, const T *const NOALIAS deltaQ, const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h, const double t, const double dt, const int normal, T *const NOALIAS BTimesDeltaQ)
static GPU_CALLABLE_METHOD double maxEigenvalue(const T *const NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &x, const tarch::la::Vector< DIMENSIONS, double > &h, const double t, const double dt, const int normal)