Domain decomposition
The equations of simgeometry.domain_decomposition, declared on the code that implements them and checked by the tests.
calculate_proc_sizes
functionsourceCalculate the optimal number of processes in each dimension based on the
- search
- Assumes
- ranks, the number of active (decomposed) axes, taken in order with at the start
- the last active axis gets , so and the search never restarts or fails
- no axis decomposed: all ranks on the first decomposed axis (all ones when none is)
- not balanced across axes: 6 ranks in 3D give , 16 give
DomainDecomposition
classsourceRepresent the MPI process grid of a decomposed domain.
- rank
- neighbours
- node cuts
- edges
- owner
- Assumes
- the process grid from
calculate_proc_sizes; row-major ranks, as mpiarray places them - over cells on a bounded axis, on a periodic one; the first blocks are one node longer (mpiarray's
chunk_bounds) - a position below goes to block 0, one at or above (also and NaN) to the last block
- replicated (more than one rank, one block): every rank holds everything at process coordinate 0; its neighbours are itself on periodic axes
- fields (
layout) and markers (owner_ranks) share the one split
- the process grid from
- Built from