VecRestoreArrayAndMemType — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# VecRestoreArrayAndMemType

Restores a vector after `VecGetArrayAndMemType()` has been called.

## Synopsis

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

Logically Collective; No Fortran Support

## Input Parameters

- x - the vector

- a - location of pointer to array obtained from `VecGetArrayAndMemType()`

## See Also

Vectors and Parallel Data, `Vec`, `VecGetArrayAndMemType()`, `VecGetArray()`, `VecRestoreArrayRead()`, `VecRestoreArrays()`, `VecPlaceArray()`, `VecRestoreArray2d()`, `VecGetArrayPair()`, `VecRestoreArrayPair()`

## Level

beginner

## Location

src/vec/vec/interface/rvector.c

## Implementations

VecRestoreArrayAndMemType_SeqKokkos() in src/vec/vec/impls/seq/kokkos/veckok.kokkos.cxx

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