# MGSetCycles

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

### Synopsis

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

Collective on PC

### Input Parameters

| mg | - 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

MGSetCyclesOnLevel()

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