# PCMGSetCycles

Sets the type cycles to use. Use PCMGSetCyclesOnLevel() for more complicated cycling.

### Synopsis

    #include "petscmg.h"
    PetscErrorCode PETSCKSP_DLLEXPORT PCMGSetCycles(PC pc,PetscInt n)

Collective on PC

### Input Parameters

| pc | - the multigrid context
| n | - the number of cycles

### Options Database Key

     -pc_mg_cycles n - 1 denotes a V-cycle; 2 denotes a W-cycle.

### Keywords

MG, set, cycles, V-cycle, W-cycle, multigrid

### See Also

PCMGSetCyclesOnLevel()

Level:advanced
Location:src/ksp/pc/impls/mg/mg.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages