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#
obj - any PETSc object, for example a
Vec
,Mat
orKSP
. It must be cast with a (PetscObject
), for example,PetscObjectComm
((PetscObject
)mat,…);
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#
Level#
advanced
Location#
Examples#
src/dm/impls/plex/tutorials/ex11.c
src/mat/tutorials/ex8.c
src/snes/tutorials/ex36.c
src/dm/impls/stag/tutorials/ex4.c
src/snes/tutorials/ex17.c
src/ksp/ksp/tutorials/ex73.c
src/ksp/ksp/tutorials/ex65.c
src/snes/tutorials/ex15.c
src/snes/tutorials/ex24.c
src/dm/impls/stag/tutorials/ex6.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages