include/pops/core/state/state.hpp Source FileΒΆ
|
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.hpp
Go to the documentation of this file.
134 // kAuxNamedBase (= 5, right after T_e): extra[k] <-> component (kAuxNamedBase + k). Defaulting to
142 POPS_HD Real extra_field(int k) const { return (k >= 0 && k < kAuxMaxExtra) ? extra[k] : Real(0); }
150// B_z (3) and T_e (4), so index 5. A model declaring K named fields sets n_aux = kAuxNamedBase +
158// this static_assert forces raising kAuxNamedBase (and AUX_NAMED_BASE on the DSL side) accordingly.
175// named base plus the bounded number of model-NAMED fields. NAMING the cap (rather than leaving the
176// bound an ad-hoc literal scattered across sites) makes the only remaining compile-time aux limit
177// DECLARATIVE; it is mirrored by AUX_NAMED_MAX on the DSL side (python/pops/dsl.py) and reported by
178// pops.capabilities() (the _pops module exposes kAuxMaxExtra/kAuxNamedBase so Python cannot silently
182// The named-aux bound must allow at least one field, and the Aux POD storage must match it EXACTLY:
183// extra[] is the only place named fields live, so a mismatch between the declared limit and the array
184// would silently truncate (read-as-0). These pin the limit at compile time (tested via test_aux_names
Definition amr_hierarchy.hpp:29
POPS_HD StateVec< N > operator-(StateVec< N > a, const StateVec< N > &b)
Definition state.hpp:48
POPS_HD StateVec< N > operator+(StateVec< N > a, const StateVec< N > &b)
Definition state.hpp:41
#define POPS_AUX_FIELDS(X)
SINGLE SOURCE of the layout of the EXTRA aux fields (X-macro).
Definition state.hpp:92
POINTWISE auxiliary fields shared with the physics: single coupling channel.
Definition state.hpp:123
POPS_HD Real extra_field(int k) const
BOUNDED read of a named aux field (component kAuxNamedBase + k).
Definition state.hpp:142
Base scalar types and the POPS_HD macro (host+device portability).
Generated by