ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
List of all members
ryujin::ScalarConservation::Limiter< dim, Number > Class Template Reference

#include <source/scalar_conservation/limiter.h>

Public Member Functions

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, affine_shift);
}
limiter.bounds(hd_i);
}
void reset(const unsigned int i, const state_type &U_i, const flux_contribution_type &flux_i)
Definition: limiter.h:228
Bounds bounds(const Number hd_i) const
Definition: limiter.h:288
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 state_type &affine_shift)
Definition: limiter.h:250
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 state_type &affine_shift)
 
Bounds bounds (const Number hd_i) const
 
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.))
 

Typedefs and constexpr constants

using View = HyperbolicSystemView< dim, Number >
 
using ScalarNumber = typename View::ScalarNumber
 
using state_type = typename View::state_type
 
using flux_contribution_type = typename View::flux_contribution_type
 
using precomputed_type = typename View::precomputed_type
 
using PrecomputedVector = typename View::PrecomputedVector
 
using Parameters = LimiterParameters< ScalarNumber >
 
static constexpr auto problem_dimension = View::problem_dimension
 

Computation and manipulation of bounds

using Bounds = std::array< Number, n_bounds >
 
static constexpr unsigned int n_bounds = 2
 
 Limiter (const HyperbolicSystem &hyperbolic_system, const Parameters &parameters, const PrecomputedVector &precomputed_values)
 
Bounds projection_bounds_from_state (const unsigned int i, const state_type &U_i) const
 
Bounds combine_bounds (const Bounds &bounds_left, const Bounds &bounds_right) const
 

Detailed Description

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

The convex limiter.

Definition at line 51 of file limiter.h.

Member Typedef Documentation

◆ View

template<int dim, typename Number = double>
using ryujin::ScalarConservation::Limiter< dim, Number >::View = HyperbolicSystemView<dim, Number>

Definition at line 59 of file limiter.h.

◆ ScalarNumber

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

Definition at line 61 of file limiter.h.

◆ state_type

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

Definition at line 65 of file limiter.h.

◆ flux_contribution_type

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

Definition at line 67 of file limiter.h.

◆ precomputed_type

template<int dim, typename Number = double>
using ryujin::ScalarConservation::Limiter< dim, Number >::precomputed_type = typename View::precomputed_type

Definition at line 69 of file limiter.h.

◆ PrecomputedVector

template<int dim, typename Number = double>
using ryujin::ScalarConservation::Limiter< dim, Number >::PrecomputedVector = typename View::PrecomputedVector

Definition at line 71 of file limiter.h.

◆ Parameters

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

Definition at line 73 of file limiter.h.

◆ Bounds

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

Array type used to store accumulated bounds.

Definition at line 90 of file limiter.h.

Constructor & Destructor Documentation

◆ Limiter()

template<int dim, typename Number = double>
ryujin::ScalarConservation::Limiter< dim, Number >::Limiter ( const HyperbolicSystem hyperbolic_system,
const Parameters parameters,
const PrecomputedVector precomputed_values 
)
inline

Constructor taking a HyperbolicSystem instance as argument

Definition at line 95 of file limiter.h.

Member Function Documentation

◆ projection_bounds_from_state()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE auto ryujin::ScalarConservation::Limiter< dim, Number >::projection_bounds_from_state ( const unsigned int  i,
const state_type U_i 
) const
inline

Given a state U_i and an index i return "strict" bounds, i.e., a minimal convex set containing the state.

Definition at line 206 of file limiter.h.

◆ combine_bounds()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE auto ryujin::ScalarConservation::Limiter< dim, Number >::combine_bounds ( const Bounds bounds_left,
const Bounds bounds_right 
) const
inline

Given two bounds bounds_left, bounds_right, this function computes a larger, combined set of bounds that this is a (convex) superset of the two.

Definition at line 216 of file limiter.h.

Referenced by ryujin::HyperbolicModule< Description, dim, Number >::step().

◆ reset()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE void ryujin::ScalarConservation::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 228 of file limiter.h.

Referenced by ryujin::HyperbolicModule< Description, dim, Number >::step().

◆ accumulate()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE void ryujin::ScalarConservation::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 state_type affine_shift 
)
inline

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

Definition at line 250 of file limiter.h.

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

Referenced by ryujin::HyperbolicModule< Description, dim, Number >::step().

◆ bounds()

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

Return the computed bounds (with relaxation applied).

Definition at line 288 of file limiter.h.

Referenced by ryujin::HyperbolicModule< Description, dim, Number >::step().

◆ limit()

template<int dim, typename Number >
std::tuple< Number, bool > ryujin::ScalarConservation::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 16 of file limiter.template.h.

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

Referenced by ryujin::HyperbolicModule< Description, dim, Number >::step().

Member Data Documentation

◆ problem_dimension

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

Definition at line 63 of file limiter.h.

◆ n_bounds

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

The number of stored entries in the bounds array.

Definition at line 85 of file limiter.h.


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