3from .equation
import Equation
9 raise Exception(
"SWE must be in 2 dimensions")
16 constexpr double grav = 9.81;
18 const double u = Q[1 + normal] / Q[0];
19 const double c = std::sqrt(grav * Q[0]);
21 return std::max(std::abs(u + c), std::abs(u - c));
26 double ih = 1.0 / Q[0];
29 F[1] = Q[1 + normal] * Q[1] * ih;
30 F[2] = Q[1 + normal] * Q[2] * ih;
36 constexpr double grav = 9.81;
37 BTimesDeltaQ[0] = 0.0;
40 BTimesDeltaQ[1] = grav * Q[0] * (deltaQ[0] + deltaQ[3]);
41 BTimesDeltaQ[2] = 0.0;
44 BTimesDeltaQ[1] = 0.0;
45 BTimesDeltaQ[2] = grav * Q[0] * (deltaQ[0] + deltaQ[3]);
48 BTimesDeltaQ[3] = 0.0;
55 raise Exception(
"SWE must be in 2 dimensions")
62 constexpr double grav = 9.81;
64 const double u = Q[1 + normal] / Q[0];
65 const double c = std::sqrt(grav * Q[0]);
67 return std::max(std::abs(u + c), std::abs(u - c));
72 constexpr double grav = 9.81;
73 double ih = 1.0 / Q[0];
76 F[1] = Q[1 + normal] * Q[1] * ih;
77 F[2] = Q[1 + normal] * Q[2] * ih;
79 F[normal+1] += 0.5 * grav * Q[0] * Q[0];
int num_auxiliary_variables
__init__(self, dimensions=2)
__init__(self, dimensions=2)