:orphan:
# DMPatchZoom
Create patches of a `DMDA` on subsets of processes, indicated by `commz`
## Synopsis
```
#include "petscdmpatch.h"
PetscErrorCode DMPatchZoom(DM dm, MatStencil lower, MatStencil upper, MPI_Comm commz, DM *dmz, PetscSF *sfz, PetscSF *sfzr)
```
Collective
## Input Parameters
- ***dm -*** the `DM`
- ***lower -*** the lower left corner of the requested patch
- ***upper -*** the upper right corner of the requested patch
- ***commz -*** the new communicator for the patch, `MPI_COMM_NULL` indicates that the given rank will not own a patch
## Output Parameters
- ***dmz -*** the patch `DM`
- ***sfz -*** the `PetscSF` mapping the patch+halo to the zoomed version (optional)
- ***sfzr -*** the `PetscSF` mapping the patch to the restricted zoomed version
## See Also
`DMPatchSolve()`, `DMDACreatePatchIS()`
## Level
intermediate
## Location
src/dm/impls/patch/patch.c
## Examples
src/dm/tutorials/ex25.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/patch/patch.c)
[Index of all DMPatch routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)