Skip to main content
`Ctrl`+`K`

# DMGetCellCoordinates

Gets a global vector with the cellwise coordinates associated with the `DM`.

## Synopsis

    #include "petscdm.h"
    PetscErrorCode DMGetCellCoordinates(DM dm, Vec *c)

Collective

## 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 `c` 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

src/dm/interface/dmcoordinates.c

Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages