petsc-3.13.6 2020-09-29
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 or KSP. Thus must be
cast with a (PetscObject), for example,
SETERRQ(PetscObjectComm((PetscObject)mat,...);
Output Parameter
comm -the MPI communicator or MPI_COMM_NULL if object is not valid
Notes
Never use this in the form
comm = PetscObjectComm((PetscObject)obj);
instead use PetscObjectGetComm()
See Also
PetscObjectGetComm()
Level
advanced
Location
src/sys/objects/gcomm.c
Examples
src/vec/vec/utils/tagger/tutorials/ex1.c.html
src/vec/is/sf/tutorials/ex1.c.html
src/mat/tutorials/ex8.c.html
src/dm/impls/plex/tutorials/ex5.c.html
src/dm/impls/plex/tutorials/ex6.c.html
src/dm/impls/plex/tutorials/ex7.c.html
src/dm/field/tutorials/ex1.c.html
src/ksp/ksp/tutorials/ex49.c.html
src/ksp/ksp/tutorials/ex59.c.html
src/ksp/ksp/tutorials/ex65.c.html
src/ksp/ksp/tutorials/ex73.c.html
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages