Skip to main content
`Ctrl`+`K`

# PCGAMGSetNlevels

Sets the maximum number of levels `PCGAMG` will use

## Synopsis

    #include "petscpc.h"
    #include "petscksp.h"
    PetscErrorCode PCGAMGSetNlevels(PC pc, PetscInt n)

Collective

## Input Parameters

- pc - the preconditioner

- n - the maximum number of levels to use

## Options Database Key

- -pc_mg_levels n - set the maximum number of levels to allow

## Developer Notes

Should be called `PCGAMGSetMaximumNumberlevels()` and possible be shared with `PCMG`

## See Also

the Users Manual section on PCGAMG, the Users Manual section on PCMG, KSP: Linear System Solvers, `PCGAMG`

## Level

intermediate

## Location

src/ksp/pc/impls/gamg/gamg.c

## Implementations

PCGAMGSetNlevels_GAMG() in src/ksp/pc/impls/gamg/gamg.c

Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages