# 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
 [](chapter_stag), `DMSTAG`, `DM`, `DMRestrict()`, `DMCoarsen()`, `DMSTAG`, `DMCreateInjection()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/stagmulti.c.html#DMStagRestrictSimple">src/dm/impls/stag/stagmulti.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/stag1d.c.html#DMStagRestrictSimple_1d">DMStagRestrictSimple_1d in src/dm/impls/stag/stag1d.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/stag2d.c.html#DMStagRestrictSimple_2d">DMStagRestrictSimple_2d in src/dm/impls/stag/stag2d.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/stag3d.c.html#DMStagRestrictSimple_3d">DMStagRestrictSimple_3d in src/dm/impls/stag/stag3d.c</A><BR>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
