Actual source code: scoarsen.c

petsc-3.3-p7 2013-05-11
  2: #include <petscmat.h>

  4: EXTERN_C_BEGIN
  5: extern PetscErrorCode  MatCoarsenCreate_MIS(MatCoarsen);
  6: extern PetscErrorCode  MatCoarsenCreate_HEM(MatCoarsen);
  7: EXTERN_C_END

 11: /*@C
 12:   MatCoarsenRegisterAll - Registers all of the matrix Coarsen routines in PETSc.

 14:   Not Collective

 16:   Level: developer

 18:   Adding new methods:
 19:   To add a new method to the registry. Copy this routine and 
 20:   modify it to incorporate a call to MatCoarsenRegisterDynamic() for 
 21:   the new method, after the current list.

 23:   Restricting the choices: To prevent all of the methods from being
 24:   registered and thus save memory, copy this routine and modify it to
 25:   register a zero, instead of the function name, for those methods you
 26:  do not wish to register.  Make sure that the replacement routine is
 27:   linked before libpetscmat.a.

 29:  .keywords: matrix, Coarsen, register, all
 30:  
 31:  .seealso: MatCoarsenRegisterDynamic(), MatCoarsenRegisterDestroy()
 32:  @*/
 33: PetscErrorCode  MatCoarsenRegisterAll(const char path[])
 34: {

 38:   MatCoarsenRegisterAllCalled = PETSC_TRUE;
 39:   MatCoarsenRegisterDynamic(MATCOARSENMIS,path,"MatCoarsenCreate_MIS",MatCoarsenCreate_MIS);
 40:   MatCoarsenRegisterDynamic(MATCOARSENHEM,path,"MatCoarsenCreate_HEM",MatCoarsenCreate_HEM);
 41:   return(0);
 42: }