Skip to main content
`Ctrl`+`K`

# MatCoarsenApply

Gets a coarsen for a matrix.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatCoarsenApply(MatCoarsen coarser)

Collective

## Input Parameter

- coarser - the coarsen

## Options Database Keys

- -mat_coarsen_type mis|hem|misk - mis: maximal independent set based; misk: distance k MIS; hem: heavy edge matching

- -mat_coarsen_view - view the coarsening object

## Notes

When the coarsening is used inside `PCGAMG` then the options database keys are prefixed with `-pc_gamg_`

Use `MatCoarsenGetData()` to access the results of the coarsening

The user can define additional coarsens; see `MatCoarsenRegister()`.

## See Also

`MatCoarsen`, `MatCoarsenSetFromOptions()`, `MatCoarsenSetType()`, `MatCoarsenRegister()`, `MatCoarsenCreate()`, `MatCoarsenDestroy()`, `MatCoarsenSetAdjacency()`, `MatCoarsenGetData()`

## Level

advanced

## Location

src/mat/graphops/coarsen/interface/coarsen.c

## Implementations

MatCoarsenApply_HEM() in src/mat/graphops/coarsen/impls/hem/hem.c
MatCoarsenApply_MIS() in src/mat/graphops/coarsen/impls/mis/mis.c
MatCoarsenApply_MISK() in src/mat/graphops/coarsen/impls/misk/misk.c

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