Skip to main content
`Ctrl`+`K`

# DMSubDomainRestrict

restricts user-defined problem data to a subdomain `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

- global - The global `DM` to use as a base

- oscatter - The scatter from domain global vector filling subdomain global vector with overlap

- gscatter - The scatter from domain global vector filling subdomain local vector with ghosts

- subdm - The subdomain `DM` to update

## See Also

DM Basics, `DM`, `DMCoarsenHookAdd()`, `MatRestrict()`, `DMCreateDomainDecomposition()`

## Level

developer

## Location

src/dm/interface/dm.c

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