9#include <initial_state.h>
13 namespace ShallowWater
20 template <
int dim,
typename Number,
typename state_type>
27 , hyperbolic_system(hyperbolic_system)
33 "If set to true then a constant inflow is computed for t>0 "
34 "suitable for prescribing Dirichlet conditions at the inflow "
39 this->add_parameter(
"left water depth",
41 "Depth of water to the left of pseudo-dam");
43 this->add_parameter(
"right water depth",
45 "Depth of water to the right of pseudo-dam");
49 "ramp slope", ramp_slope,
"To modify slope of ramp");
52 this->add_parameter(
"length of flat part",
54 "To modify length of flat portion");
59 const Number x = point[0];
63 if (t <= 1.e-10 || !inflow) {
64 Number h = x < 0 ? left_depth : right_depth;
65 h = std::max(h - compute_bathymetry(point), Number(0.));
66 return hyperbolic_system.template expand_state<dim>(
72 const auto &h = left_depth;
74 HyperbolicSystem ::state_type<1, Number>{{h, Number(0.)}});
75 return hyperbolic_system.template expand_state<dim>(
84 return {compute_bathymetry(point)};
90 DEAL_II_ALWAYS_INLINE
inline Number
91 compute_bathymetry(
const dealii::Point<dim> &point)
const
94 const Number &x = point[0];
95 return std::max(ramp_slope * (x - flat_length), Number(0.));
typename HyperbolicSystemView::state_type state_type
Number speed_of_sound(const dealii::Tensor< 1, problem_dim, Number > &U) const
dealii::Tensor< 1, problem_dimension< dim >, Number > state_type
auto initial_precomputations(const dealii::Point< dim > &point) -> typename InitialState< dim, Number, state_type, 1 >::precomputed_type final
state_type compute(const dealii::Point< dim > &point, Number t) final
SlopingRampDamBreak(const HyperbolicSystem &hyperbolic_system, const std::string s)