Expand description
MPI-oriented domain decomposition scaffolding.
This module defines deterministic domain partition metadata and halo packing/exchange primitives that can be wired to rsmpi in a later phase.
Structs§
- Cartesian
Tile - 2D Cartesian tile descriptor — one per rank in a (pz × pr) topology.
- Distributed
Solve Result - Result of a distributed GS solve.
- Distributed
Solver Config - Configuration for the distributed GS solver.
- Domain
Slice
Functions§
- apply_
halo_ rows - auto_
distributed_ gs_ solve - Convenience: solve GS with automatic process-grid selection.
- decompose_
2d - Decompose a 2D grid of shape (global_nz × global_nr) into a (pz × pr) Cartesian process topology.
- decompose_
z - distributed_
gs_ solve - Distributed Grad-Shafranov solver using additive Schwarz domain decomposition with Rayon thread-parallelism.
- extract_
tile - Extract a padded local tile (with halo) from the global array.
- gs_
residual_ l2 - Compute the L2 norm of the GS residual: ||LΨ - f||₂.
- inject_
tile - Write the core (non-halo) region of a local tile back into the global array.
- l2_
norm_ delta - optimal_
process_ grid - Optimal process-grid factorisation for a given (nz, nr) global grid and total number of available ranks. Minimises the surface-to-volume ratio of each tile (i.e. the halo communication overhead).
- pack_
halo_ rows - serial_
halo_ exchange - serial_
halo_ exchange_ 2d - Serial 2D halo exchange across all tiles.
- split_
with_ halo - stitch_
without_ halo