PetscObjectGetComm#
Gets the MPI communicator for any PetscObject
regardless of the type.
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscObjectGetComm(PetscObject obj, MPI_Comm *comm)
Not Collective
Input Parameter#
obj - any PETSc object, for example a
Vec
,Mat
orKSP
. It must be cast with a (PetscObject
), for example,PetscObjectGetComm
((PetscObject
)mat,&comm);
Output Parameter#
comm - the MPI communicator
See Also#
Level#
advanced
Location#
Examples#
src/snes/tutorials/ex7.c
src/tao/tutorials/ex2.c
src/dm/tutorials/ex15.c
src/snes/tutorials/ex5.c
src/snes/tutorials/ex27.c
src/tao/constrained/tutorials/ex1.c
src/tao/tutorials/ex1.c
src/snes/tutorials/ex71.c
src/snes/tutorials/ex63.c
src/dm/impls/plex/tutorials/ex11.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages