Decomposition
FlowGeometries.Decomposition.AbstractRankField — Type
AbstractRankField{T,N}A field on an AbstractRankSplit: each rank holds its block's local_array.
FlowGeometries.Decomposition.AbstractRankSplit — Type
AbstractRankSplit{N}A grid split over the ranks of an MPI communicator, one block per rank, every rank holding its own block on the Cartesian communicator cartesian_comm.
FlowGeometries.Decomposition.AbstractSplitField — Type
AbstractSplitField{T,N}A field on an AbstractSplitGrid, each process holding its block's cells, a halo along every split direction and any trailing batch axes. split_field and distribute build one.
FlowGeometries.Decomposition.AbstractSplitGrid — Type
AbstractSplitGrid{N}A structured grid of N directions split into blocks over processes: split_grid builds one.
FlowGeometries.Decomposition.AbstractWorkerField — Type
AbstractWorkerField{T,N}A field on an AbstractWorkerSplit, each worker holding its block's array.
FlowGeometries.Decomposition.AbstractWorkerSplit — Type
AbstractWorkerSplit{N}A grid split over Distributed workers, one block per worker, held on the worker; the caller holds a handle.
FlowGeometries.Decomposition.Block — Type
BlockOne 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.
FlowGeometries.Decomposition._block — Method
_block(grid, ranges, halo, execution) -> BlockThe 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.
FlowGeometries.Decomposition.block — Function
block(split::AbstractRankSplit) -> BlockThis rank's Block.
FlowGeometries.Decomposition.cartesian_comm — Function
cartesian_comm(split::AbstractRankSplit) -> MPI.CommThe Cartesian communicator the blocks lie on: block coordinates are rank coordinates, no rank reordered.
FlowGeometries.Decomposition.distribute — Function
distribute(split, A) -> AbstractSplitFieldThe 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.
FlowGeometries.Decomposition.exchange_halo! — Function
exchange_halo!(field[, dim]) -> fieldFill 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.
FlowGeometries.Decomposition.foreach_block — Function
foreach_block(f, split, fields...) -> nothingCall f(block, arrays...) on every process with its Block and each field's local array, halos and batch axes included.
FlowGeometries.Decomposition.gather — Function
gather(field) -> Array or nothingThe 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.
FlowGeometries.Decomposition.global_grid — Function
global_grid(split) -> StructuredGridThe grid split divides.
FlowGeometries.Decomposition.local_array — Function
local_array(field::AbstractRankField) -> AbstractArrayThis rank's array of field: its block's cells, halos and batch axes.
FlowGeometries.Decomposition.map_blocks — Function
map_blocks(f, split, fields...) -> Vectorf(block, arrays...) on every process, one value per block, collected in block order: on every rank under MPI, on the caller under Distributed.
FlowGeometries.Decomposition.pencil — Function
pencil(split::AbstractRankSplit) -> PencilArrays.PencilWith PencilArrays loaded: the Pencil holding split's blocks, on the same communicator.
FlowGeometries.Decomposition.pencil_array — Function
pencil_array(field::AbstractRankField) -> PencilArrays.PencilArrayWith PencilArrays loaded: this rank's own cells of field, halos left out, as a PencilArray on pencil(split_of(field)), a copy.
FlowGeometries.Decomposition.redistribute! — Function
redistribute!(dst, src) -> dstCopy 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.
FlowGeometries.Decomposition.split_dims — Function
split_dims(split) -> NTuple{M,Int}The directions split divides, in the order of its block layout's axes.
FlowGeometries.Decomposition.split_field — Function
split_field(split, T, batch...) -> AbstractSplitFieldAn uninitialised field of element type T on split, with trailing batch axes of lengths batch.
FlowGeometries.Decomposition.split_grid — Function
split_grid(grid, backend; dims = (ndims(grid),), blocks = nothing, halo = 2) -> AbstractSplitGrid
split_grid(split; dims) -> AbstractSplitGridgrid 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.
FlowGeometries.Decomposition.split_of — Function
split_of(field) -> AbstractSplitGridThe split grid field lives on.
FlowGeometries.Grids.integrate — Method
Grids.integrate(field::AbstractSplitField; active_only = true)Grids.integrate over every block's own cells, the blocks' integrals summed in block order: a number, or one per batch element.
FlowGeometries.Operators.apply_stencil! — Method
Operators.apply_stencil!(out::AbstractSplitField, field::AbstractSplitField, dim; order, nodes,
masked, policy) -> outOperators.apply_stencil! on each block of a split field, after exchanging field's halo along dim. out's halo holds no data.
FlowGeometries.Operators.derivative! — Method
Operators.derivative!(out::AbstractSplitField, field::AbstractSplitField, dim; order, nodes, masked,
policy) -> outOperators.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.