# DAGlobalToLocalEnd

Maps values from the global vector to the local patch; the ghost points are included. Must be preceeded by DAGlobalToLocalBegin().

### Synopsis

    #include "petscda.h"
    PetscErrorCode PETSCDM_DLLEXPORT DAGlobalToLocalEnd(DA da,Vec g,InsertMode mode,Vec l)

Collective on DA

### Input Parameters

| da | - the distributed array context
| g | - the global vector
| mode | - one of INSERT_VALUES or ADD_VALUES

### Output Parameter

l -the local values

### Notes

The global and local vectors used here need not be the same as those obtained from DACreateGlobalVector() and DACreateLocalVector(), BUT they must have the same parallel data layout; they could, for example, be obtained with VecDuplicate() from the DA originating vectors.

### Keywords

distributed array, global to local, end

### See Also

DAGlobalToLocalBegin(), DALocalToGlobal(), DACreate2d(),
DALocalToLocalBegin(), DALocalToLocalEnd(), DALocalToGlobalBegin(), DALocalToGlobalEnd()

Level:beginner
Location:src/dm/da/src/dagtol.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/ex3.c.html
src/snes/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex14.c.html
src/snes/examples/tutorials/ex18.c.html
src/snes/examples/tutorials/ex20.c.html
src/snes/examples/tutorials/ex23.c.html
src/snes/examples/tutorials/ex25.c.html
src/snes/examples/tutorials/ex26.c.html
src/snes/examples/tutorials/ex30.c.html
src/snes/examples/tutorials/ex31.c.html