Sets the ghost points for an MPI ghost vector


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

Input Parameters

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


Use VecGhostGetLocalForm() to access the local, ghosted representation of the vector.

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

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

Level: advanced

See Also

VecCreateSeq(), VecCreate(), VecDuplicate(), VecDuplicateVecs(), VecCreateMPI(),
VecGhostGetLocalForm(), VecGhostRestoreLocalForm(), VecGhostUpdateBegin(), VecCreateGhostWithArray(), VecCreateMPIWithArray(), VecGhostUpdateEnd(), VecCreateGhostBlock(), VecCreateGhostBlockWithArray()