# DMStagSetBoundaryTypes
set `DMSTAG` boundary types 
## Synopsis
```
PetscErrorCode DMStagSetBoundaryTypes(DM dm, DMBoundaryType boundaryType0, DMBoundaryType boundaryType1, DMBoundaryType boundaryType2)
```
Logically Collective; boundaryType0, boundaryType1, and boundaryType2 must contain common values


## Input Parameters

- ***dm -*** the `DMSTAG` object
- ***boundaryTypeX -*** boundary type for x direction
- ***boundaryTypeY -*** boundary type for y direction, not set for one dimensional problems
- ***boundaryTypeZ -*** boundary type for z direction, not set for one and two dimensional problems





## Note
Arguments corresponding to higher dimensions are ignored for 1D and 2D grids.


## See Also
 [](chapter_stag), `DMSTAG`, `DMBoundaryType`, `DMStagCreate1d()`, `DMStagCreate2d()`, `DMStagCreate3d()`, `DMDASetBoundaryType()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/stagutils.c.html#DMStagSetBoundaryTypes">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)  
