35 , hyperbolic_system(hyperbolic_system)
38 this->add_parameter(
"reservoir water depth",
40 "Depth of water in reservoir behind dam");
45 if constexpr (dim == 1) {
46 AssertThrow(
false, dealii::ExcNotImplemented());
50 const Number x = point[0];
52 const Number bath = compute_bathymetry(point);
57 h = std::max(depth_ - bath, Number(0.));
65 initial_precomputed_type
final
68 return {compute_bathymetry(point)};
75 DEAL_II_ALWAYS_INLINE
inline Number
76 compute_bathymetry(
const dealii::Point<dim> &point)
const
78 const Number x = point[0];
79 const Number y = point[1];
83 Number base1 = std::pow(x + 250., 2) / 1600. + std::pow(y, 2) / 400.;
84 Number base2 = std::pow(x, 2) / 225. + std::pow(y - 50., 2) / 225.;
86 std::pow(x - 250., 2) / 1225. + std::pow(y, 2) / 225. - 10.;
88 base = std::min(base1, base2);
89 base = std::min(base, base3);
95 80. - std::pow(x + 250., 2) / 50. - std::pow(y, 2) / 50.;
97 Number bump2 = (std::pow(x - 200., 2) + std::pow(y + 10., 2) <= 1000.)
100 Number bump3 = (std::abs(x - 380.) <= 40. && std::abs(y - 50.) <= 40.)
104 bumps = std::max(bump1, bump2);
105 bumps = std::max(bumps, bump3);
107 return std::max(base, bumps);