ryujin 2.1.1 revision 15c5f3ea3ef91eaf08db04f6f4c18a1823a6f822
Public Types | Static Public Attributes | List of all members
ryujin::ShallowWater::Limiter< dim, Number > Class Template Reference

#include <source/shallow_water/limiter.h>

Public Types

using state_type = HyperbolicSystem::state_type< dim, Number >
 
using precomputed_type = HyperbolicSystem::precomputed_type< dim, Number >
 
using flux_contribution_type = HyperbolicSystem::flux_contribution_type< dim, Number >
 
using ScalarNumber = typename get_value_type< Number >::type
 

Static Public Member Functions

Convex limiter
static std::tuple< Number, bool > limit (const HyperbolicSystem &hyperbolic_system, const Bounds &bounds, const state_type &U, const state_type &P, const ScalarNumber newton_tolerance, const unsigned int newton_max_iter, const Number t_min=Number(0.), const Number t_max=Number(1.))
 
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
 
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);
for (unsigned int col_idx = 1; col_idx < row_length; ++col_idx) {
// ...
limiter.accumulate(js, U_i, U_j, pre_i, pre_j, scaled_c_ij,
beta_ij);
}
limiter.apply_relaxation(hd_i, limiter_relaxation_factor_);
limiter.bounds();
}
void accumulate(const unsigned int *js, const state_type &U_i, const state_type &U_j, const flux_contribution_type &prec_i, const flux_contribution_type &prec_j, const dealii::Tensor< 1, dim, Number > &scaled_c_ij, const Number beta_ij)
Definition: limiter.h:209
void apply_relaxation(const Number hd_i, const ScalarNumber factor=ScalarNumber(2.))
Definition: limiter.h:257
void reset(const unsigned int i)
Definition: limiter.h:194
const Bounds & bounds() const
Definition: limiter.h:290
using Bounds = std::array< Number, n_bounds >
 
static constexpr unsigned int n_bounds = 3
 
 Limiter (const HyperbolicSystem &hyperbolic_system, const MultiComponentVector< ScalarNumber, n_precomputed_values > &precomputed_values)
 
void reset (const unsigned int i)
 
void accumulate (const unsigned int *js, const state_type &U_i, const state_type &U_j, const flux_contribution_type &prec_i, const flux_contribution_type &prec_j, const dealii::Tensor< 1, dim, Number > &scaled_c_ij, const Number beta_ij)
 
void apply_relaxation (const Number hd_i, const ScalarNumber factor=ScalarNumber(2.))
 
const Boundsbounds () const
 

Detailed Description

template<int dim, typename Number = double>
class ryujin::ShallowWater::Limiter< dim, Number >
Todo:
documentation

Definition at line 25 of file limiter.h.

Member Typedef Documentation

◆ state_type

template<int dim, typename Number = double>
using ryujin::ShallowWater::Limiter< dim, Number >::state_type = HyperbolicSystem::state_type<dim, Number>

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

Definition at line 37 of file limiter.h.

◆ precomputed_type

template<int dim, typename Number = double>
using ryujin::ShallowWater::Limiter< dim, Number >::precomputed_type = HyperbolicSystem::precomputed_type<dim, Number>

Array type used for precomputed values.

Definition at line 48 of file limiter.h.

◆ flux_contribution_type

template<int dim, typename Number = double>
using ryujin::ShallowWater::Limiter< dim, Number >::flux_contribution_type = HyperbolicSystem::flux_contribution_type<dim, Number>

The storage type used for the flux precomputations.

Definition at line 53 of file limiter.h.

◆ ScalarNumber

template<int dim, typename Number = double>
using ryujin::ShallowWater::Limiter< dim, Number >::ScalarNumber = typename get_value_type<Number>::type

Definition at line 59 of file limiter.h.

◆ Bounds

template<int dim, typename Number = double>
using ryujin::ShallowWater::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::ShallowWater::Limiter< dim, Number >::Limiter ( const HyperbolicSystem hyperbolic_system,
const MultiComponentVector< ScalarNumber, n_precomputed_values > &  precomputed_values 
)
inline

Constructor taking a HyperbolicSystem instance as argument

Definition at line 95 of file limiter.h.

Member Function Documentation

◆ reset()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE void ryujin::ShallowWater::Limiter< dim, Number >::reset ( const unsigned int  i)
inline

Reset temporary storage

Definition at line 194 of file limiter.h.

◆ accumulate()

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

◆ apply_relaxation()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE void ryujin::ShallowWater::Limiter< dim, Number >::apply_relaxation ( const Number  hd_i,
const ScalarNumber  factor = ScalarNumber(2.) 
)
inline

Apply relaxation.

Definition at line 257 of file limiter.h.

◆ bounds()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE const Limiter< dim, Number >::Bounds & ryujin::ShallowWater::Limiter< dim, Number >::bounds
inline

Return the computed bounds.

Definition at line 290 of file limiter.h.

◆ limit()

template<int dim, typename Number >
std::tuple< Number, bool > ryujin::ShallowWater::Limiter< dim, Number >::limit ( const HyperbolicSystem hyperbolic_system,
const Bounds bounds,
const state_type U,
const state_type P,
const ScalarNumber  newton_tolerance,
const unsigned int  newton_max_iter,
const Number  t_min = Number(0.),
const Number  t_max = Number(1.) 
)
static

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::ShallowWater::HyperbolicSystem::filter_dry_water_depth(), ryujin::min, ryujin::ShallowWater::HyperbolicSystem::momentum(), ryujin::positive_part(), ryujin::quadratic_newton_step(), and ryujin::ShallowWater::HyperbolicSystem::water_depth().

◆ is_in_invariant_domain()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE bool ryujin::ShallowWater::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 298 of file limiter.h.

Member Data Documentation

◆ problem_dimension

template<int dim, typename Number = double>
constexpr unsigned int ryujin::ShallowWater::Limiter< dim, Number >::problem_dimension
staticconstexpr
Initial value:
=
HyperbolicSystem::problem_dimension<dim>

The dimension of the state space.

Definition at line 31 of file limiter.h.

◆ n_precomputed_values

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

The number of precomputed values.

Definition at line 42 of file limiter.h.

◆ n_bounds

template<int dim, typename Number = double>
constexpr unsigned int ryujin::ShallowWater::Limiter< dim, Number >::n_bounds = 3
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: