12 namespace EulerInitialStates
24 template <
typename Description,
int dim,
typename Number>
34 const std::string subsection)
36 , hyperbolic_system_(hyperbolic_system)
38 primitive_left_[0] = 1.4;
39 primitive_left_[1] = 0.;
40 primitive_left_[2] = 1.;
42 "primitive state left",
44 "Initial 1d primitive state (rho, u, p) on the left");
46 primitive_right_[0] = 1.4;
47 primitive_right_[1] = 0.;
48 primitive_right_[2] = 1.;
50 "primitive state right",
52 "Initial 1d primitive state (rho, u, p) on the right");
54 const auto convert_states = [&]() {
55 const auto view = hyperbolic_system_.template view<dim, Number>();
56 state_left_ = view.from_initial_state(primitive_left_);
57 state_right_ = view.from_initial_state(primitive_right_);
59 this->parse_parameters_call_back.connect(convert_states);
65 return (point[0] > 0. ? state_right_ : state_left_);
71 dealii::Tensor<1, 3, Number> primitive_left_;
72 dealii::Tensor<1, 3, Number> primitive_right_;
typename View::state_type state_type
state_type compute(const dealii::Point< dim > &point, Number) final
Contrast(const HyperbolicSystem &hyperbolic_system, const std::string subsection)
typename Description::template HyperbolicSystemView< dim, Number > View
typename Description::HyperbolicSystem HyperbolicSystem
Euler::HyperbolicSystem HyperbolicSystem