ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace > Class Template Reference

#include <source/euler/hyperbolic_system.h>

Public Member Functions

template<int component>
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto linearized_eigenvector (const state_type &U, const dealii::Tensor< 1, dim, Number > &normal) const -> std::array< state_type, 2 >
 
template<int component>
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto prescribe_riemann_characteristic (const state_type &U, const state_type &U_bar, const dealii::Tensor< 1, dim, Number > &normal) const -> state_type
 
template<typename Lambda >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto apply_boundary_conditions (dealii::types::boundary_id id, const state_type &U, const dealii::Tensor< 1, dim, Number > &normal, const Lambda &get_dirichlet_data) const -> state_type
 
template<typename ST >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto expand_state (const ST &state) const -> state_type
 
template<typename ST >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto from_initial_state (const ST &initial_state) const -> state_type
 
template<typename Lambda >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto apply_galilei_transform (const state_type &state, const Lambda &lambda) const -> state_type
 
template<int component>
DEAL_II_ALWAYS_INLINE auto prescribe_riemann_characteristic (const state_type &U, const Number &p, const state_type &U_bar, const Number &p_bar, const dealii::Tensor< 1, dim, Number > &normal) const -> state_type
 
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto apply_boundary_conditions (dealii::types::boundary_id id, const state_type &U, const dealii::Tensor< 1, dim, Number > &normal, const Lambda &get_dirichlet_data) const -> state_type
 
template<typename ST >
auto expand_state (const ST &state) const -> state_type
 
template<typename ST >
DEAL_II_ALWAYS_INLINE auto from_initial_state (const ST &initial_state) const -> state_type
 
template<typename Lambda >
auto apply_galilei_transform (const state_type &state, const Lambda &lambda) const -> state_type
 
template<int component>
DEAL_II_ALWAYS_INLINE auto prescribe_riemann_characteristic (const state_type &, const Number &, const state_type &, const Number &, const dealii::Tensor< 1, dim, Number > &) const -> state_type
 
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto apply_boundary_conditions (dealii::types::boundary_id id, const state_type &U, const dealii::Tensor< 1, dim, Number > &normal, const Lambda &get_dirichlet_data) const -> state_type
 
template<typename ST >
auto expand_state (const ST &state) const -> state_type
 
template<typename ST >
DEAL_II_ALWAYS_INLINE auto from_initial_state (const ST &initial_state) const -> state_type
 
template<typename Lambda >
auto apply_galilei_transform (const state_type &state, const Lambda &lambda) const -> state_type
 
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto apply_boundary_conditions (dealii::types::boundary_id id, const state_type &U, const dealii::Tensor< 1, dim, Number > &, const Lambda &get_dirichlet_data) const -> state_type
 
template<int component>
DEAL_II_ALWAYS_INLINE auto prescribe_riemann_characteristic (const state_type &U, const state_type &U_bar, const dealii::Tensor< 1, dim, Number > &normal) const -> state_type
 
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto apply_boundary_conditions (const dealii::types::boundary_id id, const state_type &U, const dealii::Tensor< 1, dim, Number > &normal, const Lambda &get_dirichlet_data) const -> state_type
 
template<typename ST >
DEAL_II_ALWAYS_INLINE auto expand_state (const ST &state) const -> state_type
 
template<typename ST >
DEAL_II_ALWAYS_INLINE auto from_initial_state (const ST &initial_state) const -> state_type
 
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto apply_galilei_transform (const state_type &state, const Lambda &lambda) const -> state_type
 
Constructor and setup
 HyperbolicSystemView (const HyperbolicSystem &hyperbolic_system)
 
Access to runtime parameters
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma () const
 
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber reference_density () const
 
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber vacuum_state_relaxation_small () const
 
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber vacuum_state_relaxation_large () const
 
Access to cached inverses

A collection of commonly used expressions with gamma that would otherwise need to be recomputed many times putting unnecessary pressure on the div/sqrt ALU unit.

DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma_inverse () const
 
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma_plus_one_inverse () const
 
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma_minus_one_inverse () const
 
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber gamma_minus_one_over_gamma_plus_one () const
 
Special functions for boundary states
template<int component>
DEAL_II_HOST_DEVICE std::array< state_type, 2 > linearized_eigenvector (const state_type &U, const dealii::Tensor< 1, dim, Number > &normal) const
 
