# DMStagGetProductCoordinateArrays
extract local product coordinate arrays, one per dimension 
## Synopsis
```
PetscErrorCode DMStagGetProductCoordinateArrays(DM dm, void *arrX, void *arrY, void *arrZ)
```
Logically Collective


## Input Parameter

- ***dm -*** the `DMSTAG` object



## Output Parameters

- ***arrX -*** local 1D coordinate arrays for x direction
- ***arrY -*** local 1D coordinate arrays for y direction, not set for one dimensional problems
- ***arrZ -*** local 1D coordinate arrays for z direction, not set for one and two dimensional problems





## Notes
A high-level helper function to quickly extract local coordinate arrays.

Note that 2-dimensional arrays are returned. See
`DMStagVecGetArray()`, which is called internally to produce these arrays
representing coordinates on elements and vertices (element boundaries)
for a 1-dimensional `DMSTAG` in each coordinate direction.

One should use `DMStagGetProductCoordinateLocationSlot()` to determine appropriate
indices for the second dimension in these returned arrays. This function
checks that the coordinate array is a suitable product of 1-dimensional
`DMSTAG` objects.


## See Also
 [](chapter_stag), `DMSTAG`, `DMPRODUCT`, `DMStagGetProductCoordinateArraysRead()`, `DMStagSetUniformCoordinates()`, `DMStagSetUniformCoordinatesProduct()`, `DMStagGetProductCoordinateLocationSlot()`

## Level
intermediate

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

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


---
[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)  
