blocks#

class BlockDecomposition(nProcs, gridSizes, algo='Hybrid', gRank=None, order='C')[source]#

Bases: object

Class decomposing a cartesian space domain (1D to 3D) into a given number of processors.

Parameters:
  • nProcs (int) – Total number of processors for space block decomposition.

  • gridSizes (list[int]) – Number of grid points in each dimension

  • algo (str, optional) –

    Algorithm used for the block decomposition :

    The default is “Hybrid”.

  • gRank (int, optional) – If provided, the global rank that will determine the local block distribution. Default is None.

  • order (str, optional) – The order used when computing the rank block distribution. Default is C.

property localBounds[source]#

Bounds of the block of gRank. The points left over by an even split go one each to the first blocks.

Returns:

  • iLocList (list[int]) – Global index of the first local point in each dimension.

  • nLocList (list[int]) – Number of local points in each dimension.

property ranks[source]#

Coordinates of the block of gRank in the cartesian grid of blocks, which uses order.

Returns:

list[int] – Block index of gRank in each dimension.