Decomposition

FlowGeometries.Decomposition.Block — Type
Block

One process's share of a split grid: grid, a StructuredGrid of its cells and halos; core, the same cells without halos; interior, the local indices of its own cells in grid; ranges, their indices in the whole grid; and execution, the backend its loops run under.

source
FlowGeometries.Decomposition._block — Method
_block(grid, ranges, halo, execution) -> Block

The block of grid holding cells ranges with halo cells each side of every direction that has one. Coordinates, measure and mask are the grid's own values at those cells. Every direction of a block is bounded: across a periodic seam its halo continues the coordinate one period on. A block's type follows the grid's type alone, whichever directions are split.

source
FlowGeometries.Decomposition.distribute — Function
distribute(split, A) -> AbstractSplitField

The field on split holding the whole array A, of split's global size and any trailing batch axes, halos included. Under MPI every rank passes the same A; under Distributed the caller does, and each worker is sent its own block.

source
FlowGeometries.Decomposition.exchange_halo! — Function
exchange_halo!(field[, dim]) -> field

Fill every halo cell of field from the block that owns it: along every split direction, or along dim alone. Directions are exchanged one after another, each slab spanning the halos of the directions before it, so the corner cells arrive too.

source
FlowGeometries.Decomposition.gather — Function
gather(field) -> Array or nothing

The field's cells, halos left out, as one array of the global size: on rank 0 under MPI (nothing elsewhere), on the caller under Distributed.

source
FlowGeometries.Decomposition.map_blocks — Function
map_blocks(f, split, fields...) -> Vector

f(block, arrays...) on every process, one value per block, collected in block order: on every rank under MPI, on the caller under Distributed.

source
FlowGeometries.Decomposition.redistribute! — Function
redistribute!(dst, src) -> dst

Copy src into dst, a field on another split of the same grid over the same processes: the distributed transpose. Between rank splits this needs PencilArrays loaded. dst's halos hold no data until exchanged.

source
FlowGeometries.Decomposition.split_grid — Function
split_grid(grid, backend; dims = (ndims(grid),), blocks = nothing, halo = 2) -> AbstractSplitGrid
split_grid(split; dims) -> AbstractSplitGrid

grid split into blocks along the directions dims, blocks[k] of them along dims[k], one block per rank of an MPIBackend (using MPI) or per worker of a DistributedBackend (using Distributed, FlowGeometries loaded on every worker). blocks = nothing divides the ranks over dims as MPI.Dims_create does, or the workers likewise. Block p of P along a direction of n cells holds cells (n(p-1))÷P + 1 : (np)÷P, the split PencilArrays makes.

Each block carries halo cells of its neighbours' each side of a split direction, wrapping across a periodic seam and stopping at a bounded end, so a stencil of up to halo nodes along that direction sees every sample it sees on the whole grid. A block holds at least halo cells.

The second form splits the same grid along other directions over the same processes, the pair redistribute! moves fields between.

source
FlowGeometries.Operators.derivative! — Method
Operators.derivative!(out::AbstractSplitField, field::AbstractSplitField, dim; order, nodes, masked,
                      policy) -> out

Operators.derivative! on each block of a split field, after exchanging field's halo along dim: every block's own cells take the values the whole grid gives them, to rounding where a window is rebuilt from coordinates, which along a periodic uniform axis a block holds as a slice of its own. out's halo holds no data.

source