12#include <deal.II/base/function_parser.h>
16 namespace ShallowWaterInitialStates
23 template <
typename Description,
int dim,
typename Number>
34 , hyperbolic_system(hyperbolic_system)
37 this->add_parameter(
"reservoir water depth",
39 "Depth of water in reservoir behind dam");
44 if constexpr (dim == 1) {
45 AssertThrow(
false, dealii::ExcNotImplemented());
49 const Number x = point[0];
51 const Number bath = compute_bathymetry(point);
56 h = std::max(depth_ - bath, Number(0.));
64 initial_precomputed_type
final
67 return {compute_bathymetry(point)};
74 DEAL_II_ALWAYS_INLINE
inline Number
75 compute_bathymetry(
const dealii::Point<dim> &point)
const
77 const Number x = point[0];
78 const Number y = point[1];
87 base = std::min(base1, base2);
88 base = std::min(base, base3);
99 Number bump3 = (std::abs(x - 380.) <= 40. && std::abs(y - 50.) <= 40.)
103 bumps = std::max(bump1, bump2);
104 bumps = std::max(bumps, bump3);
106 return std::max(base, bumps);
typename Description::HyperbolicSystem HyperbolicSystem
HouTest(const HyperbolicSystem &hyperbolic_system, const std::string s)
auto initial_precomputations(const dealii::Point< dim > &point) -> typename InitialState< Description, dim, Number >::initial_precomputed_type final
typename View::state_type state_type
typename Description::template HyperbolicSystemView< dim, Number > View
state_type compute(const dealii::Point< dim > &point, Number) final
T pow(const T x, const T b)
Euler::HyperbolicSystem HyperbolicSystem