DMStagVecSetValuesStencil#

Set Vec values using global grid indexing

Synopsis#

Not Collective

Input Parameters#

Notes#

The vector is expected to be a global vector compatible with the DM (usually obtained by DMGetGlobalVector() or DMCreateGlobalVector()).

This approach is not as efficient as setting values directly with DMStagVecGetArray(), which is recommended for matrix-free operators. For assembling systems, where overhead may be less important than convenience, this routine could be helpful in assembling a righthand side and a matrix (using DMStagMatSetValuesStencil()).

See Also#

DMSTAG: Staggered, Structured Grid, DMSTAG, Vec, DMStagStencil, DMStagStencilLocation, DMStagVecGetValuesStencil(), DMStagMatSetValuesStencil(), DMCreateGlobalVector(), DMGetLocalVector(), DMStagVecGetArray()

Level#

advanced

Location#

src/dm/impls/stag/stagstencil.c

Examples#

src/dm/impls/stag/tutorials/ex8.c
src/dm/impls/stag/tutorials/ex2.c
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


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