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

Classes

struct  ActivityFunctor
 Flags the cells of a chunk that need chemistry (see CellChemistry), by threads or by teams. More...
 
struct  ActivityTeamTag
 
struct  AdvanceFunctor
 Advances the cells of a queue over dt, writes their partial densities, last sub-step and cost, and counts failures. The temperature seed stays as the RHS left it: halo copies of a cell get no chemistry, and their seeds must follow the owner's. More...
 
struct  HeatReleaseFunctor
 Heat release rate -sum_k h_k omega_k [W/m^3] and mass production rates W_k omega_k [kg/(m^3 s)] of the cells of a chunk. More...
 
struct  LocalWork
 Tag of the thread-per-cell kernel with at most N doubles of work memory per cell on the stack. More...
 
struct  QueueFunctor
 Compacts the flagged cells of a chunk into a queue; the total is the queue length. More...
 
struct  TeamTag
 
struct  WideCountFunctor
 Counts the queued cells at least as expensive as a cost (the sorted queue holds minus the costs). More...
 

Typedefs

template<bool Sparse, bool Fast>
using TeamPolicy = Kokkos::TeamPolicy< TeamTag< Sparse >, Kokkos::LaunchBounds< WARP, Fast ? MIN_FAST_TEAMS :MIN_TEAMS > >
 
using Member = TeamPolicy< false, false >::member_type
 
template<bool Sparse>
using WideTeamPolicy = Kokkos::TeamPolicy< TeamTag< Sparse >, Kokkos::LaunchBounds< MAX_TEAM_LANES, 512/MAX_TEAM_LANES > >
 
using ActivityPolicy = Kokkos::TeamPolicy< ActivityTeamTag >
 

Functions

KOKKOS_INLINE_FUNCTION double cell_composition (const Mixture &gas, const StateView &U, const SpeciesView &rhoY, const Kokkos::View< rtype * > &T_seed, const uint32_t c, double *Y, double &T)
 Mass fractions (double) and temperature of a cell; returns its specific internal energy.
 
template<typename Space >
void launch_teams (const Space &space, const AdvanceFunctor &functor, const uint32_t league, const uint32_t threads, const uint32_t lanes, const bool sparse, const size_t fast_bytes, const Kokkos::View< uint32_t > &failures)
 Integrates queued cells [functor.offset, functor.offset + league) by teams of threads x lanes on an execution space instance; the failures go to a device scalar.
 
void sort_queue (const Kokkos::View< uint32_t * > &queue, const Kokkos::View< float * > &cost, const uint32_t n)
 Sorts queued cells [0, n) by their keys (minus the last cost: the most expensive first).
 
uint32_t read_failures (const Kokkos::View< uint32_t > &failures)
 

Variables

constexpr double WORK_MEMORY_BYTES = 1024.0 * 1024.0 * 1024.0
 
constexpr float WIDE_TEAM_COST = 16.0f
 
constexpr uint32_t WARP = 32
 
constexpr uint32_t MIN_TEAMS = 16
 
constexpr uint32_t MIN_FAST_TEAMS = 4
 
constexpr uint32_t MAX_TEAM_LANES = 512
 
constexpr uint32_t LOCAL_SMALL = 256
 
constexpr uint32_t LOCAL_LARGE = 1024
 
constexpr bool ON_GPU = !Kokkos::SpaceAccessibility<Kokkos::DefaultExecutionSpace, Kokkos::HostSpace>::accessible
 

Typedef Documentation

◆ ActivityPolicy

◆ Member

◆ TeamPolicy

template<bool Sparse, bool Fast>
using cell_chemistry_kernels::TeamPolicy = typedef Kokkos::TeamPolicy<TeamTag<Sparse>, Kokkos::LaunchBounds<WARP, Fast ? MIN_FAST_TEAMS : MIN_TEAMS> >

◆ WideTeamPolicy

template<bool Sparse>
using cell_chemistry_kernels::WideTeamPolicy = typedef Kokkos::TeamPolicy<TeamTag<Sparse>, Kokkos::LaunchBounds<MAX_TEAM_LANES, 512 / MAX_TEAM_LANES> >

Function Documentation

◆ cell_composition()

KOKKOS_INLINE_FUNCTION double cell_chemistry_kernels::cell_composition ( const Mixture &  gas,
const StateView &  U,
const SpeciesView &  rhoY,
const Kokkos::View< rtype * > &  T_seed,
const uint32_t  c,
double *  Y,
double &  T 
)

Mass fractions (double) and temperature of a cell; returns its specific internal energy.

◆ launch_teams()

template<typename Space >
void cell_chemistry_kernels::launch_teams ( const Space &  space,
const AdvanceFunctor &  functor,
const uint32_t  league,
const uint32_t  threads,
const uint32_t  lanes,
const bool  sparse,
const size_t  fast_bytes,
const Kokkos::View< uint32_t > &  failures 
)
inline

Integrates queued cells [functor.offset, functor.offset + league) by teams of threads x lanes on an execution space instance; the failures go to a device scalar.

◆ read_failures()

uint32_t cell_chemistry_kernels::read_failures ( const Kokkos::View< uint32_t > &  failures)
inline

◆ sort_queue()

void cell_chemistry_kernels::sort_queue ( const Kokkos::View< uint32_t * > &  queue,
const Kokkos::View< float * > &  cost,
const uint32_t  n 
)
inline

Sorts queued cells [0, n) by their keys (minus the last cost: the most expensive first).

Variable Documentation

◆ LOCAL_LARGE

constexpr uint32_t cell_chemistry_kernels::LOCAL_LARGE = 1024

◆ LOCAL_SMALL

constexpr uint32_t cell_chemistry_kernels::LOCAL_SMALL = 256
constexpr

◆ MAX_TEAM_LANES

constexpr uint32_t cell_chemistry_kernels::MAX_TEAM_LANES = 512
constexpr

◆ MIN_FAST_TEAMS

constexpr uint32_t cell_chemistry_kernels::MIN_FAST_TEAMS = 4

◆ MIN_TEAMS

constexpr uint32_t cell_chemistry_kernels::MIN_TEAMS = 16
constexpr

◆ ON_GPU

constexpr bool cell_chemistry_kernels::ON_GPU = !Kokkos::SpaceAccessibility<Kokkos::DefaultExecutionSpace, Kokkos::HostSpace>::accessible
constexpr

◆ WARP

constexpr uint32_t cell_chemistry_kernels::WARP = 32
constexpr

◆ WIDE_TEAM_COST

constexpr float cell_chemistry_kernels::WIDE_TEAM_COST = 16.0f
constexpr

◆ WORK_MEMORY_BYTES

constexpr double cell_chemistry_kernels::WORK_MEMORY_BYTES = 1024.0 * 1024.0 * 1024.0
constexpr