# DMDAVecRestoreArrayDOFWrite
Restores a multiple dimension array obtained with `DMDAVecGetArrayDOFWrite()` 
## Synopsis
```
#include "petscdmda.h"   
PetscErrorCode DMDAVecRestoreArrayDOFWrite(DM da, Vec vec, void *array)
```
Not Collective


## Input Parameters

- ***da -*** the distributed array
- ***vec -*** the vector, either a vector the same size as one obtained with
`DMCreateGlobalVector()` or `DMCreateLocalVector()`
- ***array -*** the array





## See Also
 `DM`, `DMDA`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecGetArray()`, `DMDAVecGetArrayDOF()`, `DMDAVecRestoreArrayDOF()`,
`DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`, `DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/da/dagetarray.c.html#DMDAVecRestoreArrayDOFWrite">src/dm/impls/da/dagetarray.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex34.c.html">src/ksp/ksp/tutorials/ex34.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/da/dagetarray.c)


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