:orphan:
# DMGlobalToLocalEnd
Ends updating local vectors from global vector
## Synopsis
```
#include "petscdm.h"
#include "petscdmlabel.h"
#include "petscds.h"
PetscErrorCode DMGlobalToLocalEnd(DM dm, Vec g, InsertMode mode, Vec l)
```
Neighbor-wise Collective
## Input Parameters
- ***dm -*** the `DM` object
- ***g -*** the global vector
- ***mode -*** `INSERT_VALUES` or `ADD_VALUES`
- ***l -*** the local vector
## Note
See `DMGlobalToLocalBegin()` for details.
## See Also
[](ch_dmbase), `DM`, `DMCoarsen()`, `DMDestroy()`, `DMView()`, `DMCreateGlobalVector()`, `DMCreateInterpolation()`, `DMGlobalToLocal()`, `DMLocalToGlobalBegin()`, `DMLocalToGlobal()`, `DMLocalToGlobalBegin()`, `DMLocalToGlobalEnd()`
## Level
intermediate
## Location
src/dm/interface/dm.c
## Examples
src/dm/tutorials/ex1.c
src/dm/tutorials/ex3.c
src/dm/tutorials/ex5.c
src/dm/tutorials/ex6.c
src/dm/tutorials/ex7.c
src/dm/tutorials/ex9.c
src/ksp/ksp/tutorials/ex14f.F90
src/ksp/ksp/tutorials/ex42.c
src/ksp/ksp/tutorials/ex43.c
src/ksp/ksp/tutorials/ex49.c
src/ksp/ksp/tutorials/ex70.c
## Implementations
DMGlobalToLocalEnd_Composite in src/dm/impls/composite/pack.c
DMGlobalToLocalEnd_DA in src/dm/impls/da/dagtol.c
DMGlobalToLocalEnd_Moab in src/dm/impls/moab/dmmbvec.cxx
DMGlobalToLocalEnd_Network in src/dm/impls/network/network.c
DMGlobalToLocalEnd_Redundant in src/dm/impls/redundant/dmredundant.c
DMGlobalToLocalEnd_Sliced in src/dm/impls/sliced/sliced.c
DMGlobalToLocalEnd_Stag in src/dm/impls/stag/stag.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c)
[Index of all DM routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)