StateVec< N > Struct Template ReferenceΒΆ

adc_cpp: pops::StateVec< N > Struct Template 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

Conserved state vector of fixed size, known at compile time. More...

#include <state.hpp>

+ Collaboration diagram for pops::StateVec< N >:

Public Member Functions

POPS_HD Realoperator[] (int i)
 
POPS_HD Real operator[] (int i) const
 

Static Public Member Functions

static POPS_HD constexpr int size ()
 

Public Attributes

Real v [N] {}
 

Detailed Description

template<int N>
struct pops::StateVec< N >

Conserved state vector of fixed size, known at compile time.

Examples: StateVec<1> for a scalar (advection), StateVec<4> for 2D Euler. The value N drives PhysicalModel::n_vars.

device INVARIANT: raw C array (Real v[N]), not std::array; trivially copyable, device-clean (POPS_HD). No non-trivial constructor.

Member Function Documentation

◆ operator[]() [1/2]

template<int N>
POPS_HD Real & pops::StateVec< N >::operator[] ( int  i)
inline

◆ operator[]() [2/2]

template<int N>
POPS_HD Real pops::StateVec< N >::operator[] ( int  i) const
inline

◆ size()

template<int N>
static POPS_HD constexpr int pops::StateVec< N >::size ( )
inlinestaticconstexpr

Member Data Documentation

◆ v

template<int N>
Real pops::StateVec< N >::v[N] {}

The documentation for this struct was generated from the following file: