# DMGetCellCoordinates
Gets a global vector with the cellwise coordinates associated with the `DM`. 
## Synopsis
```
#include "petscdm.h"          
PetscErrorCode DMGetCellCoordinates(DM dm, Vec *c)
```
Collective on dm


## Input Parameter

- ***dm -*** the `DM`



## Output Parameter

- ***c -*** global coordinate vector





## Notes
This is a borrowed reference, so the user should NOT destroy this vector. When the `DM` is
destroyed the array will no longer be valid.

Each process has only the locally-owned portion of the global coordinates (does NOT have the ghost coordinates).


## See Also
 `DM`, `DMGetCoordinates()`, `DMSetCellCoordinates()`, `DMGetCellCoordinatesLocal()`, `DMGetCellCoordinateDM()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dmcoordinates.c.html#DMGetCellCoordinates">src/dm/interface/dmcoordinates.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/interface/dmcoordinates.c)


[Index of all DM routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
