Actual source code: scolor.c
petsc-3.3-p7 2013-05-11
1:
2: #include <petscmat.h>
3: #include <../src/mat/color/color.h>
5: EXTERN_C_BEGIN
6: extern PetscErrorCode MatGetColoring_Natural(Mat,MatColoringType,ISColoring*);
7: extern PetscErrorCode MatGetColoring_SL_Minpack(Mat,MatColoringType,ISColoring*);
8: extern PetscErrorCode MatGetColoring_LF_Minpack(Mat,MatColoringType,ISColoring*);
9: extern PetscErrorCode MatGetColoring_ID_Minpack(Mat,MatColoringType,ISColoring*);
10: EXTERN_C_END
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(MATCOLORINGNATURAL,path,"MatGetColoring_Natural", MatGetColoring_Natural);
43: MatColoringRegisterDynamic(MATCOLORINGSL, path,"MatGetColoring_SL_Minpack",MatGetColoring_SL_Minpack);
44: MatColoringRegisterDynamic(MATCOLORINGLF, path,"MatGetColoring_LF_Minpack",MatGetColoring_LF_Minpack);
45: MatColoringRegisterDynamic(MATCOLORINGID, path,"MatGetColoring_ID_Minpack",MatGetColoring_ID_Minpack);
47: return(0);
48: }