DAGetGlobalIndices
Returns the global node number of all local nodes, including ghost nodes.
Synopsis
int DAGetGlobalIndices(DA da, int *n,int **idx)
Not Collective
Input Parameter
da -the distributed array
Output Parameters
n | - the number of local elements, including ghost nodes (or PETSC_NULL)
|
idx | - the global indices
|
Note
For DA_STENCIL_STAR stencils the inactive corner ghost nodes are also included
in the list of local indices (even though those nodes are not updated
during calls to DAXXXToXXX().
Essentially the same data is returned in the form of a local-to-global mapping
with the routine DAGetISLocalToGlobalMapping();
Fortran Note
This routine is used differently from Fortran
DA da
integer da_array(1)
PetscOffset i_da
integer ierr
call DAGetGlobalIndices(da,da_array,i_da,ierr)
C Access first local entry in list
value = da_array(i_da + 1)
See the Fortran chapter of the users manual for details
Keywords
distributed array, get, global, indices, local-to-global
See Also
DACreate2d(), DAGetGhostCorners(), DAGetCorners(), DALocalToGlobal()
DAGlobalToLocal(), DALocalToLocal(), DAGetAO(), DAGetGlobalIndicesF90()
DAGetISLocalToGlobalMapping()
Examples
src/sles/examples/tutorials/ex14f.F
src/sles/examples/tutorials/ex14.c
src/snes/examples/tutorials/ex12.c
Level:intermediate
Location:src/dm/da/src/daindex.c
DA Index
Table of Contents