# PCMGalerkinType
Determines if the coarse grid operators are computed via the Galerkin process 
## Synopsis
```
typedef enum {
  PC_MG_GALERKIN_BOTH,
  PC_MG_GALERKIN_PMAT,
  PC_MG_GALERKIN_MAT,
  PC_MG_GALERKIN_NONE,
  PC_MG_GALERKIN_EXTERNAL
} PCMGGalerkinType;
```



## Values

- ***`PC_MG_GALERKIN_PMAT` -*** computes the pmat (matrix from which the preconditioner is built) via the Galerkin process from the finest grid
- ***`PC_MG_GALERKIN_MAT` -*** computes the mat (matrix used to apply the operator) via the Galerkin process from the finest grid
- ***`PC_MG_GALERKIN_BOTH` -*** computes both the mat and pmat via the Galerkin process (if pmat == mat the construction is only done once
- ***`PC_MG_GALERKIN_NONE` -*** neither operator is computed via the Galerkin process, the user must provide the operator


Users should never set `PC_MG_GALERKIN_EXTERNAL`, it is used by `PCHYPRE` and `PCML`


## See Also
 `PCMGSetCycleType()`


## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscpctypes.h.html#PCMGalerkinType">include/petscpctypes.h</A>

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscpctypes.h)


[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)  
