# DMDAGetRefinementFactor
Gets the ratios that the `DMDA` grid is refined 
## Synopsis
```
#include "petscdmda.h"   
PetscErrorCode DMDAGetRefinementFactor(DM da, PetscInt *refine_x, PetscInt *refine_y, PetscInt *refine_z)
```
Not Collective


## Input Parameter

- ***da -*** the `DMDA` object



## Output Parameters

- ***refine_x -*** ratio of fine grid to coarse in x direction (2 by default)
- ***refine_y -*** ratio of fine grid to coarse in y direction (2 by default)
- ***refine_z -*** ratio of fine grid to coarse in z direction (2 by default)





## Note
Pass NULL for values you do not need


## See Also
 `DM`, `DMDA`, `DMRefine()`, `DMDASetRefinementFactor()`

## Level
intermediate

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


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


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