# DACreateLocalVector

Creates a Seq PETSc vector that may be used with the DAXXX routines.

### Synopsis

    #include "petscda.h"
    PetscErrorCode PETSCDM_DLLEXPORT DACreateLocalVector(DA da,Vec* g)

Not Collective

### Input Parameter

da -the distributed array

### Output Parameter

g -the local vector

### Note

The output parameter, g, is a regular PETSc vector that should be destroyed with a call to VecDestroy() when usage is finished.

### Keywords

distributed array, create, local, vector

### See Also

DACreateGlobalVector(), VecDuplicate(), VecDuplicateVecs(),
DACreate1d(), DACreate2d(), DACreate3d(), DAGlobalToLocalBegin(), DAGlobalToLocalEnd(), DALocalToGlobal(), DAGetLocalVector(), DARestoreLocalVector()

Level:beginner
Location: src/dm/da/src/dalocal.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex14f.F.html
src/snes/examples/tutorials/ex30.c.html
src/ts/examples/tutorials/ex2.c.html
src/ts/examples/tutorials/ex4.c.html
src/ts/examples/tutorials/ex2f.F.html
src/dm/da/examples/tutorials/ex1.c.html
src/dm/da/examples/tutorials/ex5.c.html