:orphan:
# DMSubDomainRestrict
restricts user-defined problem data to a block `DM` by running hooks registered by `DMSubDomainHookAdd()` 
## Synopsis
```
#include "petscdm.h"          
#include "petscdmlabel.h"     
#include "petscds.h"     
PetscErrorCode DMSubDomainRestrict(DM global, VecScatter oscatter, VecScatter gscatter, DM subdm)
```
Collective if any hooks are


## Input Parameters

- ***fine -*** finer `DM` to use as a base
- ***oscatter -*** scatter from domain global vector filling subdomain global vector with overlap
- ***gscatter -*** scatter from domain global vector filling subdomain local vector with ghosts
- ***coarse -*** coarser `DM` to update





## See Also
 [](ch_dmbase), `DM`, `DMCoarsenHookAdd()`, `MatRestrict()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dm.c.html#DMSubDomainRestrict">src/dm/interface/dm.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dm.c)


[Index of all DM routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
