VecGetArray2d
Returns a pointer to a 2d contiguous array that contains this processor's portion of the vector data. You MUST call VecRestoreArray2d() when you no longer need access to the array.
Synopsis
#include "vec.h"
int VecGetArray2d(Vec x,int m,int n,Scalar **a[])
Not Collective
Input Parameter
| x | - the vector
|
| m | - first dimension of two dimensional array
|
| n | - second dimension of two dimensional array
|
Output Parameter
a -location to put pointer to the array
For standard PETSc vectors this is an inexpensive call; it does not copy the vector values.
Keywords
vector, get, array
See Also
VecGetArray(), VecRestoreArray(), VecGetArrays(), VecGetArrayF90(), VecPlaceArray(),
VecRestoreArray2d()
Examples
src/snes/examples/tutorials/ex5d.c
Level:beginner
Location:src/vec/interface/vector.c
Vector Index
Table of Contents