ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
Loading...
Searching...
No Matches
List of all members
ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number > Class Template Reference

#include <source/euler_aeos/wave_speed_estimator.h>

Public Member Functions

Compute wavespeed estimates
 WaveSpeedEstimatorView (const View &view, const WaveSpeedEstimator< ScalarNumber > &wave_speed_estimator)
 
Number compute (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const
 
Number compute (const PrecomputedVectorView &pv, const state_type &U_i, const state_type &U_j, const unsigned int i, const unsigned int *js, const dealii::Tensor< 1, dim, Number > &n_ij) const
 

Protected Member Functions

Internal methods
Number c (const Number &gamma_Z) const
 
Number alpha (const Number &rho, const Number &gamma, const Number &a) const
 
Number p_star_RS_full (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const
 
Number p_star_SS_full (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const
 
Number p_star_failsafe (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const
 
Number p_star_interpolated (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const
 
Number phi_of_p_max (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const
 
Number lambda1_minus (const primitive_type &riemann_data, const Number p_star) const
 
Number lambda3_plus (const primitive_type &primitive_state, const Number p_star) const
 
Number compute_lambda (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j, const Number p_star) const
 
primitive_type riemann_data_from_state (const state_type &U, const Number &p, const dealii::Tensor< 1, dim, Number > &n_ij) const
 

Typedefs and constexpr constants

using View = HyperbolicSystemView< dim, Number >
 
using ScalarNumber = typename View::ScalarNumber
 
using state_type = typename View::state_type
 
using primitive_type = typename std::array< Number, riemann_data_size >
 
using precomputed_type = typename View::precomputed_type
 
using PrecomputedVectorView = typename View::PrecomputedVectorView
 
static constexpr auto problem_dimension = View::problem_dimension
 
static constexpr unsigned int riemann_data_size = 5
 

Detailed Description

template<int dim, typename Number>
class ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >

A view of the WaveSpeedEstimator that makes the interface 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).

Definition at line 106 of file wave_speed_estimator.h.

Member Typedef Documentation

◆ View

template<int dim, typename Number >
using ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::View = HyperbolicSystemView<dim, Number>

Definition at line 114 of file wave_speed_estimator.h.

◆ ScalarNumber

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

Definition at line 116 of file wave_speed_estimator.h.

◆ state_type

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

Definition at line 120 of file wave_speed_estimator.h.

◆ primitive_type

template<int dim, typename Number >
using ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::primitive_type = typename std::array<Number, riemann_data_size>

The array type to store the expanded primitive state for the Riemann solver \([\rho, v, p, a]\)

Definition at line 132 of file wave_speed_estimator.h.

◆ precomputed_type

template<int dim, typename Number >
using ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::precomputed_type = typename View::precomputed_type

Definition at line 134 of file wave_speed_estimator.h.

◆ PrecomputedVectorView

template<int dim, typename Number >
using ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::PrecomputedVectorView = typename View::PrecomputedVectorView

Definition at line 136 of file wave_speed_estimator.h.

Constructor & Destructor Documentation

◆ WaveSpeedEstimatorView()

template<int dim, typename Number >
ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::WaveSpeedEstimatorView ( const View view,
const WaveSpeedEstimator< ScalarNumber > &  wave_speed_estimator 
)
inline

Constructor taking a HyperbolicSystemView and a WaveSpeedEstimator object as arguments

Definition at line 148 of file wave_speed_estimator.h.

Member Function Documentation

◆ compute() [1/2]

template<int dim, typename Number >
Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::compute ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j 
) const

For two given 1D primitive states riemann_data_i and riemann_data_j, compute an estimate for an upper bound of the maximum wavespeed lambda.

Definition at line 50 of file wave_speed_estimator.template.h.

◆ compute() [2/2]

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::compute ( const PrecomputedVectorView pv,
const state_type U_i,
const state_type U_j,
const unsigned int  i,
const unsigned int *  js,
const dealii::Tensor< 1, dim, Number > &  n_ij 
) const
inline

For two given states U_i a U_j and a (normalized) "direction" n_ij compute an estimate for an upper bound of the maximum wavespeed lambda.

Definition at line 136 of file wave_speed_estimator.template.h.

◆ c()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::c ( const Number &  gamma_Z) const
inlineprotected

FIXME

Cost: 0x pow, 1x division, 1x sqrt

Definition at line 159 of file wave_speed_estimator.template.h.

◆ alpha()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::alpha ( const Number &  rho,
const Number &  gamma,
const Number &  a 
) const
inlineprotected

FIXME

Cost: 0x pow, 1x division, 0x sqrt

Definition at line 193 of file wave_speed_estimator.template.h.

References ryujin::EulerAEOS::safe_division().

◆ p_star_RS_full()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::p_star_RS_full ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j 
) const
inlineprotected

Compute the best available, but expensive, upper bound on the expansion-shock case as described in §5.4, Eqn. (5.7) and (5.8) in [2]

Cost: 5x pow, 11x division, 1x sqrt

Definition at line 210 of file wave_speed_estimator.template.h.

References ryujin::positive_part(), ryujin::pow(), and ryujin::EulerAEOS::safe_division().

◆ p_star_SS_full()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::p_star_SS_full ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j 
) const
inlineprotected

Compute the best available, but expensive, upper bound on the shock-shock case as described in §5.5, Eqn. (5.10) and (5.12) in [2]

Cost: 2x pow, 9x division, 3x sqrt

Definition at line 325 of file wave_speed_estimator.template.h.

References ryujin::positive_part(), ryujin::pow(), and ryujin::EulerAEOS::safe_division().

◆ p_star_failsafe()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::p_star_failsafe ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j 
) const
inlineprotected

◆ p_star_interpolated()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::p_star_interpolated ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j 
) const
inlineprotected

