include/pops/mesh/storage/multifab.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
|
MultiFab: a field DISTRIBUTED over a level (equivalent of AMReX's MultiFab). More...
#include <pops/core/foundation/types.hpp>#include <pops/mesh/index/box2d.hpp>#include <pops/mesh/layout/box_array.hpp>#include <pops/mesh/layout/distribution_mapping.hpp>#include <pops/mesh/storage/fab2d.hpp>#include <pops/mesh/execution/for_each.hpp>#include <pops/mesh/boundary/halo_schedule.hpp>#include <pops/parallel/comm.hpp>#include <memory>#include <utility>#include <vector>
Include dependency graph for multifab.hpp:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | pops::MultiFab |
| Field distributed over a level: decomposition (BoxArray) + distribution (DistributionMapping) + ncomp components + ngrow ghosts. More... | |
Namespaces | |
| namespace | pops |
Functions | |
| Real | pops::sum (const MultiFab &mf, int comp=0) |
| Sum of the VALID cells of component comp, reduced over ALL ranks (all_reduce). | |
Detailed Description
MultiFab: a field DISTRIBUTED over a level (equivalent of AMReX's MultiFab).
Carries the decomposition (BoxArray), the distribution (DistributionMapping), the component and ghost counts, and allocates only the Fab2D OWNED by this rank. This is where data parallelism lives; the physics layer never sees it. Iteration runs over the LOCAL fabs: for (int li = 0; li < mf.local_size(); ++li) { auto a = mf.fab(li).array(); for_each_cell(...); }. sync_host()/sync_device() encode the access intent (data residence, see for_each.hpp); under unified memory sync_host = a targeted device_fence(), sync_device = no-op. sum() reduces over all ranks (all_reduce): Kokkos::Sum reassociates per tile (deterministic/idempotent, not bit-identical to a lexicographic sum).
Generated by