VecGetArray
Returns a pointer to vector data. For default PETSc vectors, VecGetArray() returns a pointer to the local data array. Otherwise, this routine is implementation dependent. You MUST call VecRestoreArray() when you no longer need access to the array.
Synopsis
int VecGetArray(Vec x,Scalar **a)
Not
Collective
Input Parameter
x -the vector
Output Parameter
a -location to put pointer to the array
Fortran Note
The Fortran interface is slightly different from that given below.
See the Fortran chapter of the users manual
andpetsc/src/vec/examples for details.
Keywords
vector, get, array
See Also
VecRestoreArray(), VecGetArrays(), VecGetArrayF90(), VecPlaceArray()
Examples
src/sles/examples/tutorials/ex13f.F
src/sles/examples/tutorials/ex13.c
src/vec/examples/tutorials/ex4f.F
Location: src/vec/interface/vector.c
Vector Index
Table of Contents