# PCGAMGSetAggressiveLevels
Use aggressive coarsening on first n levels 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCGAMGSetAggressiveLevels(PC pc, PetscInt n)
```
Logically Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***n -*** 0, 1 or more



## Options Database Key

- ***-pc_gamg_aggressive_coarsening <n,default = 1> -*** Number of levels to square the graph on before aggregating it





## See Also
 `PCGAMG`, `PCGAMGSetThreshold()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/agg.c.html#PCGAMGSetAggressiveLevels">src/ksp/pc/impls/gamg/agg.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/agg.c.html#PCGAMGSetAggressiveLevels_AGG">PCGAMGSetAggressiveLevels_AGG in src/ksp/pc/impls/gamg/agg.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/gamg/agg.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)  
