# DMStagSetStencilWidth
set elementwise stencil width 
## Synopsis
```
PetscErrorCode DMStagSetStencilWidth(DM dm, PetscInt stencilWidth)
```
Logically Collective; `stencilWidth` must contain common value


## Input Parameters

- ***dm -*** the `DMSTAG` object
- ***stencilWidth -*** stencil/halo/ghost width in elements





## Note
The width value is not used when `DMSTAG_STENCIL_NONE` is specified.


## See Also
 [](chapter_stag), `DMSTAG`, `DMStagGetStencilWidth()`, `DMStagGetStencilType()`, `DMStagStencilType`

## Level
beginner

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/stag/stagutils.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)  
