# PCDeflationSetLevels
Set the maximum level of deflation nesting. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCDeflationSetLevels(PC pc, PetscInt max)
```
Logically Collective


## Input Parameters

- ***pc  -*** the preconditioner context
- ***max -*** maximum deflation level



## Options Database Key

- ***-pc_deflation_max_lvl <0> -*** maximum number of levels for multilevel deflation





## See Also
 `PCDeflationSetSpaceToCompute()`, `PCDeflationSetSpace()`, `PCDEFLATION`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/deflation/deflation.c.html#PCDeflationSetLevels">src/ksp/pc/impls/deflation/deflation.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/deflation/deflation.c.html#PCDeflationSetLevels_Deflation">PCDeflationSetLevels_Deflation in src/ksp/pc/impls/deflation/deflation.c</A><BR>


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


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