Actual source code: scolor.c
1: /*$Id: scolor.c,v 1.24 2001/03/23 23:22:57 balay Exp $*/
2:
3: #include petscmat.h
4: #include src/mat/color/color.h
6: EXTERN_C_BEGIN
7: EXTERN int MatColoring_Natural(Mat,MatColoringType,ISColoring*);
8: EXTERN int MatFDColoringSL_Minpack(Mat,MatColoringType,ISColoring*);
9: EXTERN int MatFDColoringLF_Minpack(Mat,MatColoringType,ISColoring*);
10: EXTERN int MatFDColoringID_Minpack(Mat,MatColoringType,ISColoring*);
11: EXTERN_C_END
13: /*@C
14: MatColoringRegisterAll - Registers all of the matrix coloring routines in PETSc.
16: Not Collective
18: Level: developer
20: Adding new methods:
21: To add a new method to the registry. Copy this routine and
22: modify it to incorporate a call to MatColoringRegisterDynamic() for
23: the new method, after the current list.
25: Restricting the choices: To prevent all of the methods from being
26: registered and thus save memory, copy this routine and modify it to
27: register a zero, instead of the function name, for those methods you
28: do not wish to register. Make sure that the replacement routine is
29: linked before libpetscmat.a.
31: .keywords: matrix, coloring, register, all
33: .seealso: MatColoringRegisterDynamic(), MatColoringRegisterDestroy()
34: @*/
35: int MatColoringRegisterAll(char *path)
36: {
37: int ierr;
40: MatColoringRegisterAllCalled = PETSC_TRUE;
41: MatColoringRegisterDynamic(MATCOLORING_NATURAL,path,"MatColoring_Natural", MatColoring_Natural);
42: MatColoringRegisterDynamic(MATCOLORING_SL, path,"MatFDColoringSL_Minpack",MatFDColoringSL_Minpack);
43: MatColoringRegisterDynamic(MATCOLORING_LF, path,"MatFDColoringLF_Minpack",MatFDColoringLF_Minpack);
44: MatColoringRegisterDynamic(MATCOLORING_ID, path,"MatFDColoringID_Minpack",MatFDColoringID_Minpack);
46: return(0);
47: }