Actual source code: scolor.c
petsc-3.4.5 2014-06-29
2: #include <petscmat.h>
3: #include <../src/mat/color/color.h>
5: PETSC_EXTERN PetscErrorCode MatGetColoring_Natural(Mat,MatColoringType,ISColoring*);
6: PETSC_EXTERN PetscErrorCode MatGetColoring_SL_Minpack(Mat,MatColoringType,ISColoring*);
7: PETSC_EXTERN PetscErrorCode MatGetColoring_LF_Minpack(Mat,MatColoringType,ISColoring*);
8: PETSC_EXTERN PetscErrorCode MatGetColoring_ID_Minpack(Mat,MatColoringType,ISColoring*);
12: /*@C
13: MatColoringRegisterAll - Registers all of the matrix coloring routines in PETSc.
15: Not Collective
17: Level: developer
19: Adding new methods:
20: To add a new method to the registry. Copy this routine and
21: modify it to incorporate a call to MatColoringRegister() for
22: the new method, after the current list.
24: Restricting the choices: To prevent all of the methods from being
25: registered and thus save memory, copy this routine and modify it to
26: register a zero, instead of the function name, for those methods you
27: do not wish to register. Make sure that the replacement routine is
28: linked before libpetscmat.a.
30: .keywords: matrix, coloring, register, all
32: .seealso: MatColoringRegister(), MatColoringRegisterDestroy()
33: @*/
34: PetscErrorCode MatColoringRegisterAll(void)
35: {
39: MatColoringRegisterAllCalled = PETSC_TRUE;
41: MatColoringRegister(MATCOLORINGNATURAL,MatGetColoring_Natural);
42: MatColoringRegister(MATCOLORINGSL, MatGetColoring_SL_Minpack);
43: MatColoringRegister(MATCOLORINGLF, MatGetColoring_LF_Minpack);
44: MatColoringRegister(MATCOLORINGID, MatGetColoring_ID_Minpack);
45: return(0);
46: }