:orphan:
# PCGAMGSetNSmooths
Set number of smoothing steps (1 is typical) used for multigrid on all the levels 
## Synopsis
```
#include "petscpc.h" 
PetscErrorCode PCGAMGSetNSmooths(PC pc, PetscInt n)
```
Logically Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***n -*** the number of smooths



## Options Database Key

- ***-pc_gamg_agg_nsmooths <nsmooth, default=1> -*** number of smoothing steps to use with smooth aggregation





## See Also
 `PCMG`, `PCGAMG`

## Level
intermediate

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/agg.c.html#PCGAMGSetNSmooths_AGG">PCGAMGSetNSmooths_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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
