:orphan:
# DMForestSetGradeFactor
During the pre-setup phase, set the desired amount of grading in the mesh, e.g. give 2 to indicate that the diameter of neighboring cells should differ by at most a factor of 2.  Subtypes of `DMFOREST` may only support one particular choice of grading factor. 
## Synopsis
```
#include "petscdmforest.h" 
#include "petscdm.h" 
#include "petscdmlabel.h" 
PetscErrorCode DMForestSetGradeFactor(DM dm, PetscInt grade)
```
Logically Collective


## Input Parameters

- ***dm -*** the forest
- ***grade -*** the grading factor





## See Also
 `DM`, `DMFOREST`, `DMForestGetGradeFactor()`

## Level
advanced

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


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


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