Skip to main content
`Ctrl`+`K`

# MatColoringRegister

Adds a new sparse matrix coloring to the matrix package.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatColoringRegister(const char sname[], PetscErrorCode (*function)(MatColoring))

Not Collective, No Fortran Support

## Input Parameters

- sname - name of Coloring (for example `MATCOLORINGSL`)

- function - function pointer that creates the coloring

## Example Usage

       MatColoringRegister("my_color", MyColor);

Then, your partitioner can be chosen with the procedural interface via `MatColoringSetType(part, "my_color")` or at runtime via the option `-mat_coloring_type my_color`

## See Also

`MatColoringType`, `MatColoringRegisterDestroy()`, `MatColoringRegisterAll()`

## Level

developer

## Location

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

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