Actual source code: itregis.c

      1: #define PETSCKSP_DLL

     3:  #include src/ksp/ksp/kspimpl.h

      6: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_Richardson(KSP);
      7: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_Chebychev(KSP);
      8: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_CG(KSP);
      9: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_CGNE(KSP);
     10: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_TCQMR(KSP);
     11: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_GMRES(KSP);
     12: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_BCGS(KSP);
     13: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_BCGSL(KSP);
     14: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_CGS(KSP);
     15: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_TFQMR(KSP);
     16: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_LSQR(KSP);
     17: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_PREONLY(KSP);
     18: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_CR(KSP);
     19: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_QCG(KSP);
     20: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_BiCG(KSP);
     21: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_FGMRES(KSP);
     22: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_MINRES(KSP);
     23: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_SYMMLQ(KSP);
     24: EXTERN PetscErrorCode PETSCKSP_DLLEXPORT KSPCreate_LGMRES(KSP);
     26:
     27: /*
     28:     This is used by KSPSetType() to make sure that at least one
     29:     KSPRegisterAll() is called. In general, if there is more than one
     30:     DLL, then KSPRegisterAll() may be called several times.
     31: */
     32: EXTERN PetscTruth KSPRegisterAllCalled;

     36: /*@C
     37:   KSPRegisterAll - Registers all of the Krylov subspace methods in the KSP package.

     39:   Not Collective

     41:   Level: advanced

     43: .keywords: KSP, register, all

     45: .seealso:  KSPRegisterDestroy()
     46: @*/
     47: PetscErrorCode PETSCKSP_DLLEXPORT KSPRegisterAll(const char path[])
     48: {

     52:   KSPRegisterAllCalled = PETSC_TRUE;

     54:   KSPRegisterDynamic(KSPCG,         path,"KSPCreate_CG",        KSPCreate_CG);
     55:   KSPRegisterDynamic(KSPCGNE,       path,"KSPCreate_CGNE",      KSPCreate_CGNE);
     56:   KSPRegisterDynamic(KSPRICHARDSON, path,"KSPCreate_Richardson",KSPCreate_Richardson);
     57:   KSPRegisterDynamic(KSPCHEBYCHEV,  path,"KSPCreate_Chebychev", KSPCreate_Chebychev);
     58:   KSPRegisterDynamic(KSPGMRES,      path,"KSPCreate_GMRES",     KSPCreate_GMRES);
     59:   KSPRegisterDynamic(KSPTCQMR,      path,"KSPCreate_TCQMR",     KSPCreate_TCQMR);
     60:   KSPRegisterDynamic(KSPBCGS,       path,"KSPCreate_BCGS",      KSPCreate_BCGS);
     61:   KSPRegisterDynamic(KSPBCGSL,      path,"KSPCreate_BCGSL",     KSPCreate_BCGSL);
     62:   KSPRegisterDynamic(KSPCGS,        path,"KSPCreate_CGS",       KSPCreate_CGS);
     63:   KSPRegisterDynamic(KSPTFQMR,      path,"KSPCreate_TFQMR",     KSPCreate_TFQMR);
     64:   KSPRegisterDynamic(KSPCR,         path,"KSPCreate_CR",        KSPCreate_CR);
     65:   KSPRegisterDynamic(KSPLSQR,       path,"KSPCreate_LSQR",      KSPCreate_LSQR);
     66:   KSPRegisterDynamic(KSPPREONLY,    path,"KSPCreate_PREONLY",   KSPCreate_PREONLY);
     67:   KSPRegisterDynamic(KSPQCG,        path,"KSPCreate_QCG",       KSPCreate_QCG);
     68:   KSPRegisterDynamic(KSPBICG,       path,"KSPCreate_BiCG",      KSPCreate_BiCG);
     69:   KSPRegisterDynamic(KSPFGMRES,     path,"KSPCreate_FGMRES",    KSPCreate_FGMRES);
     70:   KSPRegisterDynamic(KSPMINRES,     path,"KSPCreate_MINRES",    KSPCreate_MINRES);
     71:   KSPRegisterDynamic(KSPSYMMLQ,     path,"KSPCreate_SYMMLQ",    KSPCreate_SYMMLQ);
     72:   KSPRegisterDynamic(KSPLGMRES,     path,"KSPCreate_LGMRES",    KSPCreate_LGMRES);
     73:   return(0);
     74: }