# 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
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/color/interface/matcoloring.c.html#MatColoringSetType">src/mat/color/interface/matcoloring.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/tutorials/ex16.c.html">src/mat/tutorials/ex16.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/color/interface/matcoloring.c)


[Index of all MatOrderings routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
