9#include <initial_state.h>
13 namespace ShallowWater
23 template <
int dim,
typename Number,
typename state_type>
28 const std::string subsection)
30 , hyperbolic_system(hyperbolic_system)
34 "free surface radius", a_,
"Radius of the circular free surface");
38 "water height", h_0_,
"Water height at central point");
41 this->add_parameter(
"eta", eta_,
"The eta parameter");
52 const auto z = compute_bathymetry(point);
53 const auto g = hyperbolic_system.gravity();
54 const Number omega = std::sqrt(2. * g * h_0_) / a_;
61 const Number &x = point[0];
63 h = eta_ * h_0_ / (a_ * a_) * (2. * x * std::cos(omega * t)) - z;
64 h = std::max(h, Number(0.));
66 v_x = -eta_ * omega * std::sin(omega * t);
73 const Number &x = point[0];
74 const Number &y = point[1];
76 h = eta_ * h_0_ / (a_ * a_) *
77 (2. * x * std::cos(omega * t) +
78 2 * y * std::sin(omega * t)) -
80 h = std::max(h, Number(0.));
82 v_x = -eta_ * omega * std::sin(omega * t);
83 v_y = eta_ * omega * std::cos(omega * t);
89 if constexpr (dim == 1)
90 return hyperbolic_system.template expand_state<dim>(
92 else if constexpr (dim == 2)
93 return hyperbolic_system.template expand_state<dim>(
94 HyperbolicSystem::state_type<2, Number>{{h, h * v_x, h * v_y}});
96 AssertThrow(
false, dealii::ExcNotImplemented());
106 return {compute_bathymetry(point)};
112 DEAL_II_ALWAYS_INLINE
inline Number
113 compute_bathymetry(
const dealii::Point<dim> &point)
const
115 return -h_0_ * (Number(1.) - point.norm_square() / (a_ * a_));
typename HyperbolicSystemView::state_type state_type
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
Paraboloid(const HyperbolicSystem &hyperbolic_system, const std::string subsection)