:orphan:
# VecRestoreArray4dRead
Restores a vector after `VecGetArray4d()` has been called. 
## Synopsis
```
#include "petscvec.h"   
PetscErrorCode VecRestoreArray4dRead(Vec x, PetscInt m, PetscInt n, PetscInt p, PetscInt q, PetscInt mstart, PetscInt nstart, PetscInt pstart, PetscInt qstart, PetscScalar ****a[])
```
Logically Collective


## Input Parameters

- ***x -*** the vector
- ***m -*** first dimension of four dimensional array
- ***n -*** second dimension of the four dimensional array
- ***p -*** third dimension of the four dimensional array
- ***q -*** fourth dimension of the four dimensional array
- ***mstart -*** first index you will use in first coordinate direction (often 0)
- ***nstart -*** first index in the second coordinate direction (often 0)
- ***pstart -*** first index in the third coordinate direction (often 0)
- ***qstart -*** first index in the fourth coordinate direction (often 0)
- ***a -*** location of pointer to array obtained from `VecGetArray4dRead()`





## Notes
For regular PETSc vectors this routine does not involve any copies. For
any special vectors that do not store local vector data in a contiguous
array, this routine will copy the data back into the underlying
vector data structure from the array obtained with `VecGetArray()`.

This routine actually zeros out the `a` pointer.


## See Also
 [](ch_vectors), `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecRestoreArrays()`, `VecRestoreArrayF90()`, `VecPlaceArray()`,
`VecGetArray2d()`, `VecGetArray3d()`, `VecRestoreArray3d()`, `DMDAVecGetArray()`, `DMDAVecRestoreArray()`
`VecGetArray1d()`, `VecRestoreArray1d()`, `VecGetArray4d()`, `VecRestoreArray4d()`, `VecGet`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/vec/interface/rvector.c.html#VecRestoreArray4dRead">src/vec/vec/interface/rvector.c</A>


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


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