:orphan:
# PCGAMGSetType
Set the type of algorithm `PCGAMG` should use 
## Synopsis
```
#include "petscpc.h" 
#include "petscksp.h" 
PetscErrorCode PCGAMGSetType(PC pc, PCGAMGType type)
```
Collective


## Input Parameters

- ***pc -*** the preconditioner context
- ***type -*** `PCGAMGAGG`, `PCGAMGGEO`, or `PCGAMGCLASSICAL`



## Options Database Key

- ***-pc_gamg_type <agg,geo,classical> -*** type of algebraic multigrid to apply





## See Also
 `PCGAMGGetType()`, `PCGAMG`, `PCGAMGType`

## Level
intermediate

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/gamg/gamg.c.html#PCGAMGSetType_GAMG">PCGAMGSetType_GAMG in src/ksp/pc/impls/gamg/gamg.c</A><BR>


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