# MatColoringRegisterDynamic

Adds a new sparse matrix coloring to the matrix package.

### Synopsis

    int MatColoringRegisterDynamic(char *name_coloring,char *path,char *name_create,int (*routine_create)(MatColoring))

Not Collective

### Input Parameters

| sname | - name of Coloring (for example MATCOLORING_SL)
| path | - location of library where creation routine is
| name | - name of function that creates the Coloring type, a string
| function | - function pointer that creates the coloring

If dynamic libraries are used, then the fourth input argument (function) is ignored.

### Sample usage

       MatColoringRegisterDynamic("my_color",/home/username/my_lib/lib/libO/solaris/mylib.a,
                   "MyColor",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

$PETSC_ARCH and $BOPT occuring in pathname will be replaced with appropriate values.

### Keywords

matrix, Coloring, register

### See Also

MatColoringRegisterDestroy(), MatColoringRegisterAll()

Level:developer
Location: src/mat/../../include/petscmat.h
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages