:orphan:
# DMStagSetUniformCoordinates
set `DMSTAG` coordinates to be a uniform grid 
## Synopsis
```
PetscErrorCode DMStagSetUniformCoordinates(DM dm, PetscReal xmin, PetscReal xmax, PetscReal ymin, PetscReal ymax, PetscReal zmin, PetscReal zmax)
```
Collective


## Input Parameters

- ***dm -*** the `DMSTAG` object
- ***xmin -*** minimum global coordinate value in the x direction
- ***xmax -*** maximum global coordinate values in the x direction
- ***ymin -*** minimum global coordinate value in the y direction
- ***ymax -*** maximum global coordinate value in the y direction
- ***zmin -*** minimum global coordinate value in the z direction
- ***zmax -*** maximum global coordinate value in the z direction





## Notes
`DMSTAG` supports 2 different types of coordinate DM: `DMSTAG` and `DMPRODUCT`.
Arguments corresponding to higher dimensions are ignored for 1D and 2D grids.

Local coordinates are populated (using `DMSetCoordinatesLocal()`), linearly
extrapolated to ghost cells, including those outside the physical domain.
This is also done in case of periodic boundaries, meaning that the same
global point may have different coordinates in different local representations,
which are equivalent assuming a periodicity implied by the arguments to this function,
i.e. two points are equivalent if their difference is a multiple of $($`xmax` $-$ `xmin` $)$
in the x direction, $($ `ymax` $-$ `ymin` $)$ in the y direction, and $($ `zmax` $-$ `zmin` $)$ in the z direction.


## See Also
 [](ch_stag), `DMSTAG`, `DMPRODUCT`, `DMStagSetUniformCoordinatesExplicit()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagSetCoordinateDMType()`, `DMGetCoordinateDM()`, `DMGetCoordinates()`, `DMDASetUniformCoordinates()`, `DMBoundaryType`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/stag/stagutils.c.html#DMStagSetUniformCoordinates">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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
