MatColoringSetType — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# MatColoringSetType

Sets the type of coloring algorithm used

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatColoringSetType(MatColoring mc, MatColoringType type)

Collective

## Input Parameters

- mc - the `MatColoring` context

- type - the type of coloring

## Options Database Key

- -mat_coloring_type type - the name of the type

## Note

Possible types include the sequential types `MATCOLORINGLF`, `MATCOLORINGSL`, and `MATCOLORINGID` from the MINPACK package as well as a parallel `MATCOLORINGGREEDY` algorithm.

## See Also

`MatColoring`, `MatColoringSetFromOptions()`, `MatColoringType`, `MatColoringCreate()`, `MatColoringApply()`

## Level

beginner

## Location

src/mat/graphops/color/interface/matcoloring.c

## Examples

src/mat/tutorials/ex16.c

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