template<int component>
DEAL_II_HOST_DEVICE state_type prescribe_riemann_characteristic (const state_type &U, const state_type &U_bar, const dealii::Tensor< 1, dim, Number > &normal) const
 
template<typename Lambda >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE state_type apply_boundary_conditions (const dealii::types::boundary_id id, const state_type &U, const dealii::Tensor< 1, dim, Number > &normal, const Lambda &get_dirichlet_data) const
 
State transformations
template<typename ST >
DEAL_II_HOST_DEVICE state_type expand_state (const ST &state) const
 
template<typename ST >
DEAL_II_HOST_DEVICE state_type from_initial_state (const ST &initial_state) const
 
DEAL_II_HOST_DEVICE state_type from_primitive_state (const state_type &primitive_state) const
 
DEAL_II_HOST_DEVICE state_type to_primitive_state (const state_type &state) const
 
template<typename Lambda >
DEAL_II_HOST_DEVICE state_type apply_galilei_transform (const state_type &state, const Lambda &lambda) const
 

Static Public Attributes

Constexpr booleans used in the EulerInitialStates namespace
static constexpr bool have_gamma = true
 
static constexpr bool have_covolume_constant = false
 
static constexpr bool have_energy_equation = true
 

Typedefs and constexpr constants

using ScalarNumber = typename get_value_type< Number >::type
 
using state_type = dealii::Tensor< 1, problem_dimension, Number >
 
using flux_type = dealii::Tensor< 1, problem_dimension, dealii::Tensor< 1, dim, Number > >
 
using flux_contribution_type = flux_type
 
using precomputed_type = std::array< Number, n_precomputed_values >
 
using initial_precomputed_type = std::array< Number, n_initial_precomputed_values >
 
using StateVector = Vectors::StateVector< ScalarNumber, problem_dimension, n_precomputed_values >
 
using HyperbolicVector = Vectors::MultiComponentVector< ScalarNumber, problem_dimension >
 
using PrecomputedVector = Vectors::MultiComponentVector< ScalarNumber, n_precomputed_values >
 
using PrecomputedVectorView = Vectors::MultiComponentVectorView< ScalarNumber, n_precomputed_values, dealii::VectorizedArray< ScalarNumber >::size(), MemorySpace, false >
 
using InitialPrecomputedVector = Vectors::MultiComponentVector< ScalarNumber, n_initial_precomputed_values >
 
using InitialPrecomputedVectorView = Vectors::MultiComponentVectorView< ScalarNumber, n_initial_precomputed_values, dealii::VectorizedArray< ScalarNumber >::size(), MemorySpace, false >
 
static constexpr unsigned int problem_dimension = 2 + dim
 
static const auto component_names
 
static const auto primitive_component_names
 
static constexpr unsigned int n_precomputed_values = 2
 
static const auto precomputed_names
 
static constexpr unsigned int n_initial_precomputed_values = 0
 
static const auto initial_precomputed_names
 

Flux computations

static constexpr bool have_high_order_flux = false
 
DEAL_II_HOST_DEVICE flux_type f (const state_type &U) const
 
DEAL_II_HOST_DEVICE flux_contribution_type flux_contribution (const PrecomputedVectorView &pv, const InitialPrecomputedVectorView &ipv, const unsigned int i, const state_type &U_i) const
 
DEAL_II_HOST_DEVICE flux_contribution_type flux_contribution (const PrecomputedVectorView &pv, const InitialPrecomputedVectorView &ipv, const unsigned int *js, const state_type &U_j) const
 
DEAL_II_HOST_DEVICE state_type flux_divergence (const flux_contribution_type &flux_i, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &c_ij) const
 
DEAL_II_HOST_DEVICE state_type high_order_flux_divergence (const flux_contribution_type &flux_i, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &c_ij) const =delete
 

Computing stencil source terms

static constexpr bool have_source_terms = false
 
DEAL_II_HOST_DEVICE state_type nodal_source (const PrecomputedVectorView &pv, const unsigned int i, const state_type &U_i, const ScalarNumber tau) const =delete
 
DEAL_II_HOST_DEVICE state_type nodal_source (const PrecomputedVectorView &pv, const unsigned int *js, const state_type &U_j, const ScalarNumber tau) const =delete
 

