![]() |
ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
|
#include <source/euler/wave_speed_estimator.h>
Public Member Functions | |
Compute wavespeed estimates | |
| WaveSpeedEstimatorView (const View &view, const WaveSpeedEstimator< ScalarNumber > &wave_speed_estimator) | |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber | newton_tolerance () const |
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE unsigned int | newton_max_iterations () const |
| DEAL_II_HOST_DEVICE Number | compute (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const |
| DEAL_II_HOST_DEVICE 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 | |
| DEAL_II_HOST_DEVICE Number | f (const primitive_type &riemann_data, const Number p_star) const |
| DEAL_II_HOST_DEVICE Number | df (const primitive_type &riemann_data, const Number &p_star) const |
| DEAL_II_HOST_DEVICE Number | phi (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j, const Number p_in) const |
| DEAL_II_HOST_DEVICE Number | dphi (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j, const Number &p) const |
| DEAL_II_HOST_DEVICE Number | phi_of_p_max (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const |
| DEAL_II_HOST_DEVICE Number | lambda1_minus (const primitive_type &riemann_data, const Number p_star) const |
| DEAL_II_HOST_DEVICE Number | lambda3_plus (const primitive_type &primitive_state, const Number p_star) const |
| DEAL_II_HOST_DEVICE std::array< Number, 2 > | compute_gap (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j, const Number p_1, const Number p_2) const |
| DEAL_II_HOST_DEVICE Number | compute_lambda (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j, const Number p_star) const |
| DEAL_II_HOST_DEVICE Number | p_star_two_rarefaction (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const |
| DEAL_II_HOST_DEVICE Number | p_star_failsafe (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const |
| DEAL_II_HOST_DEVICE primitive_type | riemann_data_from_state (const state_type &U, const dealii::Tensor< 1, dim, Number > &n_ij) const |
Typedefs and constexpr constants | |
| using | View = HyperbolicSystemView< dim, Number, MemorySpace > |
| using | ScalarNumber = typename View::ScalarNumber |
| using | state_type = typename View::state_type |
| using | primitive_type = 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 = 4 |
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 168 of file wave_speed_estimator.h.
| using ryujin::Euler::WaveSpeedEstimatorView< dim, Number, MemorySpace >::View = HyperbolicSystemView<dim, Number, MemorySpace> |
Definition at line 181 of file wave_speed_estimator.h.
| using ryujin::Euler::WaveSpeedEstimatorView< dim, Number, MemorySpace >::ScalarNumber = typename View::ScalarNumber |
Definition at line 183 of file wave_speed_estimator.h.
| using ryujin::Euler::WaveSpeedEstimatorView< dim, Number, MemorySpace >::state_type = typename View::state_type |
Definition at line 187 of file wave_speed_estimator.h.
| using ryujin::Euler::WaveSpeedEstimatorView< dim, Number, MemorySpace >::primitive_type = 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 199 of file wave_speed_estimator.h.
| using ryujin::Euler::WaveSpeedEstimatorView< dim, Number, MemorySpace >::precomputed_type = typename View::precomputed_type |
Definition at line 201 of file wave_speed_estimator.h.
| using ryujin::Euler::WaveSpeedEstimatorView< dim, Number, MemorySpace >::PrecomputedVectorView = typename View::PrecomputedVectorView |
Definition at line 203 of file wave_speed_estimator.h.
|
inline |
Constructor taking a HyperbolicSystemView and a WaveSpeedEstimator object as arguments
Definition at line 215 of file wave_speed_estimator.h.
|
inline |
Return the tolerance for the quadratic Newton stopping criterion.
Definition at line 227 of file wave_speed_estimator.h.
|
inline |
Return the maximal number of quadratic Newton iterations.
Definition at line 236 of file wave_speed_estimator.h.
| DEAL_II_HOST_DEVICE Number ryujin::Euler::WaveSpeedEstimatorView< dim, Number, MemorySpace >::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 estimation of an upper bound for the maximum wavespeed lambda.
Definition at line 439 of file wave_speed_estimator.h.
References ryujin::compare_and_apply_mask(), and ryujin::quadratic_newton_step().
| DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::WaveSpeedEstimatorView< dim, Number, MemorySpace >::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 |
For two given states U_i a U_j and a (normalized) "direction" n_ij compute an estimation of an upper bound for lambda.
Returns a tuple consisting of lambda max and the number of Newton iterations used in the solver to find it.
Definition at line 619 of file wave_speed_estimator.h.
|
inlineprotected |
See [5], page 912, (3.4).
Cost: 1x pow, 1x division, 2x sqrt
Definition at line 636 of file wave_speed_estimator.h.
References ryujin::compare_and_apply_mask(), and ryujin::pow().
|
protected |
See [5], page 912, (3.4).
Cost: 1x pow, 3x division, 1x sqrt
Definition at line 663 of file wave_speed_estimator.h.
References ryujin::compare_and_apply_mask(), and ryujin::pow().
|
inlineprotected |
See [5], page 912, (3.3).
Cost: 2x pow, 6x division, 2x sqrt
Definition at line 699 of file wave_speed_estimator.h.
|
protected |
See [5], page 912, (3.3).
Cost: 2x pow, 6x division, 2x sqrt
Definition at line 713 of file wave_speed_estimator.h.
|
protected |
See [5], page 912, (3.3).
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 [1, p. 912]. 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 736 of file wave_speed_estimator.h.
|
protected |
see [5], page 912, (3.7)
Cost: 0x pow, 1x division, 1x sqrt
Definition at line 777 of file wave_speed_estimator.h.
References ryujin::positive_part().
|
protected |
see [5], page 912, (3.8)
Cost: 0x pow, 1x division, 1x sqrt
Definition at line 801 of file wave_speed_estimator.h.
References ryujin::positive_part().
|
protected |
For two given primitive states riemann_data_i and riemann_data_j, and two guesses p_1 <= p* <= p_2, compute the gap in lambda between both guesses.
See [5], page 914, (4.4a), (4.4b), (4.5), and (4.6)
Cost: 0x pow, 4x division, 4x sqrt
For two given primitive states riemann_data_i and riemann_data_j, and two guesses p_1 <= p* <= p_2, compute the gap in lambda between both guesses.
See [1], page 914, (4.4a), (4.4b), (4.5), and (4.6)
Cost: 0x pow, 4x division, 4x sqrt
Definition at line 828 of file wave_speed_estimator.h.
References ryujin::negative_part(), and ryujin::positive_part().
|
protected |
see [5], 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 863 of file wave_speed_estimator.h.
References ryujin::negative_part(), and ryujin::positive_part().
|
protected |
Two-rarefaction approximation to p_star computed for two primitive states riemann_data_i and riemann_data_j.
See [5], page 914, (4.3)
Cost: 2x pow, 2x division, 0x sqrt
Definition at line 885 of file wave_speed_estimator.h.
References ryujin::positive_part(), and ryujin::pow().
|
protected |
Failsafe approximation to p_star computed for two primitive states riemann_data_i and riemann_data_j.
See [2], (5.11):
Cost: 0x pow, 3x division, 3x sqrt
Definition at line 940 of file wave_speed_estimator.h.
|
protected |
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 986 of file wave_speed_estimator.h.
|
staticconstexpr |
Definition at line 185 of file wave_speed_estimator.h.
|
staticconstexpr |
Number of components in a primitive state, we store \([\rho, v, p, a]\), thus, 4.
Definition at line 193 of file wave_speed_estimator.h.