File Field.hpp¶
↰ Parent directory (core/include
)
Non‑owning, typed view into SoA data with ghost padding.
Definition (core/include/Field.hpp
)¶
Detailed Description¶
Field<T>
wraps a raw pointer and the ghost‑inclusive extents. It does not allocate or free memory; ownership remains with Class MemoryManager. Designed for zero‑overhead access in inner loops and ISO_C_BINDING interop.
T
arithmetic element type (e.g., double, float)
Field<double> rho(rho_ptr, {nx_tot, ny_tot, nz_tot}, ng);
double val = rho(i,j,k); // adds ghost offset, uses Indexer3D
void* cptr = rho.c_ptr(); // pass to Fortran bind(C) kernel
Bounds are not checked in release builds. Prefer unit tests to validate extents.
Includes¶
Layout.hpp
(File Layout.hpp)array
cstddef
span