Computing derived physical quantities

DEAL_II_HOST_DEVICE Number filter_vacuum_density (const Number &rho) const
 
DEAL_II_HOST_DEVICE Number pressure (const state_type &U) const
 
DEAL_II_HOST_DEVICE Number speed_of_sound (const state_type &U) const
 
DEAL_II_HOST_DEVICE Number specific_entropy (const state_type &U) const
 
DEAL_II_HOST_DEVICE Number harten_entropy (const state_type &U) const
 
DEAL_II_HOST_DEVICE state_type harten_entropy_derivative (const state_type &U) const
 
DEAL_II_HOST_DEVICE Number mathematical_entropy (const state_type &U) const
 
DEAL_II_HOST_DEVICE state_type mathematical_entropy_derivative (const state_type &U) const
 
DEAL_II_HOST_DEVICE bool is_admissible (const state_type &U) const
 
static DEAL_II_HOST_DEVICE Number density (const state_type &U)
 
static DEAL_II_HOST_DEVICE dealii::Tensor< 1, dim, Number > momentum (const state_type &U)
 
static DEAL_II_HOST_DEVICE Number total_energy (const state_type &U)
 
static DEAL_II_HOST_DEVICE Number internal_energy (const state_type &U)
 
static DEAL_II_HOST_DEVICE state_type internal_energy_derivative (const state_type &U)
 

Detailed Description

template<int dim, typename Number, typename MemorySpace>
class ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >

A view of the HyperbolicSystem that makes methods 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.

Intended usage:

HyperbolicSystem hyperbolic_system;
const auto view = hyperbolic_system.template view<dim, Number>();
const auto flux_i = view.flux_contribution(...);
const auto flux_j = view.flux_contribution(...);
const auto flux_ij = view.flux_divergence(flux_i, flux_j, c_ij);
// etc.
Note
This class is designed to be copied by value into computation loops with access to either the host or device memory space. As such we do not store a reference to the underlying HyperbolicSystem but copy all runtime parameters into the view when it is created.

Definition at line 183 of file hyperbolic_system.h.

Member Typedef Documentation

◆ ScalarNumber

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::ScalarNumber = typename get_value_type<Number>::type

The underlying scalar number type.

Definition at line 199 of file hyperbolic_system.h.

◆ state_type

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::state_type = dealii::Tensor<1, problem_dimension, Number>

Storage type for a (conserved) state vector \(\boldsymbol U\).

Definition at line 209 of file hyperbolic_system.h.

◆ flux_type

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::flux_type = dealii::Tensor<1, problem_dimension, dealii::Tensor<1, dim, Number> >

Storage type for the flux \(\mathbf{f}\).

Definition at line 214 of file hyperbolic_system.h.

◆ flux_contribution_type

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::flux_contribution_type = flux_type

The storage type used for flux contributions.

Definition at line 220 of file hyperbolic_system.h.

◆ precomputed_type

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::precomputed_type = std::array<Number, n_precomputed_values>

Array type used for precomputed values.

Definition at line 260 of file hyperbolic_system.h.

◆ initial_precomputed_type

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::initial_precomputed_type = std::array<Number, n_initial_precomputed_values>

Array type used for precomputed initial values.

Definition at line 276 of file hyperbolic_system.h.

◆ StateVector

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::StateVector = Vectors:: StateVector<ScalarNumber, problem_dimension, n_precomputed_values>

A compound state vector.

Definition at line 288 of file hyperbolic_system.h.

◆ HyperbolicVector

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::HyperbolicVector = Vectors::MultiComponentVector<ScalarNumber, problem_dimension>

MulticomponentVector for storing the hyperbolic state vector:

Definition at line 294 of file hyperbolic_system.h.

◆ PrecomputedVector

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::PrecomputedVector = Vectors::MultiComponentVector<ScalarNumber, n_precomputed_values>

MulticomponentVector for storing a vector of precomputed states:

Definition at line 300 of file hyperbolic_system.h.

◆ PrecomputedVectorView

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::PrecomputedVectorView = Vectors::MultiComponentVectorView< ScalarNumber, n_precomputed_values, dealii::VectorizedArray<ScalarNumber>::size(), MemorySpace, false>

