petsc-3.3-p7 2013-05-11

DMIGAVecGetArray

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

Synopsis

#include "petscdmiga.h"   
PetscErrorCode DMIGAVecGetArray(DM dm, Vec vec, void *array)
Not Collective

Input Parameters

dm - the IGA
vec - the vector, either a vector the same size as one obtained with DMCreateGlobalVector() or DMCreateLocalVector()

Output Parameter

array -the array

Notes

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

In C, the indexing is "backwards" from what expects: array[k][j][i] NOT array[i][j][k]!

If vec is a local vector (obtained with DMCreateLocalVector() etc) then they ghost point locations are accessable. If it is a global vector then the ghost points are not accessable. Of course with the local vector you will have had to do the appropriate DMLocalToGlobalBegin() and DMLocalToGlobalEnd() to have correct values in the ghost locations.

Keywords

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

See Also

DMIGAVecRestoreArray(), VecGetArray(), VecRestoreArray(), DMDAVecRestoreArray(), DMDAVecGetArray()

Level:intermediate
Location:
src/dm/impls/igaiga.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ts/examples/tutorials/ex18.c.html