:orphan:
# DMDAGetInfo
Gets information about a given distributed array. 
## Synopsis
```
#include "petscdmda.h"   
PetscErrorCode DMDAGetInfo(DM da, PetscInt *dim, PetscInt *M, PetscInt *N, PetscInt *P, PetscInt *m, PetscInt *n, PetscInt *p, PetscInt *dof, PetscInt *s, DMBoundaryType *bx, DMBoundaryType *by, DMBoundaryType *bz, DMDAStencilType *st)
```
Not Collective


## Input Parameter

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



## Output Parameters

- ***dim      -*** dimension of the distributed array (1, 2, or 3)
- ***M        -*** global dimension in first direction of the array
- ***N        -*** global dimension in second direction of the array
- ***P        -*** global dimension in third direction of the array
- ***m        -*** corresponding number of procs in first dimension
- ***n        -*** corresponding number of procs in second dimension
- ***p        -*** corresponding number of procs in third dimension
- ***dof      -*** number of degrees of freedom per node
- ***s        -*** stencil width
- ***bx       -*** type of ghost nodes at boundary in first dimension
- ***by       -*** type of ghost nodes at boundary in second dimension
- ***bz       -*** type of ghost nodes at boundary in third dimension
- ***st       -*** stencil type, either `DMDA_STENCIL_STAR` or `DMDA_STENCIL_BOX`





## Note
Use NULL (NULL_INTEGER in Fortran) in place of any output parameter that is not of interest.


## See Also
 `DM`, `DMDA`, `DMView()`, `DMDAGetCorners()`, `DMDAGetLocalInfo()`

## Level
beginner

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

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex15.c.html">src/dm/tutorials/ex15.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/ex22.c.html">src/dm/tutorials/ex22.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/tutorials/swarm_ex3.c.html">src/dm/tutorials/swarm_ex3.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex22f.F90.html">src/ksp/ksp/tutorials/ex22f.F90</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex25.c.html">src/ksp/ksp/tutorials/ex25.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex28.c.html">src/ksp/ksp/tutorials/ex28.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex29.c.html">src/ksp/ksp/tutorials/ex29.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex32.c.html">src/ksp/ksp/tutorials/ex32.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex34.c.html">src/ksp/ksp/tutorials/ex34.c</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>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/dm/impls/da/daview.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)  
