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#

DMSTAG: Staggered, Structured Grid, DMSTAG, DMDA, DMStagMatSetValuesStencil(), DMStagVecSetValuesStencil(), DMStagStencilLocation, DMStagSetStencilWidth(), DMStagSetStencilType(), DMStagVecGetValuesStencil(), DMStagStencilLocation

Level#

beginner

Location#

include/petscdmstag.h

Examples#

src/dm/impls/stag/tutorials/ex6.c
src/dm/impls/stag/tutorials/ex1.c
src/dm/impls/stag/tutorials/ex3.c
src/dm/impls/stag/tutorials/ex4.c
src/dm/impls/stag/tutorials/ex2.c
src/dm/impls/stag/tutorials/ex8.c


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