DAVecGetArray

Returns an multiple dimension array that shares data with the underlying vector and is indexed using the global dimensions.

Synopsis

#include "petscda.h"   
int DAVecGetArray(DA da,Vec vec,void **array)
Not Collective

Input Parameter

da - the distributed array
vec - the vector, either a vector the same size as one obtained with DACreateGlobalVector() or DACreateLocalVector()

Output Parameter

array -the array

Notes

Call DAVecRestoreArray() once you have finished accessing the vector entries.

Keywords

distributed array, get, corners, nodes, local indices, coordinates

See Also

DAGetGhostCorners(), DAGetCorners(), VecGetArray(), VecRestoreArray(), DAVecRestoreArray()

Level:intermediate
Location:
src/dm/da/src/dagetarray.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/snes/examples/tutorials/ex5d.c
src/snes/examples/tutorials/ex5m.c