#include "petscsys.h" PetscErrorCode PetscObjectGetComm(PetscObject obj,MPI_Comm *comm)Not Collective
obj | - any PETSc object, for example a Vec, Mat or KSP. Thus must be cast with a (PetscObject), for example, PetscObjectGetComm((PetscObject)mat,&comm); |
comm | - the MPI communicator |