# DMGetCoordinatesLocalTuple
Gets a local vector with the coordinates of specified points and the section describing its layout. 
## Synopsis
```
#include "petscdm.h"          
PetscErrorCode DMGetCoordinatesLocalTuple(DM dm, IS p, PetscSection *pCoordSection, Vec *pCoord)
```
Not collective


## Input Parameters

- ***dm -*** the `DM`
- ***p -*** the `IS` of points whose coordinates will be returned



## Output Parameters

- ***pCoordSection -*** the `PetscSection` describing the layout of pCoord, i.e. each point corresponds to one point in p, and DOFs correspond to coordinates
- ***pCoord -*** the `Vec` with coordinates of points in p





## Notes
`DMGetCoordinatesLocalSetUp()` must be called first. This function employs `DMGetCoordinatesLocalNoncollective()` so it is not collective.

This creates a new vector, so the user SHOULD destroy this vector

Each process has the local and ghost coordinates

For `DMDA`, in two and three dimensions coordinates are interlaced (x_0,y_0,x_1,y_1,...)
and (x_0,y_0,z_0,x_1,y_1,z_1...)


## See Also
 `DM`, `DMDA`, `DMSetCoordinatesLocal()`, `DMGetCoordinatesLocal()`, `DMGetCoordinatesLocalNoncollective()`, `DMGetCoordinatesLocalSetUp()`, `DMGetCoordinates()`, `DMSetCoordinates()`, `DMGetCoordinateDM()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/interface/dmcoordinates.c.html#DMGetCoordinatesLocalTuple">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)  
