include/pops/numerics/spatial/primitives/state_access.hpp File ReferenceΒΆ

adc_cpp: include/pops/numerics/spatial/primitives/state_access.hpp File Reference
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
state_access.hpp File Reference

Model/state/aux access layer of the Cartesian spatial operator. More...

+ Include dependency graph for state_access.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pops::SourceFreeModel< M >
 SourceFreeModel<M>: adapter that cancels the source of M (explicit IMEX half-step). More...
 

Namespaces

namespace  pops
 

Concepts

concept  pops::DiffusiveModel
 DiffusiveModel: optional concept for models with isotropic scalar diffusion.
 

Macros

#define POPS_AUX_LOAD(name, idx)
 

Functions

template<class Model >
POPS_HD Model::State pops::load_state (const ConstArray4 &a, int i, int j)
 load_state<Model>: reads Model::n_vars scalars at (i,j) from an Array4.
 
template<int NComp = kAuxBaseComps>
POPS_HD Aux pops::load_aux (const ConstArray4 &a, int i, int j)
 load_aux<NComp>: reads NComp components of the auxiliary from an Array4 at (i,j).
 

Detailed Description

Model/state/aux access layer of the Cartesian spatial operator.

CONTRACT: how the spatial operator reads a model and its data.

  • DiffusiveModel: optional concept (model.diffusivity() -> nu); the Fickian flux F = -nu grad U is added to the hyperbolic flux when present (face_flux.hpp, cartesian_operator.hpp).
  • SourceFreeModel<M>: adapter that zeroes the source (explicit IMEX half-step).
  • load_state<Model>: reads the conservative state from an Array4 (POPS_HD).
  • load_aux<NComp>: reads the auxiliary (phi, grad, extra fields) (POPS_HD).

This module carries no grid loop: every entry is POINTWISE (POPS_HD) or a compile-time model adapter. It is the bottom of the spatial/ dependency DAG (depends only on core/).

Macro Definition Documentation

◆ POPS_AUX_LOAD

#define POPS_AUX_LOAD (   name,
  idx 
)
Value:
if constexpr (NComp > (idx)) \
x.name = a(i, j, idx);