ryujin 2.1.1 revision 6759a3f00bf045f3527c5e7e7dfd18c7d96a6edb
Public Types | Static Public Attributes | List of all members
ryujin::EulerAEOS::Limiter< dim, Number > Class Template Reference

#include <source/euler_aeos/limiter.h>

Public Types

using View = HyperbolicSystemView< dim, Number >
 
using state_type = typename View::state_type
 
using precomputed_state_type = typename View::precomputed_state_type
 
using flux_contribution_type = typename View::flux_contribution_type
 
using ScalarNumber = typename View::ScalarNumber
 
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 &hyperbolic_system, const Bounds &bounds, const state_type &U)
 

Static Public Attributes

static constexpr unsigned int problem_dimension = View::problem_dimension
 
static constexpr unsigned int n_precomputed_values
 

Stencil-based computation of bounds

Intended usage:

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);
}
limiter.bounds(hd_i);
}
void reset(const unsigned int i, const state_type &U_i, const flux_contribution_type &flux_i)
Definition: limiter.h:278
void accumulate(const unsigned int *js, const state_type &U_j, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &scaled_c_ij, const Number beta_ij)
Definition: limiter.h:308
Bounds bounds(const Number hd_i) const
Definition: limiter.h:387
using Bounds = std::array< Number, n_bounds >
 
static constexpr unsigned int n_bounds = 4
 
 Limiter (const HyperbolicSystem &hyperbolic_system, const Parameters &parameters, 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 unsigned int *js, const state_type &U_j, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &scaled_c_ij, const Number beta_ij)
 
Bounds bounds (const Number hd_i) const
 

Detailed Description

template<int dim, typename Number = double>
class ryujin::EulerAEOS::Limiter< dim, Number >

The convex limiter.

The class implements a convex limiting technique as described in [10], [13] and [3]. Given a computed set of bounds and an update direction \(\mathbf P_{ij}\) one can now determine a candidate \(\tilde l_{ij}\) by computing

\begin{align} \tilde l_{ij} = \max_{l\,\in\,[0,1]} \,\Big\{\rho_{\text{min}}\,\le\,\rho\,(\mathbf U_i +\tilde l_{ij}\mathbf P_{ij}) \,\le\,\rho_{\text{max}},\quad \phi_{\text{min}}\,\le\,\phi\,(\mathbf U_{i}+\tilde l_{ij}\mathbf P_{ij})\Big\}, \end{align}

where \(\psi\) denots the specific entropy [13].

