14 namespace ShallowWaterInitialStates
22 template <
typename Description,
int dim,
typename Number>
32 const std::string subsection)
34 , hyperbolic_system_(hyperbolic_system)
36 primitive_left_[0] = 1.;
37 primitive_left_[1] = 0.0;
38 this->add_parameter(
"primitive state left",
40 "Initial 1d primitive state (h, u) on the left");
42 primitive_right_[0] = 1.;
43 primitive_right_[1] = 0.0;
44 this->add_parameter(
"primitive state right",
46 "Initial 1d primitive state (h, u) on the right");
51 const auto view = hyperbolic_system_.template view<dim, Number>();
52 const auto temp = point[0] > 0. ? primitive_right_ : primitive_left_;
53 return view.from_initial_state(temp);
59 dealii::Tensor<1, 2, Number> primitive_left_;
60 dealii::Tensor<1, 2, Number> primitive_right_;
typename Description::HyperbolicSystem HyperbolicSystem
typename View::state_type state_type
typename Description::template HyperbolicSystemView< dim, Number > View
state_type compute(const dealii::Point< dim > &point, Number) final
Contrast(const HyperbolicSystem &hyperbolic_system, const std::string subsection)
Euler::HyperbolicSystem HyperbolicSystem