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

# VecMPISetGhost

Sets the ghost points for an MPI ghost vector

### Synopsis

    #include "petscvec.h"
    PetscErrorCode  VecMPISetGhost(Vec vv,PetscInt nghost,const PetscInt ghosts[])

Collective on Vec Many br

### Input Parameters

| vv | - the MPI vector Many br
| nghost | - number of local ghost points Many br
| ghosts | - global indices of ghost points, these do not need to be in increasing order (sorted) Many br

### Notes

Use VecGhostGetLocalForm() to access the local, ghosted representation Many brof the vector. Many br

This also automatically sets the ISLocalToGlobalMapping() for this vector. Many br

You must call this AFTER you have set the type of the vector (with VecSetType()) and the size (with VecSetSizes()). Many br

Many br

### See Also

VecCreateSeq(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateMPI(),
VecGhostGetLocalForm(), VecGhostRestoreLocalForm(), VecGhostUpdateBegin(), Many brVecCreateGhostWithArray(), VecCreateMPIWithArray(), VecGhostUpdateEnd(), Many brVecCreateGhostBlock(), VecCreateGhostBlockWithArray() Many br

Level:advanced
Location:src/vec/vec/impls/mpi/pbvec.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/vec/vec/examples/tutorials/ex9.c.html