ryujin 2.1.1 revision 0348cbb53a3e4b1da2a4c037e81f88f2d21ce219
|
#include <source/euler_aeos/limiter.h>
Public Member Functions | |
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, affine_shift);
}
limiter.bounds(hd_i);
}
Definition: limiter.h:98 void reset(const unsigned int i, const state_type &U_i, const flux_contribution_type &flux_i) Definition: limiter.h:292 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:321 | |
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 = 4 |
Limiter (const HyperbolicSystem &hyperbolic_system, const Parameters ¶meters, 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 |
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}
using ryujin::EulerAEOS::Limiter< dim, Number >::View = HyperbolicSystemView<dim, Number> |
using ryujin::EulerAEOS::Limiter< dim, Number >::ScalarNumber = typename View::ScalarNumber |
using ryujin::EulerAEOS::Limiter< dim, Number >::state_type = typename View::state_type |
using ryujin::EulerAEOS::Limiter< dim, Number >::flux_contribution_type = typename View::flux_contribution_type |
using ryujin::EulerAEOS::Limiter< dim, Number >::precomputed_type = typename View::precomputed_type |
using ryujin::EulerAEOS::Limiter< dim, Number >::PrecomputedVector = typename View::PrecomputedVector |
using ryujin::EulerAEOS::Limiter< dim, Number >::Parameters = LimiterParameters<ScalarNumber> |
using ryujin::EulerAEOS::Limiter< dim, Number >::Bounds = std::array<Number, n_bounds> |
|
inline |
Constructor taking a HyperbolicSystem instance as argument
|
inline |
|
inline |
|
inline |
|
inline |
When looping over the sparsity row, add the contribution associated with the neighboring state U_j.
Definition at line 321 of file limiter.h.
References ryujin::add(), and ryujin::contract().
|
inline |
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 EXPENSIVE_BOUNDS_CHECK
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 17 of file limiter.template.h.
References ryujin::negative_part(), ryujin::positive_part(), ryujin::pow(), and ryujin::quadratic_newton_step().
|
staticconstexpr |
|
staticconstexpr |