Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
state.h File Reference

Conservative state: the flow block and the species partial densities. More...

#include <cstdint>
#include <string>
#include <Kokkos_Core.hpp>
#include "common_typedef.h"

Go to the source code of this file.

Classes

struct  CellSpecies
 The partial densities of one cell, in any layout. More...
 
struct  State
 Conservative state of every cell: the flow block and the partial densities of a mixture's species. A single gas has no species columns, and every loop over them is empty. More...
 

Typedefs

using StateView = Kokkos::View< rtype *[N_CONSERVATIVE]>
 Flow block [rho, rho u, rho E] per cell.
 
using SpeciesLayout = Kokkos::LayoutRight
 Layout of the species block: LayoutRight keeps a cell's species contiguous (the default); LayoutLeft (CMake Mallard_SPECIES_LAYOUT_LEFT) a species' cells.
 
using SpeciesView = Kokkos::View< rtype **, SpeciesLayout >
 Partial densities rho Y_k per (cell, species).
 

Functions

KOKKOS_INLINE_FUNCTION CellSpecies cell_species (const SpeciesView &rhoY, const uint32_t c)
 
void deep_copy (const State &dst, const State &src)
 Copy both blocks of src into dst.
 
template<typename ExecSpace >
void deep_copy (const ExecSpace &exec, const State &dst, const State &src)
 Copy both blocks of src into dst, ordered on exec without a fence.
 

Detailed Description

Conservative state: the flow block and the species partial densities.

Author
Matthew Bonanni (mbona.nosp@m.nni0.nosp@m.01@gm.nosp@m.ail..nosp@m.com)
Version
0.3
Date
2026-10-02

Typedef Documentation

◆ SpeciesLayout

Layout of the species block: LayoutRight keeps a cell's species contiguous (the default); LayoutLeft (CMake Mallard_SPECIES_LAYOUT_LEFT) a species' cells.

◆ SpeciesView

Partial densities rho Y_k per (cell, species).

◆ StateView

Flow block [rho, rho u, rho E] per cell.

Function Documentation

◆ cell_species()

◆ deep_copy() [1/2]

template<typename ExecSpace >
void deep_copy ( const ExecSpace &  exec,
const State &  dst,
const State &  src 
)
inline

Copy both blocks of src into dst, ordered on exec without a fence.

◆ deep_copy() [2/2]

void deep_copy ( const State &  dst,
const State &  src 
)
inline

Copy both blocks of src into dst.