include/pops/mesh/layout/distribution_mapping.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
|
distribution_mapping.hpp
Go to the documentation of this file.
Owning MPI rank of each box, indexed by GLOBAL box index (parallel to a BoxArray).
Definition distribution_mapping.hpp:19
int operator[](int i) const
Owning rank of the box with global index i.
Definition distribution_mapping.hpp:35
const std::vector< int > & ranks() const
View on the rank vector (element-by-element equality = same assignment).
Definition distribution_mapping.hpp:39
int size() const
Number of boxes covered (= size of the associated BoxArray).
Definition distribution_mapping.hpp:37
DistributionMapping(std::vector< int > rank)
EXPLICIT assignment: rank[i] = owning rank of box i (move).
Definition distribution_mapping.hpp:32
DistributionMapping()=default
DistributionMapping(int nboxes, int nranks)
Round-robin: box i -> rank i % nranks (rank 0 if nranks <= 0). Default distribution.
Definition distribution_mapping.hpp:24
Definition amr_hierarchy.hpp:29
Generated by