Algorithmically this is accomplished as follows: Given an initial interval \([t_L,t_R]\), where \(t_L\) is a good state, we first make the interval smaller ensuring the bounds on the density are fulfilled. If limiting on the specific entropy is selected we then then perform a quadratic Newton iteration (updating \([t_L,t_R]\) solving for the root of a 3-convex function

\begin{align} \Psi(\mathbf U)\;=\;\rho^{\gamma+1}(\mathbf U)\,\big(\phi(\mathbf U)-\phi_{\text{min}}\big). \end{align}

Definition at line 97 of file limiter.h.

Member Typedef Documentation

◆ View

template<int dim, typename Number = double>
using ryujin::EulerAEOS::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:

HyperbolicSystem hyperbolic_system;
const auto view = hyperbolic_system.template view<dim, Number>();
const auto flux_i = view.flux_contribution(...);
const auto flux_j = view.flux_contribution(...);
const auto flux_ij = view.flux_divergence(flux_i, flux_j, c_ij);
// etc.

Definition at line 103 of file limiter.h.

◆ state_type

template<int dim, typename Number = double>
using ryujin::EulerAEOS::Limiter< dim, Number >::state_type = typename View::state_type

The storage type used for a (conserved) state \(\boldsymbol U\).

Definition at line 113 of file limiter.h.

◆ precomputed_state_type

template<int dim, typename Number = double>
using ryujin::EulerAEOS::Limiter< dim, Number >::precomputed_state_type = typename View::precomputed_state_type

Array type used for precomputed values.

Definition at line 124 of file limiter.h.

◆ flux_contribution_type

template<int dim, typename Number = double>
using ryujin::EulerAEOS::Limiter< dim, Number >::flux_contribution_type = typename View::flux_contribution_type

The storage type used for flux contributions.

Definition at line 129 of file limiter.h.

◆ ScalarNumber

template<int dim, typename Number = double>
using ryujin::EulerAEOS::Limiter< dim, Number >::ScalarNumber = typename View::ScalarNumber

The underlying scalar number type.

Definition at line 134 of file limiter.h.

◆ Parameters

template<int dim, typename Number = double>
using ryujin::EulerAEOS::Limiter< dim, Number >::Parameters = LimiterParameters<ScalarNumber>

Definition at line 139 of file limiter.h.

◆ Bounds

template<int dim, typename Number = double>
using ryujin::EulerAEOS::Limiter< dim, Number >::Bounds = std::array<Number, n_bounds>

Array type used to store accumulated bounds.

Definition at line 168 of file limiter.h.

Constructor & Destructor Documentation

◆ Limiter()

template<int dim, typename Number = double>
ryujin::EulerAEOS::Limiter< dim, Number >::Limiter ( const HyperbolicSystem hyperbolic_system,
const Parameters parameters,
const MultiComponentVector< ScalarNumber, n_precomputed_values > &  precomputed_values 
)
inline

Constructor taking a HyperbolicSystem instance as argument

Definition at line 173 of file limiter.h.

Member Function Documentation

◆ reset()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE void ryujin::EulerAEOS::Limiter< dim, Number >::reset ( const unsigned int  i,
const state_type U_i,
const flux_contribution_type flux_i 
)
inline

Reset temporary storage

Definition at line 278 of file limiter.h.

◆ accumulate()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE void ryujin::EulerAEOS::Limiter< dim, Number >::accumulate ( const unsigned int *  js,
const state_type U_j,
const flux_contribution_type flux_j,
const dealii::Tensor< 1, dim, Number > &  scaled_c_ij,
const Number  beta_ij 
)
inline

When looping over the sparsity row, add the contribution associated with the neighboring state U_j.

Definition at line 308 of file limiter.h.

References ryujin::add(), and ryujin::contract().

◆ bounds()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE auto ryujin::EulerAEOS::Limiter< dim, Number >::bounds ( const Number  hd_i) const
inline

Return the computed bounds (with relaxation applied).

Definition at line 387 of file limiter.h.

◆ limit()

template<int dim, typename Number >
std::tuple< Number, bool > ryujin::EulerAEOS::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.

The returned boolean is set to true if the original low-order update was within bounds.

If the debug option CHECK_BOUNDS is set to true, then the boolean is set to true if the low-order and the resulting high-order update are within bounds. The latter might be violated due to round-off errors when computing the limiter bounds.

Definition at line 16 of file limiter.template.h.

References ryujin::negative_part(), ryujin::positive_part(), ryujin::pow(), and ryujin::quadratic_newton_step().

◆ is_in_invariant_domain()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE bool ryujin::EulerAEOS::Limiter< dim, Number >::is_in_invariant_domain ( const HyperbolicSystem hyperbolic_system,
const Bounds bounds,
const state_type U 
)
inlinestatic

Returns whether the state U is located in the invariant domain described by bounds. If U is a vectorized state then the function returns true if all vectorized values are located in the invariant domain.

Definition at line 437 of file limiter.h.

Member Data Documentation

◆ problem_dimension

template<int dim, typename Number = double>
constexpr unsigned int ryujin::EulerAEOS::Limiter< dim, Number >::problem_dimension = View::problem_dimension
staticconstexpr

The dimension of the state space.

Definition at line 108 of file limiter.h.

◆ n_precomputed_values

template<int dim, typename Number = double>
constexpr unsigned int ryujin::EulerAEOS::Limiter< dim, Number >::n_precomputed_values
staticconstexpr
Initial value:

The number of precomputed values.

Definition at line 118 of file limiter.h.

◆ n_bounds

template<int dim, typename Number = double>
constexpr unsigned int ryujin::EulerAEOS::Limiter< dim, Number >::n_bounds = 4
staticconstexpr

The number of stored entries in the bounds array.

Definition at line 163 of file limiter.h.


The documentation for this class was generated from the following files: