#include "petscvec.h" PetscErrorCode VecCreateGhost(MPI_Comm comm,PetscInt n,PetscInt N,PetscInt nghost,const PetscInt ghosts[],Vec *vv)Collective on MPI_Comm
comm | - the MPI communicator to use | |
n | - local vector length | |
N | - global vector length (or PETSC_DECIDE to have calculated if n is given) | |
nghost | - number of local ghost points | |
ghosts | - global indices of ghost points, these do not need to be in increasing order (sorted) |
This also automatically sets the ISLocalToGlobalMapping() for this vector.