# 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 on dm


## 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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/patch/patch.c.html#DMPatchZoom">src/dm/impls/patch/patch.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex25.c.html">src/dm/tutorials/ex25.c.html</A><BR>


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