# PCMGSetAdaptCoarseSpaceType
Set the type of adaptive coarse space. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode PCMGSetAdaptCoarseSpaceType(PC pc, PCMGCoarseSpaceType ctype)
```
Adapts or creates the interpolator based upon a vector space which should be accurately captured by the next coarser mesh, and thus accurately interpolated.

Logically Collective


## Input Parameters

- ***pc    -*** the multigrid context
- ***ctype -*** the type of coarse space



## Options Database Keys

- ***-pc_mg_adapt_interp_n <int>             -*** The number of modes to use
- ***-pc_mg_adapt_interp_coarse_space <type> -*** The type of coarse space: none, polynomial, harmonic, eigenvector, generalized_eigenvector, gdsw





## See Also
 `PCMG`, `PCMGCoarseSpaceType`, `PCMGGetAdaptCoarseSpaceType()`, `PCMGSetGalerkin()`, `PCMGSetAdaptInterpolation()`

## Level
intermediate

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/pc/impls/mg/mg.c.html#PCMGSetAdaptCoarseSpaceType_MG">PCMGSetAdaptCoarseSpaceType_MG in src/ksp/pc/impls/mg/mg.c</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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
