12 namespace EulerInitialStates
28 template <
typename Description,
int dim,
typename Number>
38 const std::string &subsection)
41 , hyperbolic_system_(hyperbolic_system)
43 primitive_inner_[0] = 1.4;
44 primitive_inner_[1] = 0.0;
45 primitive_inner_[2] = 1.;
47 "primitive state inner",
49 "Initial 1d primitive state (rho, u, p) on the inner disk");
51 primitive_outer_[0] = 1.4;
52 primitive_outer_[1] = 0.0;
53 primitive_outer_[2] = 1.;
55 "primitive state outer",
57 "Initial 1d primitive state (rho, u, p) on the outer annulus");
60 this->add_parameter(
"radius", radius_,
"Radius of radial area");
62 const auto convert_states = [&]() {
63 const auto view = hyperbolic_system_.template view<dim, Number>();
64 state_inner_ = view.from_initial_state(primitive_inner_);
65 state_outer_ = view.from_initial_state(primitive_outer_);
67 this->parse_parameters_call_back.connect(convert_states);
71 auto compute(
const dealii::Point<dim> &point, Number )
74 return (point.norm() > radius_ ? state_outer_ : state_inner_);
80 dealii::Tensor<1, 3, Number> primitive_inner_;
81 dealii::Tensor<1, 3, Number> primitive_outer_;
RadialContrast(const HyperbolicSystem &hyperbolic_system, const std::string &subsection)
typename Description::template HyperbolicSystemView< dim, Number > View
typename Description::HyperbolicSystem HyperbolicSystem
typename View::state_type state_type
auto compute(const dealii::Point< dim > &point, Number) -> state_type final
Euler::HyperbolicSystem HyperbolicSystem