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.

fromint(arg)

Translate an integer handle to a communicator.

getRank()

Return the rank of the calling processes in the communicator.

getSize()

Return the number of processes in the communicator.

toint()

Translate the communicator to an integer handle.

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

classmethod fromint(arg)#

Translate an integer handle to a communicator.

Not collective.

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

Parameters:

arg (int)

Return type:

Comm

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

toint()#

Translate the communicator to an integer handle.

Not collective.

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

Return type:

int

tompi4py()#

Convert communicator to mpi4py.

Not collective.

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

Return type:

Intracomm

Attributes Documentation

fortran#

Fortran handle.

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

rank#

Communicator rank.

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

size#

Communicator size.

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