petsc-3.7.1 2016-05-15
Report Typos and Errors

PetscObjectComm

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

Synopsis

#include "petscsys.h"    
MPI_Comm  PetscObjectComm(PetscObject obj)
Not Collective Many br

Input Parameter

obj -any PETSc object, for example a Vec, Mat or KSP. Thus must be Many brcast with a (PetscObject), for example, Many brSETERRQ(PetscObjectComm((PetscObject)mat,...); Many br

Output Parameter

comm -the MPI communicator or MPI_COMM_NULL if object is not valid Many br

Many br

Notes: Never use this in the form Many br

      comm = PetscObjectComm((PetscObject)obj); 
instead use PetscObjectGetComm() Many br

See Also

PetscObjectGetComm()

Level:advanced
Location:
src/sys/objects/gcomm.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/mat/examples/tutorials/ex8.c.html
src/ksp/ksp/examples/tutorials/ex49.c.html
src/ksp/ksp/examples/tutorials/ex65.c.html
src/snes/examples/tutorials/ex12.c.html
src/snes/examples/tutorials/ex15.c.html
src/snes/examples/tutorials/ex48.c.html
src/snes/examples/tutorials/ex62.c.html
src/snes/examples/tutorials/ex77.c.html
src/ts/examples/tutorials/ex9.c.html
src/ts/examples/tutorials/ex11.c.html
src/ts/examples/tutorials/ex14.c.html