mpi4py.MPI.Cartcomm

class mpi4py.MPI.Cartcomm

Bases: Topocomm

Cartesian topology intracommunicator.

static __new__(cls, comm=None)
Parameters:

comm (Cartcomm | None)

Return type:

Self

Methods Summary

Get_cart_rank(coords)

Translate logical coordinates to ranks.

Get_coords(rank)

Translate ranks to logical coordinates.

Get_dim()

Return number of dimensions.

Get_topo()

Return information on the cartesian topology.

Shift(direction, disp)

Return a process ranks for data shifting with Sendrecv.

Sub(remain_dims)

Return a lower-dimensional Cartesian topology.

Attributes Summary

coords

Coordinates.

dim

Number of dimensions.

dims

Dimensions.

ndim

Number of dimensions.

periods

Periodicity.

topo

Topology information.

Methods Documentation

Get_cart_rank(coords)

Translate logical coordinates to ranks.

Parameters:

coords (Sequence[int])

Return type:

int

Get_coords(rank)

Translate ranks to logical coordinates.

Parameters:

rank (int)

Return type:

list[int]

Get_dim()

Return number of dimensions.

Return type:

int

Get_topo()

Return information on the cartesian topology.

Return type:

tuple[list[int], list[int], list[int]]

Shift(direction, disp)

Return a process ranks for data shifting with Sendrecv.

Parameters:
Return type:

tuple[int, int]

Sub(remain_dims)

Return a lower-dimensional Cartesian topology.

Parameters:

remain_dims (Sequence[bool])

Return type:

Cartcomm

Attributes Documentation

coords

Coordinates.

dim

Number of dimensions.

dims

Dimensions.

ndim

Number of dimensions.

periods

Periodicity.

topo

Topology information.