# VecPackCreateGlobalVector

Creates a vector of the correct size to be gathered into by the packer.

### Synopsis

    #include "petscda.h"
    #include "petscmat.h"
    PetscErrorCode PETSCDM_DLLEXPORT VecPackCreateGlobalVector(VecPack packer,Vec *gvec)

Collective on VecPack

### Input Parameter

packer -the packer object

### Output Parameters

gvec -the global vector

Notes: Once this has been created you cannot add additional arrays or vectors to be packed.

### See Also

VecPackDestroy(), VecPackAddArray(), VecPackAddDA(), VecPackScatter(),
VecPackGather(), VecPackCreate(), VecPackGetGlobalIndices(), VecPackGetAccess(), VecPackGetLocalVectors(), VecPackRestoreLocalVectors()

Level:advanced
Location:src/dm/da/utils/pack.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex21.c.html