Actual source code: pfall.c

  1: #include <petscpf.h>
  2: #include <../src/vec/pf/pfimpl.h>

  4: PETSC_INTERN PetscErrorCode PFCreate_Constant(PF, void *);
  5: PETSC_INTERN PetscErrorCode PFCreate_Quick(PF, void *);
  6: PETSC_INTERN PetscErrorCode PFCreate_Identity(PF, void *);
  7: #if defined(PETSC_HAVE_POPEN) && defined(PETSC_USE_SHARED_LIBRARIES) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
  8: PETSC_INTERN PetscErrorCode PFCreate_String(PF, void *);
  9: #endif
 10: #if defined(PETSC_HAVE_MATLAB)
 11: PETSC_INTERN PetscErrorCode PFCreate_Matlab(PF, void *);
 12: #endif

 14: /*@C
 15:   PFRegisterAll - Registers all of the preconditioners in the PF package.

 17:   Not Collective

 19:   Level: advanced

 21: .seealso: `PFRegister()`, `PFRegisterDestroy()`
 22: @*/
 23: PetscErrorCode PFRegisterAll(void)
 24: {
 25:   PetscFunctionBegin;
 26:   if (PFRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
 27:   PFRegisterAllCalled = PETSC_TRUE;

 29:   PetscCall(PFRegister(PFCONSTANT, PFCreate_Constant));
 30:   PetscCall(PFRegister(PFQUICK, PFCreate_Quick));
 31:   PetscCall(PFRegister(PFIDENTITY, PFCreate_Identity));
 32: #if defined(PETSC_HAVE_POPEN) && defined(PETSC_USE_SHARED_LIBRARIES) && defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
 33:   PetscCall(PFRegister(PFSTRING, PFCreate_String));
 34: #endif
 35: #if defined(PETSC_HAVE_MATLAB)
 36:   PetscCall(PFRegister(PFMATLAB, PFCreate_Matlab));
 37: #endif
 38:   PetscFunctionReturn(PETSC_SUCCESS);
 39: }