DMDAGetCoordinateArray — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# DMDAGetCoordinateArray

Gets an array containing the coordinates of the `DMDA`

## Synopsis

    #include "petscdmda.h"
    PetscErrorCode DMDAGetCoordinateArray(DM dm, void *xc)

Not Collective; No Fortran Support

## Input Parameter

- dm - the `DMDA`

## Output Parameter

- xc - the coordinates

## Note

Use `DMDARestoreCoordinateArray()` to return the array

## See Also

DMDA - Creating vectors for structured grids, `DM`, `DMDA`, `DMDASetCoordinateName()`, `DMDASetFieldName()`, `DMDAGetFieldName()`, `DMDARestoreCoordinateArray()`

## Level

intermediate

## Location

src/dm/impls/da/dacorn.c

## Examples

src/ts/tutorials/extchemfield.c

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