VecRestoreArray2d

Restores a vector after VecGetArray2d() has been called.

Synopsis

#include "vec.h" 
int VecRestoreArray2d(Vec x,int m,int n,Scalar **a[])
Not Collective

Input Parameters

x - the vector
m - first dimension of two dimensional array
n - second dimension of the two dimensional array
a - location of pointer to array obtained from VecGetArray2d()

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.

Keywords

vector, restore, array

See Also

VecGetArray(), VecRestoreArray(), VecRestoreArrays(), VecRestoreArrayF90(), VecPlaceArray(),
VecGetArray2d()

Examples

src/snes/examples/tutorials/ex5d.c

Level:beginner
Location:src/vec/interface/vector.c
Vector Index
Table of Contents