petsc-3.12.4 2020-02-04
Report Typos and Errors

# DMDAVecRestoreArrayRead

Restores a multiple dimension array obtained with DMDAVecGetArrayRead()

### Synopsis

    #include "petscdmda.h"
    PetscErrorCode  DMDAVecRestoreArrayRead(DM da,Vec vec,void *array)

Not collective

### Input Parameter

| da | - the distributed array
| vec | - the vector, either a vector the same size as one obtained with DMCreateGlobalVector() or DMCreateLocalVector()
| array | - the array, non-NULL pointer is zeroed

### Fortran Notes

From Fortran use DMDAVecRestoreArrayReadF90()

### See Also

DMDAGetGhostCorners(), DMDAGetCorners(), VecGetArray(), VecRestoreArray(), DMDAVecGetArrayRead(),
DMDAVecGetArray(), DMDAVecRestoreArray(), DMDAVecGetArrayWrite(), DMDAVecRestoreArrayWrite(), DMStagVecRestoreArrayRead()

### Level

intermediate

### Location

src/dm/impls/da/dagetarray.c

### Examples

src/dm/examples/tutorials/ex3.c.html
src/ksp/ksp/examples/tutorials/ex43.c.html
src/snes/examples/tutorials/ex3.c.html
src/snes/examples/tutorials/ex14.c.html
src/snes/examples/tutorials/ex15.c.html
src/snes/examples/tutorials/ex19.c.html
src/snes/examples/tutorials/ex78.c.html
src/ts/examples/tutorials/ex7.c.html
src/ts/examples/tutorials/ex9.c.html
src/ts/examples/tutorials/ex10.c.html
src/ts/examples/tutorials/ex13.c.html
Index of all DMDA routines
Table of Contents for all manual pages
Index of all manual pages