# PCMGGetGalerkin
Checks if Galerkin multigrid is being used, i.e. A_i-1 = r_i * A_i * p_i 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCMGGetGalerkin(PC pc, PCMGGalerkinType *galerkin)
```
Not Collective


## Input Parameter

- ***pc -*** the multigrid context



## Output Parameter

- ***galerkin -*** one of `PC_MG_GALERKIN_BOTH`,`PC_MG_GALERKIN_PMAT`,`PC_MG_GALERKIN_MAT`, `PC_MG_GALERKIN_NONE`, or `PC_MG_GALERKIN_EXTERNAL`





## See Also
 `PCMG`, `PCMGSetGalerkin()`, `PCMGGalerkinType`

## Level
intermediate

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


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
