:orphan: # DMDAVecRestoreArrayRead Restores a multiple dimension array obtained with `DMDAVecGetArrayRead()` ## Synopsis ``` #include "petscdmda.h" PetscErrorCode DMDAVecRestoreArrayRead(DM da, Vec vec, void *array) ``` Not Collective ## Input Parameters - ***da -*** the distributed array - ***vec -*** vector the same size as one obtained with `DMCreateGlobalVector()` or `DMCreateLocalVector()` - ***array -*** the `array` pointer is zeroed ## Fortran Note Use `DMDAVecRestoreArrayReadF90()` ## See Also `DM`, `DMDA`, `DMDAVecRestoreArrayReadF90()`, `DMDAGetGhostCorners()`, `DMDAGetCorners()`, `VecGetArray()`, `VecRestoreArray()`, `DMDAVecGetArrayRead()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`, `DMDAVecGetArrayWrite()`, `DMDAVecRestoreArrayWrite()`, `DMStagVecRestoreArrayRead()` ## Level intermediate ## Location src/dm/impls/da/dagetarray.c ## Examples src/dm/tutorials/ex2.c
src/dm/tutorials/ex3.c
src/ksp/ksp/tutorials/ex43.c
src/snes/tutorials/ex14.c
src/snes/tutorials/ex15.c
src/snes/tutorials/ex19.c
src/snes/tutorials/ex3.c
src/snes/tutorials/ex3k.kokkos.cxx
src/snes/tutorials/ex78.c
src/tao/unconstrained/tutorials/burgers_spectral.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.c
--- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)