petsc4py.PETSc.Comm#

class petsc4py.PETSc.Comm#

Bases: object

Communicator object.

Predefined instances:

COMM_NULL

The null (or invalid) communicator.

COMM_SELF

The self communicator.

COMM_WORLD

The world communicator.

Methods Summary

barrier()

Barrier synchronization.

destroy()

Destroy the communicator.

duplicate()

Duplicate the communicator.

getRank()

Return the rank of the calling processes in the communicator.

getSize()

Return the number of processes in the communicator.

tompi4py()

Convert communicator to mpi4py.

Attributes Summary

fortran

Fortran handle.

rank

Communicator rank.

size

Communicator size.

Methods Documentation

barrier()#

Barrier synchronization.

Collective.

Source code at petsc4py/PETSc/Comm.pyx:123

Return type:

None

destroy()#

Destroy the communicator.

Collective.

See also

PetscCommDestroy

Source code at petsc4py/PETSc/Comm.pyx:61

Return type:

None

duplicate()#

Duplicate the communicator.

Collective.

Source code at petsc4py/PETSc/Comm.pyx:79

Return type:

Self

getRank()#

Return the rank of the calling processes in the communicator.

Not collective.

Source code at petsc4py/PETSc/Comm.pyx:111

Return type:

int

getSize()#

Return the number of processes in the communicator.

Not collective.

Source code at petsc4py/PETSc/Comm.pyx:99

Return type:

int

tompi4py()#

Convert communicator to mpi4py.

Not collective.

Source code at petsc4py/PETSc/Comm.pyx:155

Return type:

Intracomm

Attributes Documentation

fortran#

Fortran handle.

Source code at petsc4py/PETSc/Comm.pyx:147

rank#

Communicator rank.

Source code at petsc4py/PETSc/Comm.pyx:140

size#

Communicator size.

Source code at petsc4py/PETSc/Comm.pyx:135