15#ifndef PECLET_CORE_HALO_PARTICLE_REBALANCE_HPP
16#define PECLET_CORE_HALO_PARTICLE_REBALANCE_HPP
51 std::vector<double>*
weightOut =
nullptr) {
55 for (
int d = 0;
d <
Dim; ++
d)
Orthogonal recursive bisection of a Dim-dimensional global cell grid into numBlocks axis-aligned bloc...
void init(std::size_t numBlocks, IVec< Dim > globalSize)
Build the decomposition of a globalSize cell grid into numBlocks blocks (equal cell count).
const IVec< Dim > & globalSize() const
Global grid size in cells per axis.
Index linearGlobal(const IVec< Dim > &g) const
Global multi-index -> global linear index (x-fastest: I = x + y*nx + z*nx*ny).
int MPI_Comm_size(MPI_Comm, int *s)
int MPI_Allreduce(const void *sbuf, void *rbuf, int count, MPI_Datatype dt, MPI_Op, MPI_Comm)
std::size_t rebalanceByParticleCount(decomp::BlockDecomposer< Dim > &dec, ParticleMigrator< Dim > &mig, std::vector< typename detail::NonDeduced< Vec< Dim > >::type > &pos, std::vector< char > &payload, std::size_t stride, MPI_Comm comm=MPI_COMM_WORLD, std::vector< double > *weightOut=nullptr)
Re-decompose dec so each block holds a near-equal particle count, then migrate the particles (positio...
Kokkos::View< T *, MemSpace > View
1D device array.
Identity alias that blocks template argument deduction through it (C++20 std::type_identity).
T type
T itself, in a non-deduced context