15#include <Kokkos_Core.hpp>
36 const rtype z = Kokkos::fmin(1.0
_r, Kokkos::fmax(
M_cut, Kokkos::sqrt(Kokkos::fmax(
M_l2,
M_r2))));
52 if (quad_normals.extent(0) == 0)
return n_face;
65 if (c1 >= 0)
return Kokkos::fmax(upwind(c0), upwind(c1));
78 Kokkos::View<rtype *[N_CONSERVATIVE][N_DIM]>
gradients;
88 if constexpr (
N_DIM == 2) {
93 for (
uint8_t k = 0; k < 3; k++) {
117template <
typename T_riemann_solver>
126 Kokkos::View<rtype *[N_CONSERVATIVE]>
W_cells;
136 if constexpr (
N_DIM == 2) {
156 if constexpr (
N_DIM == 2) {
160 if (
w_q == 0.0
_r)
continue;
200 Kokkos::View<rtype *[N_CONSERVATIVE]>
rhs;
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, const rtype M_cut)
Low-Mach correction of Thornber et al. (J. Comput. Phys. 227, 2008): scales the jump of the reconstru...
Definition flux_functor.h:33
Approximate Riemann solvers.
Device-copyable boundary condition.
Definition boundary.h:97
Device-side lookup from faces to boundary conditions.
Definition boundary.h:229
Kokkos::View< int32_t * > face_bc
Definition boundary.h:230
Kokkos::View< BoundaryCondition * > bcs
Definition boundary.h:249
KOKKOS_INLINE_FUNCTION void exterior_W(const uint32_t i_face, const uint8_t i_quad, const uint8_t n_quad, const rtype *W_i, const rtype *n, const T_W &W_cells, const T_F &face_solution, rtype *W_g) const
Exterior state seen by the Riemann solver on boundary face i_face.
Definition boundary.h:335
Integrates the convective flux over every face into face_flux, the rate of change it causes in cells_...
Definition flux_functor.h:118
Kokkos::View< rtype * > upwind
Definition flux_functor.h:130
Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution
Definition flux_functor.h:124
Kokkos::View< rtype *** > quad_normals
Definition flux_functor.h:131
Kokkos::View< int32_t *[2]> cells_of_face
Definition flux_functor.h:121
Kokkos::View< rtype *[N_CONSERVATIVE]> W_cells
Definition flux_functor.h:126
Kokkos::View< rtype ** > face_weights
Definition flux_functor.h:123
Kokkos::View< rtype *[N_CONSERVATIVE]> face_flux
Definition flux_functor.h:127
BoundaryData boundaries
Definition flux_functor.h:125
Kokkos::View< rtype * > quad_weights
Definition flux_functor.h:122
Kokkos::View< rtype * > face_area
Definition flux_functor.h:120
rtype gamma
Definition flux_functor.h:128
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t i_face) const
Definition flux_functor.h:134
Kokkos::View< rtype *[N_DIM]> normals
Definition flux_functor.h:119
rtype low_mach_cutoff
Definition flux_functor.h:129
Sums the face fluxes of each cell into its RHS in faces_of_cell order, so that the result does not de...
Definition flux_functor.h:195
Kokkos::View< uint32_t * > faces_of_cell
Definition flux_functor.h:197
Kokkos::View< rtype *[N_CONSERVATIVE]> face_flux
Definition flux_functor.h:199
Kokkos::View< uint32_t * > offsets_faces_of_cell
Definition flux_functor.h:196
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t i_cell) const
Definition flux_functor.h:203
Kokkos::View< rtype *[N_CONSERVATIVE]> rhs
Definition flux_functor.h:200
Kokkos::View< int32_t *[2]> cells_of_face
Definition flux_functor.h:198
Upwind fraction of each cell for the hybrid convective flux: 1 where the Ducros sensor restricted to ...
Definition flux_functor.h:77
Kokkos::View< rtype * > upwind
Definition flux_functor.h:79
rtype threshold
Definition flux_functor.h:80
rtype floor
Definition flux_functor.h:81
Kokkos::View< rtype *[N_CONSERVATIVE][N_DIM]> gradients
Definition flux_functor.h:78
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t c) const
Definition flux_functor.h:84
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
CellSetup< ExecSpace > c
Definition teno_setup.cpp:1810
Lane< rtype > scale
Definition teno_setup.cpp:531