8#include <compile_time_options.h>
15#include <deal.II/base/point.h>
16#include <deal.II/base/tensor.h>
20 namespace ScalarConservation
22 template <
int dim,
typename Number =
double>
23 class WaveSpeedEstimatorView;
35 template <
typename ScalarNumber =
double>
48 template <
int dim,
typename Number =
double>
61 const std::string &subsection =
"/WaveSpeedEstimator")
62 : ParameterAcceptor(subsection)
63 , hyperbolic_system_(&hyperbolic_system)
65 use_greedy_wavespeed_ =
false;
66 add_parameter(
"use greedy wavespeed",
67 use_greedy_wavespeed_,
68 "Use a greedy wavespeed estimate instead of a guaranteed "
70 "on the maximal wavespeed (for convex fluxes).");
72 use_averaged_entropy_ =
false;
73 add_parameter(
"use averaged entropy",
74 use_averaged_entropy_,
75 "In addition to the wavespeed estimate based on the Roe "
77 "flux gradients of the left and right state also enforce "
79 "inequality on the averaged Krŭzkov entropy.");
81 random_entropies_ = 0;
85 "In addition to the wavespeed estimate based on the Roe average "
87 "flux gradients of the left and right state also enforce an "
89 "inequality on the prescribed number of random Krŭzkov entropies.");
107 template <
int dim,
typename Number>
111 hyperbolic_system_->template view<dim, Number>(), *
this};
121 bool use_greedy_wavespeed_;
122 bool use_averaged_entropy_;
123 unsigned int random_entropies_;
131 dealii::ObserverPointer<const HyperbolicSystem> hyperbolic_system_;
145 template <
int dim,
typename Number>
181 , wave_speed_estimator_(wave_speed_estimator)
190 Number
compute(
const Number &u_i,
194 const dealii::Tensor<1, dim, Number> &n_ij)
const;
203 const unsigned int i,
204 const unsigned int *js,
205 const dealii::Tensor<1, dim, Number> &n_ij)
const;
static constexpr unsigned int problem_dimension
std::array< Number, n_precomputed_values > precomputed_type
Vectors::MultiComponentVectorView< ScalarNumber, n_precomputed_values, dealii::VectorizedArray< ScalarNumber >::size(), dealii::MemorySpace::Host, false > PrecomputedVectorView
typename get_value_type< Number >::type ScalarNumber
dealii::Tensor< 1, problem_dimension, Number > state_type
static constexpr auto problem_dimension
typename View::ScalarNumber ScalarNumber
typename View::PrecomputedVectorView PrecomputedVectorView
typename View::state_type state_type
WaveSpeedEstimatorView(const View &view, const WaveSpeedEstimator< ScalarNumber > &wave_speed_estimator)
HyperbolicSystemView< dim, Number > View
typename View::precomputed_type precomputed_type
Number compute(const Number &u_i, const Number &u_j, const precomputed_type &prec_i, const precomputed_type &prec_j, const dealii::Tensor< 1, dim, Number > &n_ij) const
ACCESSOR_READ_ONLY(random_entropies)
WaveSpeedEstimator(const HyperbolicSystem &hyperbolic_system, const std::string &subsection="/WaveSpeedEstimator")
ACCESSOR_READ_ONLY(use_greedy_wavespeed)
ACCESSOR_READ_ONLY(use_averaged_entropy)