1 2 #include <petscpf.h> /*I "petscpf.h" I*/ 3 #include <../src/vec/pf/pfimpl.h> 4 5 PETSC_EXTERN PetscErrorCode PFCreate_Constant(PF, void *); 6 PETSC_EXTERN PetscErrorCode PFCreate_Quick(PF, void *); 7 PETSC_EXTERN PetscErrorCode PFCreate_Identity(PF, void *); 8 #if defined(PETSC_HAVE_POPEN) && defined(PETSC_USE_SHARED_LIBRARIES) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES) 9 PETSC_EXTERN PetscErrorCode PFCreate_String(PF, void *); 10 #endif 11 #if defined(PETSC_HAVE_MATLAB) 12 PETSC_EXTERN PetscErrorCode PFCreate_Matlab(PF, void *); 13 #endif 14 15 /*@C 16 PFRegisterAll - Registers all of the preconditioners in the PF package. 17 18 Not Collective 19 20 Level: advanced 21 22 .seealso: `PFRegister()`, `PFRegisterDestroy()` 23 @*/ 24 PetscErrorCode PFRegisterAll(void) 25 { 26 PetscFunctionBegin; 27 if (PFRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS); 28 PFRegisterAllCalled = PETSC_TRUE; 29 30 PetscCall(PFRegister(PFCONSTANT, PFCreate_Constant)); 31 PetscCall(PFRegister(PFQUICK, PFCreate_Quick)); 32 PetscCall(PFRegister(PFIDENTITY, PFCreate_Identity)); 33 #if defined(PETSC_HAVE_POPEN) && defined(PETSC_USE_SHARED_LIBRARIES) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES) 34 PetscCall(PFRegister(PFSTRING, PFCreate_String)); 35 #endif 36 #if defined(PETSC_HAVE_MATLAB) 37 PetscCall(PFRegister(PFMATLAB, PFCreate_Matlab)); 38 #endif 39 PetscFunctionReturn(PETSC_SUCCESS); 40 } 41