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

# MatGetGhosts

Get the global index of all ghost nodes defined by the sparse matrix

### Synopsis

    #include "petscmat.h"
    PetscErrorCode MatGetGhosts(Mat mat,PetscInt *nghosts,const PetscInt *ghosts[])

Collective on Mat Many br

### Input Parameter

mat -the matrix Many br

### Output Parameters

| nghosts | - number of ghosts (note for BAIJ matrices there is one ghost for each block) Many br
| ghosts | - the global indices of the ghost points Many br

Notes: the nghosts and ghosts are suitable to pass into VecCreateGhost() Many br

Many br

Level:advanced
Location:src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages