18#include <Kokkos_Core.hpp>
35 const rtype z = Kokkos::fmin(1.0
_r, Kokkos::fmax(
M_cut, Kokkos::sqrt(Kokkos::fmax(
M_l2,
M_r2))));
51template <
typename T_riemann_solver>
61 Kokkos::View<rtype *[N_CONSERVATIVE]>
W_cells;
72 if constexpr (
N_DIM == 2) {
91 if constexpr (
N_DIM == 2) {
148template <
typename T_riemann_solver>
157 Kokkos::View<rtype *[N_CONSERVATIVE]>
W_cells;
172 if constexpr (
N_DIM == 2) {
194 if constexpr (
N_DIM == 2) {
263 Kokkos::View<rtype *[N_CONSERVATIVE]>
rhs;
295template <
typename Eval>
308 Kokkos::View<rtype ***, Kokkos::LayoutRight>
slots;
313 if constexpr (
N_DIM == 2) {
342 if constexpr (
N_DIM == 2) {
357 out[
q] = interior[
q];
375 bool boundary =
false;
377 if (
i >= n_faces)
continue;
385 if constexpr (
N_DIM == 2) {
397 if (
i >= n_faces)
continue;
403 if (!boundary)
continue;
418 if constexpr (std::is_same_v<Eval, ScalarFaceValues>) {
433 if constexpr (
N_DIM == 2) {
473 Kokkos::View<rtype ***, Kokkos::LayoutRight>
slots;
486 if (
i >= n_faces)
continue;
BoundaryType
Definition boundary.h:25
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
float rtype
Definition common_typedef.h:39
#define N_DIM
Definition common_typedef.h:28
#define FOR_I_CONSERVATIVE
Definition common_typedef.h:33
#define N_CONSERVATIVE
Definition common_typedef.h:29
#define FOR_I_DIM
Definition common_typedef.h:32
KOKKOS_INLINE_FUNCTION const rtype * quad_normal(const Kokkos::View< rtype *** > &quad_normals, const uint32_t f, const uint8_t q, const rtype *n_face, rtype *n_q)
Unit normal at quadrature point q of face f: the point's own on curved meshes (quad_normals,...
Definition flux_functor.h:50
KOKKOS_INLINE_FUNCTION rtype face_upwind_fraction(const Kokkos::View< rtype * > &upwind, const BoundaryData &boundaries, const int32_t c0, const int32_t c1, const uint32_t i_face)
Upwind fraction of a face of the hybrid convective flux: the larger of its cells' (boundary faces oth...
Definition flux_functor.h:63
KOKKOS_INLINE_FUNCTION void low_mach_correction(rtype *W_l, rtype *W_r, const rtype gamma_l, const rtype gamma_r, const rtype M_cut)
The low-Mach correction of flux_functor.h with each side's own ratio of specific heats in its Mach nu...
Definition mixture_flux.h:32
constexpr uint8_t MAX_FACES
Definition teno.h:37
constexpr uint8_t MAX_FACE_QUAD
Definition teno.h:38
Approximate Riemann solvers.
Reconstruction of a gas mixture's cell scalars to faces.
rtype[teno::MAX_FACE_QUAD] FacePointValues
Per-face storage of scalar values at a face's quadrature points.
Definition scalar_reconstruction.h:29
Conservative state: the flow block and the species partial densities.
Kokkos::View< rtype **, SpeciesLayout > SpeciesView
Partial densities rho Y_k per (cell, species).
Definition state.h:37
Device-side lookup from faces to boundary conditions.
Definition boundary.h:229
KOKKOS_INLINE_FUNCTION void exterior_mixture(const uint32_t i_face, const uint8_t i_quad, const uint8_t n_quad, const rtype *W_i, const rtype *th_i, const rtype *n, const T_W &W_cells, const T_F &face_solution, const T_FT &face_thermo, const T_CT &cell_thermo, rtype *W_g, rtype *th_g) const
Exterior state of a gas mixture on boundary face i_face: W as in exterior_W (with the interior gamma ...
Definition boundary.h:272
Kokkos::View< uint8_t ** > face_image_quad
Definition boundary.h:235
Kokkos::View< int32_t * > face_bc
Definition boundary.h:230
Kokkos::View< int32_t * > face_image
Definition boundary.h:231
Kokkos::View< rtype **, Kokkos::LayoutRight > bc_Y
Definition boundary.h:257
Kokkos::View< BoundaryCondition * > bcs
Definition boundary.h:249
Kokkos::View< int32_t * > face_image_face
Definition boundary.h:232
Kokkos::View< uint8_t * > face_image_flip
Definition boundary.h:234
FaceFluxSumFunctor for double flux: the energy of a face's side-1 cell comes from face_energy_1.
Definition mixture_flux.h:257
Kokkos::View< int32_t *[2]> cells_of_face
Definition mixture_flux.h:260
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t i_cell) const
Definition mixture_flux.h:266
Kokkos::View< uint32_t * > offsets_faces_of_cell
Definition mixture_flux.h:258
Kokkos::View< rtype *[N_CONSERVATIVE]> rhs
Definition mixture_flux.h:263
Kokkos::View< rtype * > face_energy_1
Definition mixture_flux.h:262
Kokkos::View< uint32_t * > faces_of_cell
Definition mixture_flux.h:259
Kokkos::View< rtype *[N_CONSERVATIVE]> face_flux
Definition mixture_flux.h:261
Double-flux variant of MixtureFluxFunctor (Abgrall & Karni 2001; Billet & Abgrall 2003; Ma,...
Definition mixture_flux.h:149
Kokkos::View< rtype **[2][2]> face_thermo
Definition mixture_flux.h:159
rtype low_mach_cutoff
Definition mixture_flux.h:164
Kokkos::View< rtype **, Kokkos::LayoutStride > cell_thermo
Definition mixture_flux.h:160
Kokkos::View< rtype ** > face_weights
Definition mixture_flux.h:154
Kokkos::View< rtype * > upwind
Definition mixture_flux.h:165
Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution
Definition mixture_flux.h:155
Kokkos::View< rtype * > face_energy_1
Definition mixture_flux.h:162
Kokkos::View< rtype * > quad_weights
Definition mixture_flux.h:153
Kokkos::View< rtype *[N_CONSERVATIVE]> W_cells
Definition mixture_flux.h:157
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t i_face) const
Definition mixture_flux.h:169
Kokkos::View< int32_t *[2]> cells_of_face
Definition mixture_flux.h:152
Kokkos::View< rtype * > face_area
Definition mixture_flux.h:151
Kokkos::View< rtype *** > quad_normals
Definition mixture_flux.h:166
Kokkos::View< rtype *[N_DIM]> normals
Definition mixture_flux.h:150
Kokkos::View< rtype *[2]> frozen
Definition mixture_flux.h:158
Kokkos::View< rtype *[N_CONSERVATIVE]> face_flux
Definition mixture_flux.h:161
BoundaryData boundaries
Definition mixture_flux.h:156
Kokkos::View< rtype ** > face_mdot
Definition mixture_flux.h:163
Flow-block flux of a gas mixture over every face, as ConvectiveFluxFunctor, with the face thermodynam...
Definition mixture_flux.h:52
Kokkos::View< rtype *[N_DIM]> normals
Definition mixture_flux.h:53
Kokkos::View< rtype * > quad_weights
Definition mixture_flux.h:56
Kokkos::View< rtype *** > quad_normals
Definition mixture_flux.h:67
Kokkos::View< int32_t *[2]> cells_of_face
Definition mixture_flux.h:55
Kokkos::View< rtype **[2][2]> face_thermo
Definition mixture_flux.h:59
Kokkos::View< rtype *[N_CONSERVATIVE]> face_flux
Definition mixture_flux.h:63
Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution
Definition mixture_flux.h:58
Kokkos::View< rtype ** > face_weights
Definition mixture_flux.h:57
BoundaryData boundaries
Definition mixture_flux.h:60
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t i_face) const
Definition mixture_flux.h:70
Kokkos::View< rtype *[N_CONSERVATIVE]> W_cells
Definition mixture_flux.h:61
Kokkos::View< rtype * > upwind
Definition mixture_flux.h:66
Kokkos::View< rtype * > face_area
Definition mixture_flux.h:54
Kokkos::View< rtype **, Kokkos::LayoutStride > cell_thermo
Definition mixture_flux.h:62
Kokkos::View< rtype ** > face_mdot
Definition mixture_flux.h:64
rtype low_mach_cutoff
Definition mixture_flux.h:65
Species fluxes by mass-flux upwinding (Larrouturou 1991), F_k = max(mdot, 0) Y_k^L + min(mdot,...
Definition mixture_flux.h:296
BoundaryData boundaries
Definition mixture_flux.h:307
Kokkos::View< uint32_t * > offsets_faces_of_cell
Definition mixture_flux.h:299
Kokkos::View< rtype ***, Kokkos::LayoutRight > slots
Definition mixture_flux.h:308
uint32_t n_species
Definition mixture_flux.h:309
KOKKOS_INLINE_FUNCTION void exterior_Y(const uint32_t f, const uint32_t k, const rtype *interior, rtype *out) const
Mass fraction k beyond boundary face f (local face k_face of cell c, whose own values there are inter...
Definition mixture_flux.h:325
Eval values
Definition mixture_flux.h:306
Kokkos::View< rtype ** > face_weights
Definition mixture_flux.h:304
KOKKOS_INLINE_FUNCTION void linear(const uint32_t c) const
Linear reconstruction (ScalarFaceValues, one point per face): the faces' offsets and weights are shar...
Definition mixture_flux.h:368
Kokkos::View< rtype ** > face_mdot
Definition mixture_flux.h:305
KOKKOS_INLINE_FUNCTION uint8_t n_quad() const
Definition mixture_flux.h:312
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t c) const
Definition mixture_flux.h:417
Kokkos::View< int32_t *[2]> cells_of_face
Definition mixture_flux.h:301
static constexpr uint8_t MAX_Q
Definition mixture_flux.h:297
Kokkos::View< rtype * > face_area
Definition mixture_flux.h:302
Kokkos::View< uint32_t * > faces_of_cell
Definition mixture_flux.h:300
Kokkos::View< rtype * > quad_weights
Definition mixture_flux.h:303
Species RHS per unit volume: the inflow minus the outflow slots of each face of the cell,...
Definition mixture_flux.h:468
Kokkos::View< rtype * > cell_volume
Definition mixture_flux.h:472
Kokkos::View< uint32_t * > offsets_faces_of_cell
Definition mixture_flux.h:469
SpeciesView rhs
Definition mixture_flux.h:474
Kokkos::View< rtype ***, Kokkos::LayoutRight > slots
Definition mixture_flux.h:473
Kokkos::View< int32_t *[2]> cells_of_face
Definition mixture_flux.h:471
uint32_t n_species
Definition mixture_flux.h:475
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t c) const
Definition mixture_flux.h:478
Kokkos::View< uint32_t * > faces_of_cell
Definition mixture_flux.h:470
static KOKKOS_INLINE_FUNCTION void calc_flux(rtype *flux, const rtype *n, const rtype *W_l, const rtype *W_r, const rtype gamma)
Definition riemann_solver.h:569
Thermodynamics of one side of a face for a gas mixture: the frozen ratio of specific heats and the en...
Definition riemann_solver.h:102
CellSetup< ExecSpace > c
Definition teno_setup.cpp:1810
TableBatchT< Space > out
Definition teno_setup.cpp:681
uint8_t r
Definition teno_setup.cpp:687
Lane< rtype > scale
Definition teno_setup.cpp:531