◆ phi_of_p_max()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::phi_of_p_max ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j 
) const
inlineprotected

See [2]

The approximate Riemann solver is based on a function phi(p) that is montone increasing in p, concave down and whose (weak) third derivative is non-negative and locally bounded. Because we actually do not perform any iteration for computing our wavespeed estimate we can get away by only implementing a specialized variant of the phi function that computes phi(p_max). It inlines the implementation of the "f" function and eliminates all unnecessary branches in "f".

Cost: 0x pow, 2x division, 2x sqrt

Definition at line 574 of file wave_speed_estimator.template.h.

References ryujin::EulerAEOS::safe_division().

◆ lambda1_minus()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::lambda1_minus ( const primitive_type riemann_data,
const Number  p_star 
) const
inlineprotected

See [6] page 912, (3.7)

Cost: 0x pow, 1x division, 1x sqrt

Definition at line 610 of file wave_speed_estimator.template.h.

References ryujin::positive_part(), and ryujin::EulerAEOS::safe_division().

◆ lambda3_plus()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::lambda3_plus ( const primitive_type primitive_state,
const Number  p_star 
) const
inlineprotected

See [6] page 912, (3.8)

Cost: 0x pow, 1x division, 1x sqrt

Definition at line 628 of file wave_speed_estimator.template.h.

References ryujin::positive_part(), and ryujin::EulerAEOS::safe_division().

◆ compute_lambda()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::compute_lambda ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j,
const Number  p_star 
) const
inlineprotected

See [6] page 912, (3.9)

For two given primitive states riemann_data_i and riemann_data_j, and a guess p_2, compute an upper bound for lambda.

Cost: 0x pow, 2x division, 2x sqrt (inclusive)

Definition at line 646 of file wave_speed_estimator.template.h.

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

◆ riemann_data_from_state()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE auto ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::riemann_data_from_state ( const state_type U,
const Number &  p,
const dealii::Tensor< 1, dim, Number > &  n_ij 
) const
inlineprotected

For a given (2+dim dimensional) state vector U, and a (normalized) "direction" n_ij, first compute the corresponding projected state in the corresponding 1D Riemann problem, and then compute and return the Riemann data [rho, u, p, a] (used in the approximative Riemann solver).

Definition at line 660 of file wave_speed_estimator.template.h.

References AssertThrowSIMD.

Member Data Documentation

◆ problem_dimension

template<int dim, typename Number >
constexpr auto ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::problem_dimension = View::problem_dimension
staticconstexpr

Definition at line 118 of file wave_speed_estimator.h.

◆ riemann_data_size

template<int dim, typename Number >
constexpr unsigned int ryujin::EulerAEOS::WaveSpeedEstimatorView< dim, Number >::riemann_data_size = 5
staticconstexpr

Number of components in a primitive state, we store \([\rho, v, p, a, gamma]\), thus, 5.

Definition at line 126 of file wave_speed_estimator.h.


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