Date: 2025-03-29T05:58:31+00:00

Actual source code: scoarsen.c

      1: #include <petscmat.h>
      2: #include <petsc/private/matimpl.h>

      4: PETSC_EXTERN PetscErrorCode MatCoarsenCreate_MIS(MatCoarsen);
      5: PETSC_EXTERN PetscErrorCode MatCoarsenCreate_HEM(MatCoarsen);
      6: PETSC_EXTERN PetscErrorCode MatCoarsenCreate_MISK(MatCoarsen);

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

     11:   Not Collective

     13:   Level: developer

     15: .seealso: `MatCoarsen`, `MatCoarsenType`, `MatCoarsenRegister()`, `MatCoarsenRegisterDestroy()`
     16:  @*/
     17: PetscErrorCode MatCoarsenRegisterAll(void)
     18: {
     19:   PetscFunctionBegin;
     20:   if (MatCoarsenRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
     21:   MatCoarsenRegisterAllCalled = PETSC_TRUE;

     23:   PetscCall(MatCoarsenRegister(MATCOARSENMIS, MatCoarsenCreate_MIS));
     24:   PetscCall(MatCoarsenRegister(MATCOARSENHEM, MatCoarsenCreate_HEM));
     25:   PetscCall(MatCoarsenRegister(MATCOARSENMISK, MatCoarsenCreate_MISK));
     26:   PetscFunctionReturn(PETSC_SUCCESS);
     27: }