Skip to main content
`Ctrl`+`K`

# MatCoarsenSetFromOptions

Sets various coarsen options from the options database.

## Synopsis

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

Collective

## Input Parameter

- coarser - the coarsen context.

## Options Database Key

- -mat_coarsen_type type - see `MatCoarsenType`

- -mat_coarsen_max_it its - number of iterations to use in the coarsening process, see `MatCoarsenSetMaximumIterations()`

## Notes

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

Sets the `MatCoarsenType` to `MATCOARSENMISK` if has not been set previously

## See Also

`MatCoarsen`, `MatCoarsenType`, `MatCoarsenApply()`, `MatCoarsenCreate()`, `MatCoarsenSetType()`, `MatCoarsenSetMaximumIterations()`

## Level

advanced

## Location

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

## Implementations

MatCoarsenSetFromOptions_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