MulticomponentVectorView for accessing a vector of precomputed states:

Definition at line 307 of file hyperbolic_system.h.

◆ InitialPrecomputedVector

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::InitialPrecomputedVector = Vectors::MultiComponentVector<ScalarNumber, n_initial_precomputed_values>

MulticomponentVector for storing a vector of precomputed initial states:

Definition at line 318 of file hyperbolic_system.h.

◆ InitialPrecomputedVectorView

template<int dim, typename Number , typename MemorySpace >
using ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::InitialPrecomputedVectorView = Vectors::MultiComponentVectorView< ScalarNumber, n_initial_precomputed_values, dealii::VectorizedArray<ScalarNumber>::size(), MemorySpace, false>

MulticomponentVectorView for accessing a vector of precomputed initial states:

Definition at line 326 of file hyperbolic_system.h.

Constructor & Destructor Documentation

◆ HyperbolicSystemView()

template<int dim, typename Number , typename MemorySpace >
ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::HyperbolicSystemView ( const HyperbolicSystem hyperbolic_system)
inline

Constructor taking a reference to the underlying HyperbolicSystem

Definition at line 343 of file hyperbolic_system.h.

Member Function Documentation

◆ gamma()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::gamma ( ) const
inline

◆ reference_density()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::reference_density ( ) const
inline

◆ vacuum_state_relaxation_small()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::vacuum_state_relaxation_small ( ) const
inline

◆ vacuum_state_relaxation_large()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::vacuum_state_relaxation_large ( ) const
inline

◆ gamma_inverse()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::gamma_inverse ( ) const
inline

◆ gamma_plus_one_inverse()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::gamma_plus_one_inverse ( ) const
inline

◆ gamma_minus_one_inverse()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::gamma_minus_one_inverse ( ) const
inline

◆ gamma_minus_one_over_gamma_plus_one()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE ScalarNumber ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::gamma_minus_one_over_gamma_plus_one ( ) const
inline

◆ density()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::density ( const state_type U)
static

For a given (2+dim dimensional) state vector U, return the density U[0]

Definition at line 863 of file hyperbolic_system.h.

◆ filter_vacuum_density()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::filter_vacuum_density ( const Number &  rho) const

Given a density rho this function returns 0 if the magniatude of rho is smaller or equal than relaxation_large * rho_cutoff. Otherwise rho is returned unmodified. Here, rho_cutoff is the reference density multiplied by eps.

Definition at line 871 of file hyperbolic_system.h.

◆ momentum()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE dealii::Tensor< 1, dim, Number > ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::momentum ( const state_type U)
static

For a given (2+dim dimensional) state vector U, return the momentum vector [U[1], ..., U[1+dim]].

Definition at line 885 of file hyperbolic_system.h.

◆ total_energy()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::total_energy ( const state_type U)
static

For a given (2+dim dimensional) state vector U, return the total energy U[1+dim]

Definition at line 897 of file hyperbolic_system.h.

◆ internal_energy()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::internal_energy ( const state_type U)
static

For a given (2+dim dimensional) state vector U, compute and return the internal energy \(\varepsilon = (\rho e)\).

Definition at line 906 of file hyperbolic_system.h.

◆ internal_energy_derivative()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::internal_energy_derivative ( const state_type U)
static

For a given (2+dim dimensional) state vector U, compute and return the derivative of the internal energy \(\varepsilon = (\rho e)\).

Definition at line 921 of file hyperbolic_system.h.

◆ pressure()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::pressure ( const state_type U) const

For a given (2+dim dimensional) state vector U, compute and return the pressure \(p\).

We assume that the pressure is given by a polytropic equation of state, i.e.,

\[ p = (\gamma - 1)\;(\rho e) \]

Definition at line 948 of file hyperbolic_system.h.

◆ speed_of_sound()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::speed_of_sound ( const state_type U) const

For a given (2+dim dimensional) state vector U, compute the (physical) speed of sound:

\[ c^2 = \frac{\gamma\,p}{\rho} \]

Definition at line 958 of file hyperbolic_system.h.

◆ specific_entropy()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::specific_entropy ( const state_type U) const

For a given (2+dim dimensional) state vector U, compute and return the (scaled) specific entropy

\[ e^{(\gamma-1)s} = \frac{\rho\,e}{\rho^\gamma}. \]

