:orphan:
# PCMGSetCycleType
Sets the type cycles to use.  Use `PCMGSetCycleTypeOnLevel()` for more complicated cycling. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCMGSetCycleType(PC pc, PCMGCycleType n)
```
Logically Collective


## Input Parameters

- ***pc -*** the multigrid context
- ***n -*** either `PC_MG_CYCLE_V` or `PC_MG_CYCLE_W`



## Options Database Key

- ***-pc_mg_cycle_type <v,w> -*** provide the cycle desired





## See Also
 `PCMG`, `PCMGSetCycleTypeOnLevel()`, `PCMGType`, `PCMGCycleType`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/mg/mg.c.html#PCMGSetCycleType">src/ksp/pc/impls/mg/mg.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex35.cxx.html">src/ksp/ksp/tutorials/ex35.cxx</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex36.cxx.html">src/ksp/ksp/tutorials/ex36.cxx</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/pc/impls/mg/mg.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)  
