ryujin 2.1.1 revision 4c829a125920046d39a74afd45eabb6cc28a8170
List of all members
ryujin::ShallowWater::RiemannSolver< dim, Number > Class Template Reference

#include <source/shallow_water/riemann_solver.h>

Public Member Functions

Compute wavespeed estimates
 RiemannSolver (const HyperbolicSystem &hyperbolic_system, const Parameters &parameters, const PrecomputedVector &precomputed_values)
 
Number compute (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const
 
Number compute (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
 

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 PrecomputedVector = typename View::PrecomputedVector
 
using Parameters = RiemannSolverParameters< ScalarNumber >
 
static constexpr auto problem_dimension = View::problem_dimension
 
static constexpr unsigned int riemann_data_size = 3
 

Internal functions used in the Riemann solver

Number compute_h_star (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j) const
 
Number f (const primitive_type &primitive_state, const Number &h_star) const
 
Number phi (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j, const Number &h) const
 
Number lambda1_minus (const primitive_type &riemann_data, const Number h_star) const
 
Number lambda3_plus (const primitive_type &riemann_data, const Number h_star) const
 
Number compute_lambda (const primitive_type &riemann_data_i, const primitive_type &riemann_data_j, const Number h_star) const
 
primitive_type riemann_data_from_state (const state_type &U, const dealii::Tensor< 1, dim, Number > &n_ij) const
 

Detailed Description

template<int dim, typename Number = double>
class ryujin::ShallowWater::RiemannSolver< dim, Number >

A fast approximative solver for the associated 1D Riemann problem. The solver has to ensure that the estimate \(\lambda_{\text{max}}\) that is returned for the maximal wavespeed is a strict upper bound.

Definition at line 41 of file riemann_solver.h.

Member Typedef Documentation

◆ View

template<int dim, typename Number = double>
using ryujin::ShallowWater::RiemannSolver< dim, Number >::View = HyperbolicSystemView<dim, Number>

Definition at line 49 of file riemann_solver.h.

◆ ScalarNumber

template<int dim, typename Number = double>
using ryujin::ShallowWater::RiemannSolver< dim, Number >::ScalarNumber = typename View::ScalarNumber

Definition at line 51 of file riemann_solver.h.

◆ state_type

template<int dim, typename Number = double>
using ryujin::ShallowWater::RiemannSolver< dim, Number >::state_type = typename View::state_type

Definition at line 55 of file riemann_solver.h.

◆ primitive_type

template<int dim, typename Number = double>
using ryujin::ShallowWater::RiemannSolver< 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 67 of file riemann_solver.h.

◆ precomputed_type

template<int dim, typename Number = double>
using ryujin::ShallowWater::RiemannSolver< dim, Number >::precomputed_type = typename View::precomputed_type

Definition at line 69 of file riemann_solver.h.

◆ PrecomputedVector

template<int dim, typename Number = double>
using ryujin::ShallowWater::RiemannSolver< dim, Number >::PrecomputedVector = typename View::PrecomputedVector

Definition at line 71 of file riemann_solver.h.

◆ Parameters

template<int dim, typename Number = double>
using ryujin::ShallowWater::RiemannSolver< dim, Number >::Parameters = RiemannSolverParameters<ScalarNumber>

Definition at line 73 of file riemann_solver.h.

Constructor & Destructor Documentation

◆ RiemannSolver()

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

Constructor taking a HyperbolicSystem instance as argument

Definition at line 84 of file riemann_solver.h.

Member Function Documentation

◆ compute() [1/2]

template<int dim, typename Number >
Number ryujin::ShallowWater::RiemannSolver< dim, Number >::compute ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j 
) const
inline

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 227 of file riemann_solver.template.h.

◆ compute() [2/2]

template<int dim, typename Number >
Number ryujin::ShallowWater::RiemannSolver< dim, Number >::compute ( 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.

Definition at line 241 of file riemann_solver.template.h.

◆ f()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::ShallowWater::RiemannSolver< dim, Number >::f ( const primitive_type primitive_state,
const Number &  h_star 
) const
inlineprotected

Definition at line 27 of file riemann_solver.template.h.

◆ phi()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::ShallowWater::RiemannSolver< dim, Number >::phi ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j,
const Number &  h 
) const
inlineprotected

Definition at line 49 of file riemann_solver.template.h.

◆ lambda1_minus()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::ShallowWater::RiemannSolver< dim, Number >::lambda1_minus ( const primitive_type riemann_data,
const Number  h_star 
) const
inlineprotected

Definition at line 66 of file riemann_solver.template.h.

References ryujin::positive_part().

◆ lambda3_plus()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::ShallowWater::RiemannSolver< dim, Number >::lambda3_plus ( const primitive_type riemann_data,
const Number  h_star 
) const
inlineprotected

Definition at line 81 of file riemann_solver.template.h.

References ryujin::positive_part().

◆ compute_lambda()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::ShallowWater::RiemannSolver< dim, Number >::compute_lambda ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j,
const Number  h_star 
) const
inlineprotected

Definition at line 96 of file riemann_solver.template.h.

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

◆ compute_h_star()

template<int dim, typename Number >
DEAL_II_ALWAYS_INLINE Number ryujin::ShallowWater::RiemannSolver< dim, Number >::compute_h_star ( const primitive_type riemann_data_i,
const primitive_type riemann_data_j 
) const
inline

Definition at line 110 of file riemann_solver.template.h.

References ryujin::positive_part().

◆ riemann_data_from_state()

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

Definition at line 209 of file riemann_solver.template.h.

Member Data Documentation

◆ problem_dimension

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

Definition at line 53 of file riemann_solver.h.

◆ riemann_data_size

template<int dim, typename Number = double>
constexpr unsigned int ryujin::ShallowWater::RiemannSolver< dim, Number >::riemann_data_size = 3
staticconstexpr

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

Definition at line 61 of file riemann_solver.h.


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