VecPlaceArray
Allows one to replace the array in a vector with an array provided by the user. This is useful to avoid copying an array into a vector. FOR EXPERTS ONLY!
Synopsis
#include "petscvec.h"
int VecPlaceArray(Vec vec,const Scalar array[])
Not Collective
Input Parameters
| vec | - the vector
|
| array | - the array
|
Notes
You can back up the original array by calling VecGetArray() followed
by VecRestoreArray() and stashing the value somewhere. Then when
finished using the vector, call VecPlaceArray() with that stashed value;
otherwise, you may lose access to the original array.
See Also
VecGetArray(), VecRestoreArray(), VecReplaceArray()
Keywords
vec, place, array
Level:developer
Location:src/vec/interface/vector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages
Examples
src/sles/examples/tutorials/ex13.c
src/sles/examples/tutorials/ex13f90.F