VecRestoreArrayRead — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# VecRestoreArrayRead

Restore array obtained with `VecGetArrayRead()`

## Synopsis

    #include "petscvec.h"
    PetscErrorCode VecRestoreArrayRead(Vec x, const PetscScalar *a[])

Not Collective

## Input Parameters

- x - the vector

- a - the array

## See Also

Vectors and Parallel Data, `Vec`, `VecGetArray()`, `VecRestoreArray()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`

## Level

beginner

## Location

src/vec/vec/interface/rvector.c

## Examples

src/dm/tutorials/ex22.c
src/dm/tutorials/swarm_ex3.c
src/ksp/ksp/tutorials/ex35.cxx
src/ksp/ksp/tutorials/ex73.c
src/dm/impls/plex/tutorials/ex6.c
src/dm/impls/plex/tutorials/ex8.c
src/ksp/ksp/tutorials/ex27.c
src/ksp/ksp/tutorials/ex36.cxx
src/dm/field/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex15.c

## Implementations

VecRestoreArrayRead_Nest() in src/vec/vec/impls/nest/vecnest.c

Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages