:orphan:
# DMDAGetGhostCorners
Returns the global (x,y,z) indices of the lower left corner and size of the local region, including ghost points. 
## Synopsis
```
#include "petscdmda.h"   
PetscErrorCode DMDAGetGhostCorners(DM da, PetscInt *x, PetscInt *y, PetscInt *z, PetscInt *m, PetscInt *n, PetscInt *p)
```
Not Collective


## Input Parameter

- ***da -*** the distributed array



## Output Parameters

- ***x -*** the corner index for the first dimension
- ***y -*** the corner index for the second dimension (only used in 2D and 3D problems)
- ***z -*** the corner index for the third dimension (only used in 3D problems)
- ***m -*** the width in the first dimension
- ***n -*** the width in the second dimension (only used in 2D and 3D problems)
- ***p -*** the width in the third dimension (only used in 3D problems)





## Note
The corner information is independent of the number of degrees of
freedom per node set with the `DMDACreateXX()` routine. Thus the x, y, z, and
m, n, p can be thought of as coordinates on a logical grid, where each
grid point has (potentially) several degrees of freedom.
Any of y, z, n, and p can be passed in as NULL if not needed.


## See Also
 `DM`, `DMDA`, `DMDAGetCorners()`, `DMDACreate1d()`, `DMDACreate2d()`, `DMDACreate3d()`, `DMDAGetOwnershipRanges()`, `DMStagGetGhostCorners()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/da/daghost.c.html#DMDAGetGhostCorners">src/dm/impls/da/daghost.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex14f.F90.html">src/ksp/ksp/tutorials/ex14f.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex42.c.html">src/ksp/ksp/tutorials/ex42.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex43.c.html">src/ksp/ksp/tutorials/ex43.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex49.c.html">src/ksp/ksp/tutorials/ex49.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex70.c.html">src/ksp/ksp/tutorials/ex70.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex48.c.html">src/snes/tutorials/ex48.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex5f.F90.html">src/snes/tutorials/ex5f.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex5f90.F90.html">src/snes/tutorials/ex5f90.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex5f90t.F90.html">src/snes/tutorials/ex5f90t.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/bound/tutorials/jbearing2.c.html">src/tao/bound/tutorials/jbearing2.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/tao/bound/tutorials/plate2.c.html">src/tao/bound/tutorials/plate2.c</A><BR>


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


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