petsc-3.14.6 2021-03-30
Report Typos and Errors

MatColoringSetMaxColors

Sets the maximum number of colors

Synopsis

#include "petscmat.h"  
PetscErrorCode MatColoringSetMaxColors(MatColoring mc,PetscInt maxcolors)
Logically Collective on MatColoring

Input Parameter

mc - the MatColoring context
maxcolors - the maximum number of colors to produce

Notes

This may be used to compute a certain number of independent sets from the graph. For instance, while using MATCOLORINGMIS and maxcolors = 1, one gets out an MIS. Vertices not in a color are set to have color maxcolors+1, which is not a valid color as they may be adjacent.

See Also

MatColoringGetMaxColors(), MatColoringApply()

Level

beginner

Location

src/mat/color/interface/matcoloring.c
Index of all MatOrderings routines
Table of Contents for all manual pages
Index of all manual pages