ryujin 2.1.1 revision 634357517b1e39aca0c9a9893a9c773f60d950f1
|
#include <source/shallow_water/limiter.h>
Public Types | |
using | View = HyperbolicSystemView< dim, Number > |
using | state_type = typename View::state_type |
using | flux_contribution_type = typename View::flux_contribution_type |
using | ScalarNumber = typename get_value_type< Number >::type |
using | Parameters = LimiterParameters< ScalarNumber > |
Public Member Functions | |
Convex limiter | |
std::tuple< Number, bool > | limit (const Bounds &bounds, const state_type &U, const state_type &P, const Number t_min=Number(0.), const Number t_max=Number(1.)) |
Static Public Member Functions | |
Verify invariant domain property | |
static bool | is_in_invariant_domain (const HyperbolicSystem &, const Bounds &, const state_type &) |
Static Public Attributes | |
static constexpr unsigned int | n_precomputed_values |
Stencil-based computation of bounds | |
Intended usage: Limiter<dim, Number> limiter;
for (unsigned int i = n_internal; i < n_owned; ++i) {
// ...
limiter.reset(i, U_i, flux_i);
for (unsigned int col_idx = 1; col_idx < row_length; ++col_idx) {
// ...
limiter.accumulate(
js, U_j, flux_j, scaled_c_ij, beta_ij, affine_shift);
}
limiter.bounds(hd_i);
}
Definition: limiter.h:88 void accumulate(const state_type &U_j, const state_type &U_star_ij, const state_type &U_star_ji, const dealii::Tensor< 1, dim, Number > &scaled_c_ij, const Number &beta_ij, const state_type &affine_shift) Definition: limiter.h:277 Bounds bounds(const Number hd_i) const Definition: limiter.h:337 void reset(const unsigned int i, const state_type &U_i, const flux_contribution_type &flux_i) Definition: limiter.h:255 | |
using | Bounds = std::array< Number, n_bounds > |
static constexpr unsigned int | n_bounds = 5 |
Limiter (const HyperbolicSystem &hyperbolic_system, const Parameters ¶meters, const MultiComponentVector< ScalarNumber, n_precomputed_values > &precomputed_values) | |
void | reset (const unsigned int i, const state_type &U_i, const flux_contribution_type &flux_i) |
void | accumulate (const state_type &U_j, const state_type &U_star_ij, const state_type &U_star_ji, const dealii::Tensor< 1, dim, Number > &scaled_c_ij, const Number &beta_ij, const state_type &affine_shift) |
Bounds | bounds (const Number hd_i) const |
The convex limiter.
using ryujin::ShallowWater::Limiter< dim, Number >::View = HyperbolicSystemView<dim, Number> |
A view of the HyperbolicSystem that makes methods available for a given dimension dim
and choice of number type Number
(which can be a scalar float, or double, as well as a VectorizedArray holding packed scalars.
Intended usage:
using ryujin::ShallowWater::Limiter< dim, Number >::state_type = typename View::state_type |
using ryujin::ShallowWater::Limiter< dim, Number >::flux_contribution_type = typename View::flux_contribution_type |
using ryujin::ShallowWater::Limiter< dim, Number >::ScalarNumber = typename get_value_type<Number>::type |
using ryujin::ShallowWater::Limiter< dim, Number >::Parameters = LimiterParameters<ScalarNumber> |
using ryujin::ShallowWater::Limiter< dim, Number >::Bounds = std::array<Number, n_bounds> |
|
inline |
Constructor taking a HyperbolicSystem instance as argument
|
inline |
|
inline |
When looping over the sparsity row, add the contribution associated with the neighboring state U_j.
Definition at line 277 of file limiter.h.
References ryujin::add(), and ryujin::contract().
|
inline |
std::tuple< Number, bool > ryujin::ShallowWater::Limiter< dim, Number >::limit | ( | const Bounds & | bounds, |
const state_type & | U, | ||
const state_type & | P, | ||
const Number | t_min = Number(0.) , |
||
const Number | t_max = Number(1.) |
||
) |
Given a state \(\mathbf U\) and an update \(\mathbf P\) this function computes and returns the maximal coefficient \(t\), obeying \(t_{\text{min}} < t < t_{\text{max}}\), such that the selected local minimum principles are obeyed.
Definition at line 18 of file limiter.template.h.
References ryujin::min, ryujin::negative_part(), ryujin::positive_part(), ryujin::quadratic_newton_step(), and RYUJIN_UNLIKELY.
|
inlinestatic |
|
staticconstexpr |
The number of precomputed values.
|
staticconstexpr |