Definition at line 970 of file hyperbolic_system.h.

References ryujin::pow().

◆ harten_entropy()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::harten_entropy ( const state_type U) const

For a given (2+dim dimensional) state vector U, compute and return the Harten-type entropy

\[ \eta = (\rho^2 e) ^ {1 / (\gamma + 1)}. \]

Definition at line 981 of file hyperbolic_system.h.

References ryujin::pow().

◆ harten_entropy_derivative()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::harten_entropy_derivative ( const state_type U) const

For a given (2+dim dimensional) state vector U, compute and return the derivative \(\eta'\) of the Harten-type entropy

\[ \eta = (\rho^2 e) ^ {1 / (\gamma + 1)}. \]

Definition at line 997 of file hyperbolic_system.h.

References ryujin::pow().

◆ mathematical_entropy()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE Number ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::mathematical_entropy ( const state_type U) const

For a given (2+dim dimensional) state vector U, compute and return the entropy \(\eta = p^{1/\gamma}\).

Definition at line 1034 of file hyperbolic_system.h.

References ryujin::pow().

◆ mathematical_entropy_derivative()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::mathematical_entropy_derivative ( const state_type U) const

For a given (2+dim dimensional) state vector U, compute and return the derivative \(\eta'\) of the entropy \(\eta = p^{1/\gamma}\).

Definition at line 1045 of file hyperbolic_system.h.

References ryujin::pow().

◆ is_admissible()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE bool ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::is_admissible ( const state_type U) const

Returns whether the state U is admissible. If U is a vectorized state then U is admissible if all vectorized values are admissible.

Definition at line 1082 of file hyperbolic_system.h.

◆ linearized_eigenvector() [1/2]

template<int dim, typename Number , typename MemorySpace >
template<int component>
DEAL_II_HOST_DEVICE std::array< state_type, 2 > ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::linearized_eigenvector ( const state_type U,
const dealii::Tensor< 1, dim, Number > &  normal 
) const

For a given state U and normal direction normal returns the n-th pair of left and right eigenvectors of the linearized normal flux.

◆ prescribe_riemann_characteristic() [1/5]

template<int dim, typename Number , typename MemorySpace >
template<int component>
DEAL_II_HOST_DEVICE state_type ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::prescribe_riemann_characteristic ( const state_type U,
const state_type U_bar,
const dealii::Tensor< 1, dim, Number > &  normal 
) const

Decomposes a given state U into Riemann invariants and then replaces the first or second Riemann characteristic from the one taken from U_bar state. Note that the U_bar state is just the prescribed dirichlet values.

◆ apply_boundary_conditions() [1/6]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE state_type ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_boundary_conditions ( const dealii::types::boundary_id  id,
const state_type U,
const dealii::Tensor< 1, dim, Number > &  normal,
const Lambda &  get_dirichlet_data 
) const

Apply boundary conditions.

For the compressible Euler equations we have:

  • Dirichlet boundary conditions by prescribing the return value of get_dirichlet_data() as is.
  • Slip boundary conditions where we remove the normal component of the momentum.
  • No slip boundary conditions where we set the momentum to 0.
  • "Dynamic boundary" conditions that prescribe different Riemann invariants from the return value of get_dirichlet_data() depending on the flow state (supersonic versus subsonic, outflow versus inflow).

◆ f()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::f ( const state_type U) const

Given a state U compute the flux

\[ \begin{pmatrix} \textbf m \\ \textbf v\otimes \textbf m + p\mathbb{I}_d \\ \textbf v(E+p) \end{pmatrix}, \]

Definition at line 1326 of file hyperbolic_system.h.

◆ flux_contribution() [1/2]

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::flux_contribution ( const PrecomputedVectorView pv,
const InitialPrecomputedVectorView ipv,
const unsigned int  i,
const state_type U_i 
) const

Given a state U_i and an index i compute flux contributions.

Intended usage:

for (unsigned int i = n_internal; i < n_owned; ++i) {
// ...
const auto flux_i = flux_contribution(precomputed..., i, U_i);
for (unsigned int col_idx = 1; col_idx < row_length; ++col_idx) {
// ...
const auto flux_j = flux_contribution(precomputed..., js, U_j);
const auto flux_ij = flux_divergence(flux_i, flux_j, c_ij);
}
}
DEAL_II_HOST_DEVICE state_type flux_divergence(const flux_contribution_type &flux_i, const flux_contribution_type &flux_j, const dealii::Tensor< 1, dim, Number > &c_ij) const
DEAL_II_HOST_DEVICE flux_contribution_type flux_contribution(const PrecomputedVectorView &pv, const InitialPrecomputedVectorView &ipv, const unsigned int i, const state_type &U_i) const

For the Euler equations we simply compute f(U_i).

Definition at line 1349 of file hyperbolic_system.h.

◆ flux_contribution() [2/2]

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::flux_contribution ( const PrecomputedVectorView pv,
const InitialPrecomputedVectorView ipv,
const unsigned int *  js,
const state_type U_j 
) const

Definition at line 1361 of file hyperbolic_system.h.

◆ flux_divergence()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::flux_divergence ( const flux_contribution_type flux_i,
const flux_contribution_type flux_j,
const dealii::Tensor< 1, dim, Number > &  c_ij 
) const

Given flux contributions flux_i and flux_j compute the flux (-f(U_i) - f(U_j) * c_ij

Definition at line 1373 of file hyperbolic_system.h.

References ryujin::add(), and ryujin::contract().

◆ high_order_flux_divergence()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE state_type ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::high_order_flux_divergence ( const flux_contribution_type flux_i,
const flux_contribution_type flux_j,
const dealii::Tensor< 1, dim, Number > &  c_ij 
) const
delete

◆ nodal_source() [1/2]

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE state_type ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::nodal_source ( const PrecomputedVectorView pv,
const unsigned int  i,
const state_type U_i,
const ScalarNumber  tau 
) const
delete

◆ nodal_source() [2/2]

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE state_type ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::nodal_source ( const PrecomputedVectorView pv,
const unsigned int *  js,
const state_type U_j,
const ScalarNumber  tau 
) const
delete

◆ expand_state() [1/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
DEAL_II_HOST_DEVICE state_type ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::expand_state ( const ST &  state) const

Given a state vector associated with a different spatial dimensions than the current one, return an "expanded" version of the state vector associated with dim spatial dimensions where the momentum vector of the conserved state state is expaned with zeros to a total length of dim entries.

Note
dim has to be larger or equal than the dimension of the ST vector.

◆ from_initial_state() [1/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
DEAL_II_HOST_DEVICE state_type ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::from_initial_state ( const ST &  initial_state) const

Given an initial state [rho, u_1, ..., u_d, p] return a conserved state [rho, m_1, ..., m_d, E].

This function simply calls from_primitive_state() and expand_state().

Note
This function is used to conveniently convert (user provided) primitive initial states with pressure values to a conserved state in the EulerInitialStateLibrary. As such, this function is implemented in the Euler::HyperbolicSystem and EulerAEOS::HyperbolicSystem classes.

◆ from_primitive_state()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::from_primitive_state ( const state_type primitive_state) const

Given a primitive state [rho, u_1, ..., u_d, p] return a conserved state

Definition at line 1419 of file hyperbolic_system.h.

◆ to_primitive_state()

template<int dim, typename Number , typename MemorySpace >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::to_primitive_state ( const state_type state) const

Given a conserved state return a primitive state [rho, u_1, ..., u_d, p]

Definition at line 1441 of file hyperbolic_system.h.

◆ apply_galilei_transform() [1/5]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_HOST_DEVICE state_type ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_galilei_transform ( const state_type state,
const Lambda &  lambda 
) const

Transform the current state according to a given operator lambda acting on a dim dimensional momentum (or velocity) vector.

◆ linearized_eigenvector() [2/2]

template<int dim, typename Number , typename MemorySpace >
template<int component>
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::linearized_eigenvector ( const state_type U,
const dealii::Tensor< 1, dim, Number > &  normal 
) const -> std::array<state_type, 2>

Definition at line 1113 of file hyperbolic_system.h.

◆ prescribe_riemann_characteristic() [2/5]

template<int dim, typename Number , typename MemorySpace >
template<int component>
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::prescribe_riemann_characteristic ( const state_type U,
const state_type U_bar,
const dealii::Tensor< 1, dim, Number > &  normal 
) const -> state_type

Definition at line 1168 of file hyperbolic_system.h.

References ryujin::pow().

◆ apply_boundary_conditions() [2/6]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_boundary_conditions ( dealii::types::boundary_id  id,
const state_type U,
const dealii::Tensor< 1, dim, Number > &  normal,
const Lambda &  get_dirichlet_data 
) const -> state_type

◆ expand_state() [2/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::expand_state ( const ST &  state) const -> state_type

Definition at line 1385 of file hyperbolic_system.h.

◆ from_initial_state() [2/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::from_initial_state ( const ST &  initial_state) const -> state_type

Definition at line 1409 of file hyperbolic_system.h.

◆ apply_galilei_transform() [2/5]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_HOST_DEVICE_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_galilei_transform ( const state_type state,
const Lambda &  lambda 
) const -> state_type

Definition at line 1462 of file hyperbolic_system.h.

◆ prescribe_riemann_characteristic() [3/5]

template<int dim, typename Number , typename MemorySpace >
template<int component>
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::prescribe_riemann_characteristic ( const state_type U,
const Number &  p,
const state_type U_bar,
const Number &  p_bar,
const dealii::Tensor< 1, dim, Number > &  normal 
) const -> state_type
inline

Definition at line 1306 of file hyperbolic_system.h.

References ryujin::pow().

◆ apply_boundary_conditions() [3/6]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_boundary_conditions ( dealii::types::boundary_id  id,
const state_type U,
const dealii::Tensor< 1, dim, Number > &  normal,
const Lambda &  get_dirichlet_data 
) const -> state_type
inline

◆ expand_state() [3/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::expand_state ( const ST &  state) const -> state_type

Definition at line 1638 of file hyperbolic_system.h.

◆ from_initial_state() [3/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::from_initial_state ( const ST &  initial_state) const -> state_type
inline

Definition at line 1662 of file hyperbolic_system.h.

◆ apply_galilei_transform() [3/5]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_galilei_transform ( const state_type state,
const Lambda &  lambda 
) const -> state_type

Definition at line 1722 of file hyperbolic_system.h.

◆ prescribe_riemann_characteristic() [4/5]

template<int dim, typename Number , typename MemorySpace >
template<int component>
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::prescribe_riemann_characteristic ( const state_type ,
const Number &  ,
const state_type ,
const Number &  ,
const dealii::Tensor< 1, dim, Number > &   
) const -> state_type
inline

Definition at line 880 of file hyperbolic_system.h.

◆ apply_boundary_conditions() [4/6]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_boundary_conditions ( dealii::types::boundary_id  id,
const state_type U,
const dealii::Tensor< 1, dim, Number > &  normal,
const Lambda &  get_dirichlet_data 
) const -> state_type
inline

◆ expand_state() [4/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::expand_state ( const ST &  state) const -> state_type

Definition at line 1052 of file hyperbolic_system.h.

◆ from_initial_state() [4/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::from_initial_state ( const ST &  initial_state) const -> state_type
inline

Definition at line 1075 of file hyperbolic_system.h.

◆ apply_galilei_transform() [4/5]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_galilei_transform ( const state_type state,
const Lambda &  lambda 
) const -> state_type

Definition at line 1118 of file hyperbolic_system.h.

◆ apply_boundary_conditions() [5/6]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_boundary_conditions ( dealii::types::boundary_id  id,
const state_type U,
const dealii::Tensor< 1, dim, Number > &  ,
const Lambda &  get_dirichlet_data 
) const -> state_type
inline

◆ prescribe_riemann_characteristic() [5/5]

template<int dim, typename Number , typename MemorySpace >
template<int component>
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::prescribe_riemann_characteristic ( const state_type U,
const state_type U_bar,
const dealii::Tensor< 1, dim, Number > &  normal 
) const -> state_type
inline

Definition at line 913 of file hyperbolic_system.h.

◆ apply_boundary_conditions() [6/6]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_boundary_conditions ( const dealii::types::boundary_id  id,
const state_type U,
const dealii::Tensor< 1, dim, Number > &  normal,
const Lambda &  get_dirichlet_data 
) const -> state_type
inline

◆ expand_state() [5/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::expand_state ( const ST &  state) const -> state_type
inline

Definition at line 1276 of file hyperbolic_system.h.

◆ from_initial_state() [5/5]

template<int dim, typename Number , typename MemorySpace >
template<typename ST >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::from_initial_state ( const ST &  initial_state) const -> state_type
inline

Definition at line 1298 of file hyperbolic_system.h.

◆ apply_galilei_transform() [5/5]

template<int dim, typename Number , typename MemorySpace >
template<typename Lambda >
DEAL_II_ALWAYS_INLINE auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::apply_galilei_transform ( const state_type state,
const Lambda &  lambda 
) const -> state_type
inline

Definition at line 1341 of file hyperbolic_system.h.

Member Data Documentation

◆ problem_dimension

template<int dim, typename Number , typename MemorySpace >
constexpr unsigned int ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::problem_dimension = 2 + dim
staticconstexpr

The dimension of the state space.

Definition at line 204 of file hyperbolic_system.h.

◆ component_names

template<int dim, typename Number , typename MemorySpace >
const auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::component_names
inlinestatic
Initial value:
=
[]() -> std::array<std::string, problem_dimension> {
if constexpr (dim == 1)
return {"rho", "m", "E"};
else if constexpr (dim == 2)
return {"rho", "m_1", "m_2", "E"};
else if constexpr (dim == 3)
return {"rho", "m_1", "m_2", "m_3", "E"};
__builtin_trap();
}()

An array holding all component names of the conserved state as a string.

Definition at line 226 of file hyperbolic_system.h.

◆ primitive_component_names

template<int dim, typename Number , typename MemorySpace >
const auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::primitive_component_names
inlinestatic
Initial value:
=
[]() -> std::array<std::string, problem_dimension> {
if constexpr (dim == 1)
return {"rho", "v", "p"};
else if constexpr (dim == 2)
return {"rho", "v_1", "v_2", "p"};
else if constexpr (dim == 3)
return {"rho", "v_1", "v_2", "v_3", "p"};
__builtin_trap();
}()

An array holding all component names of the primitive state as a string.

Definition at line 241 of file hyperbolic_system.h.

◆ n_precomputed_values

template<int dim, typename Number , typename MemorySpace >
constexpr unsigned int ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::n_precomputed_values = 2
staticconstexpr

The number of precomputed values.

Definition at line 255 of file hyperbolic_system.h.

◆ precomputed_names

template<int dim, typename Number , typename MemorySpace >
const auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::precomputed_names
inlinestatic
Initial value:
=
std::array<std::string, n_precomputed_values>{"s", "eta_h"}

An array holding all component names of the precomputed values.

Definition at line 265 of file hyperbolic_system.h.

◆ n_initial_precomputed_values

template<int dim, typename Number , typename MemorySpace >
constexpr unsigned int ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::n_initial_precomputed_values = 0
staticconstexpr

The number of precomputed initial values.

Definition at line 271 of file hyperbolic_system.h.

◆ initial_precomputed_names

template<int dim, typename Number , typename MemorySpace >
const auto ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::initial_precomputed_names
inlinestatic
Initial value:
=
std::array<std::string, n_initial_precomputed_values>{}

An array holding all component names of the precomputed values.

Definition at line 282 of file hyperbolic_system.h.

◆ have_gamma

template<int dim, typename Number , typename MemorySpace >
constexpr bool ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::have_gamma = true
staticconstexpr

Definition at line 416 of file hyperbolic_system.h.

◆ have_covolume_constant

template<int dim, typename Number , typename MemorySpace >
constexpr bool ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::have_covolume_constant = false
staticconstexpr

Definition at line 417 of file hyperbolic_system.h.

◆ have_energy_equation

template<int dim, typename Number , typename MemorySpace >
constexpr bool ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::have_energy_equation = true
staticconstexpr

Definition at line 418 of file hyperbolic_system.h.

◆ have_high_order_flux

template<int dim, typename Number , typename MemorySpace >
constexpr bool ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::have_high_order_flux = false
staticconstexpr

The low-order and high-order fluxes are the same

Definition at line 653 of file hyperbolic_system.h.

◆ have_source_terms

template<int dim, typename Number , typename MemorySpace >
constexpr bool ryujin::Euler::HyperbolicSystemView< dim, Number, MemorySpace >::have_source_terms = false
staticconstexpr

We do not have source terms:

Definition at line 668 of file hyperbolic_system.h.


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