High-Performance & Parallel Computing

domain decomposition

To paint an enormous mural with a crew, you do not all crowd one spot — you chalk the wall into sections, give each painter a section, and let them work in parallel. The only fuss is along the seams, where one painter's edge must match the neighbour's. Domain decomposition is exactly this idea for grid- and mesh-based computations: you cut the physical region of the problem (the mesh of a fluid flow, the grid of a heat equation, the cells of a structural model) into subdomains, assign one to each process, and let them compute simultaneously, coordinating only along the shared boundaries.

Concretely, take a PDE solved on a big grid spread across many MPI ranks. Each rank owns a contiguous block of the grid and stores only that block in its private memory. The catch is that updating a cell needs its neighbours, and cells on the edge of a block have neighbours that live on the adjacent rank. The standard fix is a layer of 'ghost cells' (or halo): each rank keeps a copy of the thin boundary strip of its neighbours' data, refreshed each step by exchanging messages with those neighbours. So one time step becomes: update the interior (no communication needed), exchange halos with neighbours, update the edges. Because each rank touches only a few neighbours and sends only a thin boundary (surface, scaling like the block's area) while computing over the whole block (volume), the ratio of communication to computation shrinks as the blocks get bigger — which is exactly why domain decomposition weak-scales so well.

Domain decomposition is the dominant strategy for parallelising the large simulations of computational science — fluids, weather, structures, electromagnetics — because it maps the natural locality of physics (a point is influenced mainly by its near neighbours) onto the locality the hardware wants (talk mostly to nearby processors). Its central design problems are load balancing (cutting the domain so every rank has equal work, tricky when the mesh is non-uniform or the physics is concentrated in one region) and minimising the surface-to-volume ratio of the partition (compact, cube-like subdomains communicate less than long thin slabs). The same word also names a family of solver and preconditioner methods (such as Schwarz methods) that solve each subdomain's piece and iterate to stitch the global solution together — decomposition as a numerical method, not just a way to spread work.

A 1000-by-1000 heat-equation grid split across 100 ranks gives each a 100-by-100 block. Per step a rank updates 10000 interior cells but exchanges only its four edges — about 4*100 = 400 boundary values — with its four neighbours. The communication (400 numbers) is tiny next to the computation (10000 cells), and that ratio only improves as the blocks grow, which is why the method scales.

Each rank owns a block, exchanges only thin halos with neighbours — surface communicates, volume computes.

The hard part is rarely the cutting but the balancing: if one subdomain has more work (a finer mesh, an active reaction zone) every other rank waits at the next halo exchange, so the slowest rank sets the pace. An imbalanced decomposition can scale far worse than the flop count suggests, no matter how fast the network.

Also called
domain partitioningsubdomain method區域分解子領域法