2: #include <petscmat.h> 3: #include <petsc/private/matimpl.h> 5: PETSC_EXTERN PetscErrorCode MatCoarsenCreate_MIS(MatCoarsen); 6: PETSC_EXTERN PetscErrorCode MatCoarsenCreate_HEM(MatCoarsen); 8: /*@C 9: MatCoarsenRegisterAll - Registers all of the matrix Coarsen routines in PETSc. 11: Not Collective 13: Level: developer 15: Adding new methods: 16: To add a new method to the registry. Copy this routine and 17: modify it to incorporate a call to MatCoarsenRegister() for 18: the new method, after the current list. 20: Restricting the choices: To prevent all of the methods from being 21: registered and thus save memory, copy this routine and modify it to 22: register a zero, instead of the function name, for those methods you 23: do not wish to register. Make sure that the replacement routine is 24: linked before libpetscmat.a. 26: .seealso: MatCoarsenRegister(), MatCoarsenRegisterDestroy() 27: @*/ 28: PetscErrorCode MatCoarsenRegisterAll(void) 29: { 33: if (MatCoarsenRegisterAllCalled) return(0); 34: MatCoarsenRegisterAllCalled = PETSC_TRUE; 36: MatCoarsenRegister(MATCOARSENMIS,MatCoarsenCreate_MIS); 37: MatCoarsenRegister(MATCOARSENHEM,MatCoarsenCreate_HEM); 38: return(0); 39: }