Actual source code: scolor.c
1: #define PETSCMAT_DLL
2:
3: #include petscmat.h
4: #include ../src/mat/color/color.h
7: EXTERN PetscErrorCode MatGetColoring_Natural(Mat,MatColoringType,ISColoring*);
8: EXTERN PetscErrorCode MatGetColoring_SL_Minpack(Mat,MatColoringType,ISColoring*);
9: EXTERN PetscErrorCode MatGetColoring_LF_Minpack(Mat,MatColoringType,ISColoring*);
10: EXTERN PetscErrorCode MatGetColoring_ID_Minpack(Mat,MatColoringType,ISColoring*);
15: /*@C
16: MatColoringRegisterAll - Registers all of the matrix coloring routines in PETSc.
18: Not Collective
20: Level: developer
22: Adding new methods:
23: To add a new method to the registry. Copy this routine and
24: modify it to incorporate a call to MatColoringRegisterDynamic() for
25: the new method, after the current list.
27: Restricting the choices: To prevent all of the methods from being
28: registered and thus save memory, copy this routine and modify it to
29: register a zero, instead of the function name, for those methods you
30: do not wish to register. Make sure that the replacement routine is
31: linked before libpetscmat.a.
33: .keywords: matrix, coloring, register, all
35: .seealso: MatColoringRegisterDynamic(), MatColoringRegisterDestroy()
36: @*/
37: PetscErrorCode MatColoringRegisterAll(const char path[])
38: {
42: MatColoringRegisterAllCalled = PETSC_TRUE;
43: MatColoringRegisterDynamic(MATCOLORING_NATURAL,path,"MatGetColoring_Natural", MatGetColoring_Natural);
44: MatColoringRegisterDynamic(MATCOLORING_SL, path,"MatGetColoring_SL_Minpack",MatGetColoring_SL_Minpack);
45: MatColoringRegisterDynamic(MATCOLORING_LF, path,"MatGetColoring_LF_Minpack",MatGetColoring_LF_Minpack);
46: MatColoringRegisterDynamic(MATCOLORING_ID, path,"MatGetColoring_ID_Minpack",MatGetColoring_ID_Minpack);
48: return(0);
49: }