PCMGSetAdaptCoarseSpaceType — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# 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 nmodes - 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`

## Note

Requires a `DM` with specific functionality be attached to the `PC`.

## See Also

KSP: Linear System Solvers, `PCMG`, `PCMGCoarseSpaceType`, `PCMGGetAdaptCoarseSpaceType()`, `PCMGSetGalerkin()`, `PCMGSetAdaptInterpolation()`, `DM`

## Level

intermediate

## Location

src/ksp/pc/impls/mg/mg.c

## Implementations

PCMGSetAdaptCoarseSpaceType_MG() in src/ksp/pc/impls/mg/mg.c

Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages