Actual source code: scoarsen.c
petsc-3.10.5 2019-03-28
Report Typos and Errors

      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:  .keywords: matrix, Coarsen, register, all

     28:  .seealso: MatCoarsenRegister(), MatCoarsenRegisterDestroy()
     29:  @*/
     30: PetscErrorCode  MatCoarsenRegisterAll(void)
     31: {

     35:   if (MatCoarsenRegisterAllCalled) return(0);
     36:   MatCoarsenRegisterAllCalled = PETSC_TRUE;

     38:   MatCoarsenRegister(MATCOARSENMIS,MatCoarsenCreate_MIS);
     39:   MatCoarsenRegister(MATCOARSENHEM,MatCoarsenCreate_HEM);
     40:   return(0);
     41: }