16 namespace ShallowWaterInitialStates
25 template <
typename Description,
int dim,
typename Number>
35 const std::string subsection)
38 , hyperbolic_system_(hyperbolic_system)
44 "The (positive) slope of the inclined plane used to "
45 "define the bathymetry");
48 this->add_parameter(
"initial discharge",
50 "The initial (unit) discharge in [m^2 / s]");
56 const auto view = hyperbolic_system_.template view<dim, Number>();
63 const Number n = view.manning_friction_coefficient();
64 const Number exponent = 1. / (2. + 4. / 3.);
66 Number profile = n * n * q_0_ * q_0_ / slope_;
74 initial_precomputed_type
final
77 return {compute_bathymetry(point)};
83 DEAL_II_ALWAYS_INLINE
inline Number
84 compute_bathymetry(
const dealii::Point<dim> &point)
const
86 return -slope_ * point[0];
typename Description::HyperbolicSystem HyperbolicSystem
SlopingFriction(const HyperbolicSystem &hyperbolic_system, const std::string subsection)
typename Description::template HyperbolicSystemView< dim, Number > View
typename View::state_type state_type
auto initial_precomputations(const dealii::Point< dim > &point) -> typename InitialState< Description, dim, Number >::initial_precomputed_type final
state_type compute(const dealii::Point< dim > &, Number) final
T pow(const T x, const T b)
Euler::HyperbolicSystem HyperbolicSystem