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: #undef __FUNCT__
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: int MatColoringRegisterAll(char *path)
38: {
39: int ierr;
42: MatColoringRegisterAllCalled = PETSC_TRUE;
43: MatColoringRegisterDynamic(MATCOLORING_NATURAL,path,"MatColoring_Natural", MatColoring_Natural);
44: MatColoringRegisterDynamic(MATCOLORING_SL, path,"MatFDColoringSL_Minpack",MatFDColoringSL_Minpack);
45: MatColoringRegisterDynamic(MATCOLORING_LF, path,"MatFDColoringLF_Minpack",MatFDColoringLF_Minpack);
46: MatColoringRegisterDynamic(MATCOLORING_ID, path,"MatFDColoringID_Minpack",MatFDColoringID_Minpack);
48: return(0);
49: }