# DMMoabGenerateHierarchy
Generate a multi-level uniform refinement hierarchy by succesively refining a coarse mesh, already defined in the DM object provided by the user. 
## Synopsis
```
PetscErrorCode DMMoabGenerateHierarchy(DM dm, PetscInt nlevels, PetscInt *ldegrees)
```
Collective


## Input Parameter

- ***dmb  -*** The DMMoab object



## Output Parameters

- ***nlevels   -*** The number of levels of refinement needed to generate the hierarchy
- ***ldegrees  -*** The degree of refinement at each level in the hierarchy





## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/moab/dmmbmg.cxx.html#DMMoabGenerateHierarchy">src/dm/impls/moab/dmmbmg.cxx</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex35.cxx.html">src/ksp/ksp/tutorials/ex35.cxx.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex36.cxx.html">src/ksp/ksp/tutorials/ex36.cxx.html</A><BR>


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


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