Skip to main content
`Ctrl`+`K`

# PCMGGetLevels

Gets the number of levels to use with `PCMG`.

## Synopsis

    #include "petscksp.h"
    PetscErrorCode PCMGGetLevels(PC pc, PetscInt *levels)

Not Collective

## Input Parameter

- pc - the preconditioner context

## Output Parameter

- levels - the number of levels

## See Also

KSP: Linear System Solvers, `PCMG`, `PCMGSetLevels()`

## Level

advanced

## Location

src/ksp/pc/impls/mg/mg.c

## Examples

src/ksp/ksp/tutorials/ex56.c

## Implementations

PCMGGetLevels_MG() in src/ksp/pc/impls/mg/mg.c

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