10#include <compile_time_options.h>
14#include <deal.II/base/function_parser.h>
18 namespace ShallowWaterInitialStates
25 template <
typename Description,
int dim,
typename Number>
36 , hyperbolic_system(hyperbolic_system)
39 this->add_parameter(
"reservoir water depth",
41 "Depth of water in reservoir behind dam");
46 if constexpr (dim == 1) {
47 AssertThrow(
false, dealii::ExcNotImplemented());
51 const Number x = point[0];
53 const Number bath = compute_bathymetry(point);
58 h = std::max(depth_ - bath, Number(0.));
66 initial_precomputed_type
final
69 return {compute_bathymetry(point)};
76 DEAL_II_ALWAYS_INLINE
inline Number
77 compute_bathymetry(
const dealii::Point<dim> &point)
const
79 const Number x = point[0];
80 const Number y = point[1];
89 base = std::min(base1, base2);
90 base = std::min(base, base3);
101 Number bump3 = (std::abs(x - 380.) <= 40. && std::abs(y - 50.) <= 40.)
105 bumps = std::max(bump1, bump2);
106 bumps = std::max(bumps, bump3);
108 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