18#include <Kokkos_Core.hpp>
23using StateView = Kokkos::View<rtype *[N_CONSERVATIVE]>;
30#ifdef Mallard_SPECIES_LAYOUT_LEFT
70 Kokkos::deep_copy(
dst.flow,
src.flow);
71 if (
src.species.span() > 0) Kokkos::deep_copy(
dst.species,
src.species);
75template <
typename ExecSpace>
78 if (
src.species.span() > 0) Kokkos::deep_copy(
exec,
dst.species,
src.species);
KOKKOS_INLINE_FUNCTION rtype dot(const rtype *a, const rtype *b)
Compute the dot product of two arrays.
Definition common_math.h:32
Typedefs for common types.
float rtype
Definition common_typedef.h:39
void deep_copy(const State &dst, const State &src)
Copy both blocks of src into dst.
Definition state.h:69
Kokkos::View< rtype *[N_CONSERVATIVE]> StateView
Flow block [rho, rho u, rho E] per cell.
Definition state.h:23
KOKKOS_INLINE_FUNCTION CellSpecies cell_species(const SpeciesView &rhoY, const uint32_t c)
Definition state.h:47
Kokkos::LayoutRight SpeciesLayout
Layout of the species block: LayoutRight keeps a cell's species contiguous (the default); LayoutLeft ...
Definition state.h:33
Kokkos::View< rtype **, SpeciesLayout > SpeciesView
Partial densities rho Y_k per (cell, species).
Definition state.h:37
The partial densities of one cell, in any layout.
Definition state.h:40
size_t stride
Definition state.h:42
KOKKOS_INLINE_FUNCTION rtype operator[](const uint32_t k) const
Definition state.h:43
const rtype * first
Definition state.h:41
Conservative state of every cell: the flow block and the partial densities of a mixture's species....
Definition state.h:56
uint32_t n_species() const
Definition state.h:65
State(StateView flow_, SpeciesView species_)
Definition state.h:61
State(const std::string &label, uint32_t n_cells, uint32_t n_species)
Definition state.h:62
StateView flow
Definition state.h:57
SpeciesView species
Definition state.h:58
CellSetup< ExecSpace > c
Definition teno_setup.cpp:1810