# VecGhostRestoreLocalForm
Restores the local ghosted representation of a parallel vector obtained with VecGhostGetLocalForm(). 
## Synopsis
```
#include "petscvec.h"   
PetscErrorCode VecGhostRestoreLocalForm(Vec g, Vec *l)
```
Logically Collective


## Input Parameters

- ***g -*** the global vector
- ***l -*** the local (ghosted) representation



## Notes
This routine does not actually update the ghost values, but rather it
returns a sequential vector that includes the locations for the ghost values
and their current values.




## See Also
 `VecCreateGhost()`, `VecGhostGetLocalForm()`, `VecCreateGhostWithArray()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/impls/mpi/commonmpvec.c.html#VecGhostRestoreLocalForm">src/vec/vec/impls/mpi/commonmpvec.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/tutorials/ex14f.F90.html">src/vec/vec/tutorials/ex14f.F90.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/tutorials/ex9.c.html">src/vec/vec/tutorials/ex9.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/tutorials/ex9f.F90.html">src/vec/vec/tutorials/ex9f.F90.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/vec/impls/mpi/commonmpvec.c)


[Index of all Vec routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
