DMStagStencilToIndexLocal#
Convert an array of DMStagStencil objects to an array of indices into a local vector.
Synopsis#
PetscErrorCode DMStagStencilToIndexLocal(DM dm, PetscInt dim, PetscInt n, const DMStagStencil *pos, PetscInt *ix)
Not Collective
Input Parameters#
dm - the
DMSTAGobjectdim - the dimension of the
DMSTAGobjectn - the number of
DMStagStencilobjectspos - an array of
nDMStagStencilobjects
Output Parameter#
ix - output array of
nindices
Notes#
The DMStagStencil objects in pos use global element indices.
The .c fields in pos must always be set (even if to 0).
Developer Notes#
This is a “hot” function, and accepts the dimension redundantly to avoid having to perform any error checking inside the function.
See Also#
DMSTAG: Staggered, Structured Grids in PETSc, DMSTAG, DMStagStencilLocation, DMStagStencil, DMGetLocalVector, DMCreateLocalVector
Level#
developer
Location#
src/dm/impls/stag/stagstencil.c
Index of all DMStag routines
Table of Contents for all manual pages
Index of all manual pages