4 #include "exahype2/RefinementControl.h"
10 [[maybe_unused]]
const double* NOALIAS Q,
11 [[maybe_unused]]
const tarch::la::Vector<DIMENSIONS, double>&
x,
12 [[maybe_unused]]
const tarch::la::Vector<DIMENSIONS, double>&
h,
13 [[maybe_unused]]
double t,
14 [[maybe_unused]]
double dt,
15 [[maybe_unused]]
int normal
18 static constexpr
double g = 9.81;
19 static constexpr
double zeroFlux = 1e-3;
26 double u = Q[normal+1] / Q[0];
27 double c = std::sqrt(
g * Q[0]);
29 return std::max(std::abs(
u -
c), std::abs(
u +
c));
34 [[maybe_unused]]
const double* NOALIAS Q,
35 [[maybe_unused]]
const tarch::la::Vector<DIMENSIONS, double>&
x,
36 [[maybe_unused]]
const tarch::la::Vector<DIMENSIONS, double>& h_,
37 [[maybe_unused]]
double t,
38 [[maybe_unused]]
double dt,
39 [[maybe_unused]]
int normal,
40 [[maybe_unused]]
double* NOALIAS F
43 static constexpr
double g = 9.81;
44 static constexpr
double zeroFlux = 1e-3;
64 F[1] =
h *
u *
u + 0.5 *
g *
h *
h;
70 F[2] =
h *
v *
v + 0.5 *
g *
h *
h;
76 void exahype::limiting::swe::aderSWE::nonconservativeProduct(
77 [[maybe_unused]]
const double* NOALIAS Q,
78 [[maybe_unused]]
const double* NOALIAS deltaQ,
79 [[maybe_unused]]
const tarch::la::Vector<DIMENSIONS, double>&
x,
80 [[maybe_unused]]
const tarch::la::Vector<DIMENSIONS, double>&
h,
81 [[maybe_unused]]
double t,
82 [[maybe_unused]]
double dt,
83 [[maybe_unused]]
int normal,
84 [[maybe_unused]]
double* NOALIAS BTimesDeltaQ
87 static constexpr
double g = 9.81;
88 static constexpr
double zeroFlux = 1e-3;
92 BTimesDeltaQ[0] = 0.0;
93 BTimesDeltaQ[1] = 0.0;
94 BTimesDeltaQ[2] = 0.0;
95 BTimesDeltaQ[3] = 0.0;
101 BTimesDeltaQ[0] = 0.0;
102 BTimesDeltaQ[1] =
g * Q[0] * (deltaQ[3]);
103 BTimesDeltaQ[2] = 0.0;
104 BTimesDeltaQ[3] = 0.0;
107 BTimesDeltaQ[0] = 0.0;
108 BTimesDeltaQ[1] = 0.0;
109 BTimesDeltaQ[2] =
g * Q[0] * (deltaQ[3]);
110 BTimesDeltaQ[3] = 0.0;
119 const double*
const QL,
120 const double*
const QR,
123 const tarch::la::Vector<DIMENSIONS, double>&
x,
124 const tarch::la::Vector<DIMENSIONS, double>&
h,
132 for(
int xy=0; xy<Order+1; xy++){
138 for(
int xy=0; xy<Order+1; xy++){
141 FL[xy*4+0] = 0.5*(FL[xy*4+0]+FR[xy*4+0] + smax*(QL[xy*4+0]+QL[xy*4+3]-QR[xy*4+0]-QR[xy*4+3]) );
142 FL[xy*4+1] = 0.5*(FL[xy*4+1]+FR[xy*4+1] + smax*(QL[xy*4+1]-QR[xy*4+1]) );
143 FL[xy*4+2] = 0.5*(FL[xy*4+2]+FR[xy*4+2] + smax*(QL[xy*4+2]-QR[xy*4+2]) );
146 FR[xy*4+0] = FL[xy*4+0];
147 FR[xy*4+1] = FL[xy*4+1];
148 FR[xy*4+2] = FL[xy*4+2];
152 FL[xy*4+direction+1] += 0.5*9.81*0.5*(QL[xy*4+0]+QR[xy*4+0])*(QR[xy*4+3]-QL[xy*4+3]);
153 FR[xy*4+direction+1] -= 0.5*9.81*0.5*(QL[xy*4+0]+QR[xy*4+0])*(QR[xy*4+3]-QL[xy*4+3]);
void riemannSolver(double *FL, double *FR, const double *const QL, const double *const QR, const double dt, const int direction, bool isBoundaryFace, int faceIndex)
static double maxEigenvalue(const double *const Q, int normal, const double CCZ4e, const double CCZ4ds, const double CCZ4GLMc, const double CCZ4GLMd)
tarch::logging::Log _log
This is variant 1 of the fused kernels.