:orphan: # DMStagStencil data structure representing a degree of freedom on a `DMSTAG` grid ## Synopsis ``` typedef struct { DMStagStencilLocation loc; PetscInt i, j, k, c; } DMStagStencil; ``` Data structure (C struct), analogous to describing a degree of freedom associated with a `DMSTAG` object, in terms of a global element index in each of up to three directions, a "location" as defined by `DMStagStencilLocation`, and a component number. Primarily for use with `DMStagMatSetValuesStencil()` (compare with use of `MatStencil` with `MatSetValuesStencil()`). ## Note The component (c) field must always be set, even if there is a single component at a given location (in which case c should be set to 0). ## See Also [](ch_stag), `DMSTAG`, `DMStagMatSetValuesStencil()`, `DMStagVecSetValuesStencil()`, `DMStagStencilLocation`, `DMStagSetStencilWidth()`, `DMStagSetStencilType()`, `DMStagVecGetValuesStencil()`, `DMStagStencilLocation` ## Level beginner ## Location include/petscdmstag.h --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscdmstag.h) [Index of all DMStag routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)