include/pops/mesh/storage/fab2d.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
|
Fab2D: single-grid data on a Box2D (in-house equivalent of AMReX's FArrayBox); Array4 / ConstArray4: lightweight POD device-copyable handles over its buffer. More...
#include <pops/core/foundation/allocator.hpp>#include <pops/core/foundation/types.hpp>#include <pops/mesh/index/box2d.hpp>#include <cassert>#include <cstdint>#include <vector>
Include dependency graph for fab2d.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | pops::Array4 |
| WRITE POD handle (raw pointer + strides) over a Fab2D buffer, indexed by (i, j, c) IN GLOBAL INDICES (ig0/jg0 = lower corner of the grown box). More... | |
| struct | pops::ConstArray4 |
| READ-only handle (const counterpart of Array4): same layout and same contract (POD device-copyable, global indices, no bounds checking). More... | |
| class | pops::Fab2D |
| Single-grid data on a Box2D: VALID box + ng ghost layers, ncomp components, component-slow layout. More... | |
Namespaces | |
| namespace | pops |
Detailed Description
Fab2D: single-grid data on a Box2D (in-house equivalent of AMReX's FArrayBox); Array4 / ConstArray4: lightweight POD device-copyable handles over its buffer.
Contiguous buffer covering the VALID box grown by n_ghost layers, with n_comp components. Component-SLOW layout (like AMReX Array4): for a given component the (i, j) plane is contiguous with i as the fast index -> each variable is a contiguous SoA slice (good per-variable vectorization). Index: c*(nx_tot*ny_tot) + (j-jg0)*nx_tot + (i-ig0). Array4 / ConstArray4 are lightweight handles (raw pointer + strides), trivially copyable and capturable BY VALUE in a functor (Kokkos view semantics): you capture the handle, not the Fab; operator() is POPS_HD (device-callable). Storage lives in UNIFIED memory (cf. allocator.hpp).
Generated by