|
core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
Distributed geometric-multigrid V-cycle for the plain Laplacian on a uniform (lmax==0) octree, the distributed analog of the host AmrMultigrid + flow's MPI-folded CutcellMG. More...
#include <distributed_poisson.hpp>
Public Member Functions | |
| void | build (const IVec< Dim > &g0, const AmrGeometry< Dim > &geo, const std::array< bool, Dim > &periodic, MPI_Comm comm) |
Build the hierarchy from the finest global root grid g0 (lmax==0) on comm. | |
| std::size_t | numLevels () const |
| DistributedOctree< Dim, Bits > & | octree (std::size_t L=0) |
| DistributedPoisson< Dim, Bits > & | op (std::size_t L=0) |
| Index | numLeaves (std::size_t L=0) const |
| void | vcycle (std::vector< double > &x, const std::vector< double > &b, int pre=2, int post=2, int bottom=30, std::size_t L=0) |
One V-cycle of A x = b on level L (default the finest), correction scheme. | |
Distributed geometric-multigrid V-cycle for the plain Laplacian on a uniform (lmax==0) octree, the distributed analog of the host AmrMultigrid + flow's MPI-folded CutcellMG.
The hierarchy is a stack of DistributedOctrees on the successively halved global root grid, each ORB-decomposed over the same comm.
The decompositions nest: for a power-of-two grid and rank count, ORB bisects at proportional positions, so rank r's coarse block is exactly its fine block halved. Hence every fine cell's parent is owned by the same rank — restriction and prolongation are purely local (no comm); only the Jacobi smoother needs the per-level halo. build() asserts this nesting (each c2p entry resolves locally).
Jacobi smoother + local averaging restriction + piecewise-constant prolongation are all order-independent / per-cell, so the whole V-cycle is bit-identical across rank counts (COMM_WORLD == COMM_SELF), the suite's distributed-validation contract.
Definition at line 142 of file distributed_poisson.hpp.
|
inline |
Build the hierarchy from the finest global root grid g0 (lmax==0) on comm.
Coarsens by halving until an axis would drop below 2 or the cell count below the rank count. geo.h0 is the finest spacing; coarser levels use 2^k·h0.
Definition at line 147 of file distributed_poisson.hpp.
References MPI_Comm_size().
|
inline |
Definition at line 194 of file distributed_poisson.hpp.
|
inline |
Definition at line 195 of file distributed_poisson.hpp.
|
inline |
Definition at line 196 of file distributed_poisson.hpp.
Referenced by peclet::core::amr::DistributedMultigrid< Dim, Bits >::vcycle().
|
inline |
Definition at line 197 of file distributed_poisson.hpp.
|
inline |
One V-cycle of A x = b on level L (default the finest), correction scheme.
Definition at line 200 of file distributed_poisson.hpp.
References peclet::core::amr::DistributedPoisson< Dim, Bits >::jacobi(), peclet::core::amr::DistributedMultigrid< Dim, Bits >::op(), peclet::core::amr::DistributedPoisson< Dim, Bits >::residual(), and peclet::core::amr::DistributedMultigrid< Dim, Bits >::vcycle().
Referenced by peclet::core::amr::DistributedMultigrid< Dim, Bits >::vcycle().