Actual source code: pcregis.c

  1: #include <petsc/private/pcimpl.h>

  3: PETSC_EXTERN PetscErrorCode PCCreate_Jacobi(PC);
  4: PETSC_EXTERN PetscErrorCode PCCreate_BJacobi(PC);
  5: PETSC_EXTERN PetscErrorCode PCCreate_PBJacobi(PC);
  6: PETSC_EXTERN PetscErrorCode PCCreate_VPBJacobi(PC);
  7: PETSC_EXTERN PetscErrorCode PCCreate_ILU(PC);
  8: PETSC_EXTERN PetscErrorCode PCCreate_None(PC);
  9: PETSC_EXTERN PetscErrorCode PCCreate_LU(PC);
 10: PETSC_EXTERN PetscErrorCode PCCreate_QR(PC);
 11: PETSC_EXTERN PetscErrorCode PCCreate_SOR(PC);
 12: PETSC_EXTERN PetscErrorCode PCCreate_Shell(PC);
 13: PETSC_EXTERN PetscErrorCode PCCreate_MG(PC);
 14: PETSC_EXTERN PetscErrorCode PCCreate_Eisenstat(PC);
 15: PETSC_EXTERN PetscErrorCode PCCreate_ICC(PC);
 16: PETSC_EXTERN PetscErrorCode PCCreate_ASM(PC);
 17: PETSC_EXTERN PetscErrorCode PCCreate_GASM(PC);
 18: PETSC_EXTERN PetscErrorCode PCCreate_KSP(PC);
 19: PETSC_EXTERN PetscErrorCode PCCreate_BJKOKKOS(PC);
 20: PETSC_EXTERN PetscErrorCode PCCreate_Composite(PC);
 21: PETSC_EXTERN PetscErrorCode PCCreate_Redundant(PC);
 22: PETSC_EXTERN PetscErrorCode PCCreate_NN(PC);
 23: PETSC_EXTERN PetscErrorCode PCCreate_Cholesky(PC);
 24: PETSC_EXTERN PetscErrorCode PCCreate_FieldSplit(PC);
 25: PETSC_EXTERN PetscErrorCode PCCreate_Galerkin(PC);
 26: PETSC_EXTERN PetscErrorCode PCCreate_Exotic(PC);
 27: PETSC_EXTERN PetscErrorCode PCCreate_CP(PC);
 28: PETSC_EXTERN PetscErrorCode PCCreate_LSC(PC);
 29: PETSC_EXTERN PetscErrorCode PCCreate_Redistribute(PC);
 30: PETSC_EXTERN PetscErrorCode PCCreate_SVD(PC);
 31: PETSC_EXTERN PetscErrorCode PCCreate_GAMG(PC);
 32: PETSC_EXTERN PetscErrorCode PCCreate_Kaczmarz(PC);
 33: PETSC_EXTERN PetscErrorCode PCCreate_Telescope(PC);
 34: PETSC_EXTERN PetscErrorCode PCCreate_Patch(PC);
 35: PETSC_EXTERN PetscErrorCode PCCreate_LMVM(PC);
 36: PETSC_EXTERN PetscErrorCode PCCreate_HMG(PC);
 37: #if defined(PETSC_HAVE_AMGX)
 38: PETSC_EXTERN PetscErrorCode PCCreate_AMGX(PC);
 39: #endif
 40: #if defined(PETSC_HAVE_ML)
 41: PETSC_EXTERN PetscErrorCode PCCreate_ML(PC);
 42: #endif
 43: #if defined(PETSC_HAVE_SPAI)
 44: PETSC_EXTERN PetscErrorCode PCCreate_SPAI(PC);
 45: #endif
 46: PETSC_EXTERN PetscErrorCode PCCreate_Mat(PC);
 47: #if defined(PETSC_HAVE_HYPRE)
 48: PETSC_EXTERN PetscErrorCode PCCreate_HYPRE(PC);
 49: PETSC_EXTERN PetscErrorCode PCCreate_PFMG(PC);
 50: PETSC_EXTERN PetscErrorCode PCCreate_SysPFMG(PC);
 51: PETSC_EXTERN PetscErrorCode PCCreate_SMG(PC);
 52: #endif
 53: #if !defined(PETSC_USE_COMPLEX)
 54: PETSC_EXTERN PetscErrorCode PCCreate_TFS(PC);
 55: #endif
 56: #if defined(PETSC_HAVE_VIENNACL)
 57: PETSC_EXTERN PetscErrorCode PCCreate_CHOWILUVIENNACL(PC);
 58: PETSC_EXTERN PetscErrorCode PCCreate_ROWSCALINGVIENNACL(PC);
 59: PETSC_EXTERN PetscErrorCode PCCreate_SAVIENNACL(PC);
 60: #endif
 61: #if defined(PETSC_HAVE_PARMS)
 62: PETSC_EXTERN PetscErrorCode PCCreate_PARMS(PC);
 63: #endif
 64: PETSC_EXTERN PetscErrorCode PCCreate_BDDC(PC);
 65: PETSC_EXTERN PetscErrorCode PCCreate_Deflation(PC);
 66: #if defined(PETSC_HAVE_HPDDM) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES) && defined(PETSC_USE_SHARED_LIBRARIES)
 67: PETSC_EXTERN PetscErrorCode PCCreate_HPDDM(PC);
 68: #endif
 69: #if defined(PETSC_HAVE_H2OPUS)
 70: PETSC_EXTERN PetscErrorCode PCCreate_H2OPUS(PC);
 71: #endif
 72: PETSC_EXTERN PetscErrorCode PCCreate_MPI(PC);

 74: /*@C
 75:   PCRegisterAll - Registers all of the preconditioners in the PC package.

 77:   Not Collective

 79:   Level: advanced

 81: .seealso: [](ch_ksp), `PCRegister()`
 82: @*/
 83: PetscErrorCode PCRegisterAll(void)
 84: {
 85:   PetscFunctionBegin;
 86:   if (PCRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
 87:   PCRegisterAllCalled = PETSC_TRUE;

 89:   PetscCall(PCRegister(PCNONE, PCCreate_None));
 90:   PetscCall(PCRegister(PCJACOBI, PCCreate_Jacobi));
 91:   PetscCall(PCRegister(PCPBJACOBI, PCCreate_PBJacobi));
 92:   PetscCall(PCRegister(PCVPBJACOBI, PCCreate_VPBJacobi));
 93:   PetscCall(PCRegister(PCBJACOBI, PCCreate_BJacobi));
 94:   PetscCall(PCRegister(PCSOR, PCCreate_SOR));
 95:   PetscCall(PCRegister(PCLU, PCCreate_LU));
 96:   PetscCall(PCRegister(PCQR, PCCreate_QR));
 97:   PetscCall(PCRegister(PCSHELL, PCCreate_Shell));
 98:   PetscCall(PCRegister(PCMG, PCCreate_MG));
 99:   PetscCall(PCRegister(PCEISENSTAT, PCCreate_Eisenstat));
100:   PetscCall(PCRegister(PCILU, PCCreate_ILU));
101:   PetscCall(PCRegister(PCICC, PCCreate_ICC));
102:   PetscCall(PCRegister(PCCHOLESKY, PCCreate_Cholesky));
103:   PetscCall(PCRegister(PCASM, PCCreate_ASM));
104:   PetscCall(PCRegister(PCGASM, PCCreate_GASM));
105:   PetscCall(PCRegister(PCKSP, PCCreate_KSP));
106: #if defined(PETSC_HAVE_KOKKOS_KERNELS)
107:   PetscCall(PCRegister(PCBJKOKKOS, PCCreate_BJKOKKOS));
108: #endif
109:   PetscCall(PCRegister(PCCOMPOSITE, PCCreate_Composite));
110:   PetscCall(PCRegister(PCREDUNDANT, PCCreate_Redundant));
111:   PetscCall(PCRegister(PCNN, PCCreate_NN));
112:   PetscCall(PCRegister(PCMAT, PCCreate_Mat));
113:   PetscCall(PCRegister(PCFIELDSPLIT, PCCreate_FieldSplit));
114:   PetscCall(PCRegister(PCGALERKIN, PCCreate_Galerkin));
115:   PetscCall(PCRegister(PCEXOTIC, PCCreate_Exotic));
116:   PetscCall(PCRegister(PCCP, PCCreate_CP));
117:   PetscCall(PCRegister(PCLSC, PCCreate_LSC));
118:   PetscCall(PCRegister(PCREDISTRIBUTE, PCCreate_Redistribute));
119:   PetscCall(PCRegister(PCSVD, PCCreate_SVD));
120:   PetscCall(PCRegister(PCGAMG, PCCreate_GAMG));
121:   PetscCall(PCRegister(PCKACZMARZ, PCCreate_Kaczmarz));
122:   PetscCall(PCRegister(PCTELESCOPE, PCCreate_Telescope));
123:   PetscCall(PCRegister(PCPATCH, PCCreate_Patch));
124:   PetscCall(PCRegister(PCHMG, PCCreate_HMG));
125: #if defined(PETSC_HAVE_AMGX)
126:   PetscCall(PCRegister(PCAMGX, PCCreate_AMGX));
127: #endif
128: #if defined(PETSC_HAVE_ML)
129:   PetscCall(PCRegister(PCML, PCCreate_ML));
130: #endif
131: #if defined(PETSC_HAVE_SPAI)
132:   PetscCall(PCRegister(PCSPAI, PCCreate_SPAI));
133: #endif
134: #if defined(PETSC_HAVE_HYPRE)
135:   PetscCall(PCRegister(PCHYPRE, PCCreate_HYPRE));
136:   PetscCall(PCRegister(PCPFMG, PCCreate_PFMG));
137:   PetscCall(PCRegister(PCSYSPFMG, PCCreate_SysPFMG));
138:   PetscCall(PCRegister(PCSMG, PCCreate_SMG));
139: #endif
140: #if !defined(PETSC_USE_COMPLEX)
141:   PetscCall(PCRegister(PCTFS, PCCreate_TFS));
142: #endif
143: #if defined(PETSC_HAVE_VIENNACL)
144:   PetscCall(PCRegister(PCCHOWILUVIENNACL, PCCreate_CHOWILUVIENNACL));
145:   PetscCall(PCRegister(PCROWSCALINGVIENNACL, PCCreate_ROWSCALINGVIENNACL));
146:   PetscCall(PCRegister(PCSAVIENNACL, PCCreate_SAVIENNACL));
147: #endif
148: #if defined(PETSC_HAVE_PARMS)
149:   PetscCall(PCRegister(PCPARMS, PCCreate_PARMS));
150: #endif
151:   PetscCall(PCRegister(PCBDDC, PCCreate_BDDC));
152:   PetscCall(PCRegister(PCLMVM, PCCreate_LMVM));
153:   PetscCall(PCRegister(PCDEFLATION, PCCreate_Deflation));
154: #if defined(PETSC_HAVE_HPDDM) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES) && defined(PETSC_USE_SHARED_LIBRARIES)
155:   PetscCall(PCRegister(PCHPDDM, PCCreate_HPDDM));
156: #endif
157: #if defined(PETSC_HAVE_H2OPUS)
158:   PetscCall(PCRegister(PCH2OPUS, PCCreate_H2OPUS));
159: #endif
160:   PetscCall(PCRegister(PCMPI, PCCreate_MPI));
161:   PetscFunctionReturn(PETSC_SUCCESS);
162: }