Actual source code: kspmatregi.c

      1: #include <petsc/private/kspimpl.h>
      2: #include <../src/ksp/ksp/utils/schurm/schurm.h>
      3: #include <../src/ksp/ksp/utils/lmvm/lmvm.h>

      5: static PetscBool KSPMatRegisterAllCalled = PETSC_FALSE;

      7: /*@C
      8:   KSPMatRegisterAll - Registers all matrix implementations in the `KSP` package.

     10:   Not Collective

     12:   Level: advanced

     14: .seealso: [](ch_ksp), `Mat`, `MatRegister()`, `MatRegisterAll()`, `KSPInitializePackage()`
     15: @*/
     16: PetscErrorCode KSPMatRegisterAll(void)
     17: {
     18:   PetscFunctionBegin;
     19:   if (KSPMatRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
     20:   KSPMatRegisterAllCalled = PETSC_TRUE;
     21:   PetscCall(MatRegister(MATSCHURCOMPLEMENT, MatCreate_SchurComplement));
     22:   PetscCall(MatRegister(MATLMVMDFP, MatCreate_LMVMDFP));
     23:   PetscCall(MatRegister(MATLMVMDDFP, MatCreate_LMVMDDFP));
     24:   PetscCall(MatRegister(MATLMVMBFGS, MatCreate_LMVMBFGS));
     25:   PetscCall(MatRegister(MATLMVMDBFGS, MatCreate_LMVMDBFGS));
     26:   PetscCall(MatRegister(MATLMVMDQN, MatCreate_LMVMDQN));
     27:   PetscCall(MatRegister(MATLMVMSR1, MatCreate_LMVMSR1));
     28:   PetscCall(MatRegister(MATLMVMBROYDEN, MatCreate_LMVMBrdn));
     29:   PetscCall(MatRegister(MATLMVMBADBROYDEN, MatCreate_LMVMBadBrdn));
     30:   PetscCall(MatRegister(MATLMVMSYMBROYDEN, MatCreate_LMVMSymBrdn));
     31:   PetscCall(MatRegister(MATLMVMSYMBADBROYDEN, MatCreate_LMVMSymBadBrdn));
     32:   PetscCall(MatRegister(MATLMVMDIAGBROYDEN, MatCreate_LMVMDiagBrdn));
     33:   PetscFunctionReturn(PETSC_SUCCESS);
     34: }