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

VecCreateGhostBlockWithArray

Creates a parallel vector with ghost padding on each processor; the caller allocates the array space. Indices in the ghost region are based on blocks.

Synopsis

#include "petscvec.h"   
PetscErrorCode  VecCreateGhostBlockWithArray(MPI_Comm comm,PetscInt bs,PetscInt n,PetscInt N,PetscInt nghost,const PetscInt ghosts[],const PetscScalar array[],Vec *vv)
Collective on MPI_Comm Many br

Input Parameters

comm - the MPI communicator to use Many br
bs - block size Many br
n - local vector length Many br
N - global vector length (or PETSC_DECIDE to have calculated if n is given) Many br
nghost - number of local ghost blocks Many br
ghosts - global indices of ghost blocks (or NULL if not needed), counts are by block not by index, these do not need to be in increasing order (sorted) Many br
array - the space to store the vector values (as long as n + nghost*bs) Many br

Output Parameter

vv -the global vector representation (without ghost points as part of vector) Many br

Notes

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

n is the local vector size (total local size not the number of blocks) while nghost Many bris the number of blocks in the ghost portion, i.e. the number of elements in the ghost Many brportion is bs*nghost Many br

Many br

See Also

VecCreate(), VecGhostGetLocalForm(), VecGhostRestoreLocalForm(),
VecCreateGhost(), VecCreateSeqWithArray(), VecCreateMPIWithArray(), Many brVecCreateGhostWithArray(), VecCreateGhostBlock() 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/ex14f.F.html