PetscObjectComm#

Gets the MPI communicator for any PetscObject regardless of the type.

Synopsis#

#include "petscsys.h"    
MPI_Comm PetscObjectComm(PetscObject obj)

Not Collective

Input Parameter#

Note#

Returns the MPI communicator or MPI_COMM_NULL if obj is not valid.

This is one of the rare PETSc routines that does not return an error code. Use PetscObjectGetComm() when appropriate for error handling.

See Also#

PetscObject, PetscObjectGetComm()

Level#

advanced

Location#

src/sys/objects/gcomm.c

Examples#

src/ts/tutorials/ex45.c
src/ts/tutorials/ex76.c
src/ts/tutorials/ex14.c
src/vec/is/sf/tutorials/ex1.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex30.c
src/ts/tutorials/ex53.c
src/ts/tutorials/ex11_sa.c
src/ts/tutorials/ex77.c
src/ksp/ksp/tutorials/ex73.c


Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages