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