|
core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
Namespaces | |
| namespace | detail |
Classes | |
| struct | DomainMap |
| Physical-space layout that maps a position to a global cell of the decomposition. More... | |
| struct | GridFieldView |
A contiguous local array of T (one per cell of the extended block) viewed as a packable field. More... | |
| class | GridHalo |
GPU ghost-layer exchange for a contiguous device field peclet::core::View<T> (one element per extended-block cell). More... | |
| class | GridHaloTopology |
| class | NbxEngine |
| class | ParticleHalo |
| class | ParticleHaloTopology |
| class | ParticleMigrator |
| class | ParticleMigratorView |
| Device counterpart of ParticleMigrator. More... | |
Functions | |
| template<int Dim> | |
| 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 (positions + opaque fixed-stride payload) to their new owners via mig (which must reference dec). | |
| std::size_t peclet::core::halo::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 (positions + opaque fixed-stride payload) to their new owners via mig (which must reference dec).
weightOut, when non-null, receives the agreed global per-cell count grid (x-fastest). Returns this rank's new local particle count. (pos is a non-deduced parameter — Dim is fixed by dec/mig — because int Dim cannot deduce from a std::array's size_t bound.)
Definition at line 40 of file particle_rebalance.hpp.
References MPI_Allreduce(), MPI_Comm_size(), MPI_DOUBLE, and MPI_SUM.