12#ifndef CHARACTERISTIC_H
13#define CHARACTERISTIC_H
15#include <Kokkos_Core.hpp>
49 Kokkos::View<rtype *[N_CONSERVATIVE]>
W_cells;
141 if constexpr (
N_DIM == 2) {
150 if constexpr (
N_DIM == 2) {
155 if (w == 0.0
_r)
continue;
166 const rtype c2 = gamma * W[
E] / W[0];
174 if (
u_n >=
c)
return;
191 const rtype K = Kokkos::fmin(
bc.relax[Relax::ACOUSTIC] *
c * Kokkos::fmax(1.0
_r -
M2, 0.0
_r), 1.0
_r /
dt);
195 : (
bc.relax[Relax::BETA] < 0.0
_r) ? Kokkos::fmin(Kokkos::sqrt(
M2), 1.0
_r)
196 :
bc.relax[Relax::BETA];
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
Cell gradient reconstruction.
Device-copyable boundary condition.
Definition boundary.h:97
Relax
Entries of relax: relaxation rates over the sound speed are sigma / L (1/length).
Definition boundary.h:99
Device-side lookup from faces to boundary conditions.
Definition boundary.h:229
Kokkos::View< rtype *[N_DIM]> char_target
Definition boundary.h:243
Kokkos::View< int32_t * > face_bc
Definition boundary.h:230
Kokkos::View< rtype *[3]> char_transverse
Definition boundary.h:241
Kokkos::View< rtype *[N_DIM]> char_target_next
Definition boundary.h:244
Kokkos::View< rtype *[2]> char_state
Definition boundary.h:242
Kokkos::View< uint32_t * > char_faces
Definition boundary.h:239
Kokkos::View< uint8_t * > char_edge
Definition boundary.h:248
Kokkos::View< rtype *[N_DIM]> char_neighbor_dx
Definition boundary.h:247
Kokkos::View< BoundaryCondition * > bcs
Definition boundary.h:249
rtype gamma
Definition boundary.h:250
Kokkos::View< uint32_t * > char_offsets
Definition boundary.h:245
Kokkos::View< uint32_t * > char_neighbors
Definition boundary.h:246
Advances the incoming acoustic wave w- = p - rho c u_n of every characteristic face by one forward-Eu...
Definition characteristic.h:124
BoundaryData boundaries
Definition characteristic.h:125
Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution
Definition characteristic.h:127
bool initialize
Definition characteristic.h:132
Kokkos::View< rtype * > quad_weights
Definition characteristic.h:129
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t k) const
Definition characteristic.h:135
Kokkos::View< rtype ** > face_weights
Definition characteristic.h:130
Kokkos::View< rtype *[N_DIM]> face_normals
Definition characteristic.h:126
rtype dt
Definition characteristic.h:131
Kokkos::View< rtype **[2][2]> face_thermo
Definition characteristic.h:128
Pieces of the transverse terms of the incoming acoustic wave at every characteristic face (Yoo & Im 2...
Definition characteristic.h:43
Kokkos::View< rtype *[N_DIM]> face_normals
Definition characteristic.h:46
KOKKOS_INLINE_FUNCTION void operator()(const uint32_t k) const
Definition characteristic.h:58
Kokkos::View< int32_t *[2]> cells_of_face
Definition characteristic.h:48
Kokkos::View< rtype *[N_CONSERVATIVE]> W_cells
Definition characteristic.h:49
KOKKOS_INLINE_FUNCTION void face_state(const uint32_t f, rtype *W) const
State of the cell of boundary face f.
Definition characteristic.h:53
Kokkos::View< rtype * > face_area
Definition characteristic.h:47
Kokkos::View< rtype *[N_DIM]> face_coords
Definition characteristic.h:45
BoundaryData boundaries
Definition characteristic.h:44
Inverse-distance-squared weighted least-squares normal equations M g = b, with M stored as its upper ...
Definition gradient.h:25
CellSetup< ExecSpace > c
Definition teno_setup.cpp:1810
Geometry< Space > g
Definition teno_setup.cpp:678
uint8_t beta[teno::MAX_NK][3]
Definition teno_setup.cpp:315