PETSc version 3.17.5
Fix/Edit manual page

DMStagGetProductCoordinateLocationSlot

get slot for use with local product coordinate arrays

Synopsis

PETSC_EXTERN PetscErrorCode DMStagGetProductCoordinateLocationSlot(DM dm,DMStagStencilLocation loc,PetscInt *slot)
Not Collective

High-level helper function to get slot indices for 1D coordinate DMs, for use with DMStagGetProductCoordinateArrays() and related functions.

Input Parameters

dm - the DMStag object
loc - the grid location

Output Parameter

slot - the index to use in local arrays

Notes

For loc, one should use DMSTAG_LEFT, DMSTAG_ELEMENT, or DMSTAG_RIGHT for "previous", "center" and "next" locations, respectively, in each dimension. One can equivalently use DMSTAG_DOWN or DMSTAG_BACK in place of DMSTAG_LEFT, and DMSTAG_UP or DMSTACK_FRONT in place of DMSTAG_RIGHT;

This function checks that the coordinates are actually set up so that using the slots from any of the 1D coordinate sub-DMs are valid for all the 1D coordinate sub-DMs.

See Also

DMSTAG, DMPRODUCT, DMStagGetProductCoordinateArrays(), DMStagGetProductCoordinateArraysRead(), DMStagSetUniformCoordinates()

Level

intermediate

Location

src/dm/impls/stag/stagutils.c

Examples

src/dm/impls/stag/tutorials/ex2.c.html
src/dm/impls/stag/tutorials/ex6.c.html

Index of all DMSTAG routines
Table of Contents for all manual pages
Index of all manual pages