:orphan: # DMStagRestrictSimple restricts data from a fine to a coarse `DMSTAG`, in the simplest way ## Synopsis ``` PetscErrorCode DMStagRestrictSimple(DM dmf, Vec xf, DM dmc, Vec xc) ``` Values on coarse cells are averages of all fine cells that they cover. Thus, values on vertices are injected, values on edges are averages of the underlying two fine edges, and and values on elements in d dimensions are averages of $2^d$ underlying elements. ## Input Parameters - ***dmf -*** fine `DM` - ***xf -*** data on fine `DM` - ***dmc -*** coarse `DM` ## Output Parameter - ***xc -*** data on coarse `DM` ## See Also [](ch_stag), `DMSTAG`, `DM`, `DMRestrict()`, `DMCoarsen()`, `DMSTAG`, `DMCreateInjection()` ## Level advanced ## Location src/dm/impls/stag/stagmulti.c ## Implementations DMStagRestrictSimple_1d in src/dm/impls/stag/stag1d.c
DMStagRestrictSimple_2d in src/dm/impls/stag/stag2d.c
DMStagRestrictSimple_3d in src/dm/impls/stag/stag3d.c
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/stag/stagmulti.c) [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)