Actual source code: epsregis.c

slepc-3.20.1 2023-11-27
Report Typos and Errors
  1: /*
  2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  4:    Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain

  6:    This file is part of SLEPc.
  7:    SLEPc is distributed under a 2-clause BSD license (see LICENSE).
  8:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  9: */

 11: #include <slepc/private/epsimpl.h>

 13: SLEPC_EXTERN PetscErrorCode EPSCreate_Power(EPS);
 14: SLEPC_EXTERN PetscErrorCode EPSCreate_Subspace(EPS);
 15: SLEPC_EXTERN PetscErrorCode EPSCreate_Arnoldi(EPS);
 16: SLEPC_EXTERN PetscErrorCode EPSCreate_Lanczos(EPS);
 17: SLEPC_EXTERN PetscErrorCode EPSCreate_KrylovSchur(EPS);
 18: SLEPC_EXTERN PetscErrorCode EPSCreate_GD(EPS);
 19: SLEPC_EXTERN PetscErrorCode EPSCreate_JD(EPS);
 20: SLEPC_EXTERN PetscErrorCode EPSCreate_RQCG(EPS);
 21: SLEPC_EXTERN PetscErrorCode EPSCreate_LOBPCG(EPS);
 22: SLEPC_EXTERN PetscErrorCode EPSCreate_CISS(EPS);
 23: SLEPC_EXTERN PetscErrorCode EPSCreate_LyapII(EPS);
 24: SLEPC_EXTERN PetscErrorCode EPSCreate_LAPACK(EPS);
 25: #if defined(SLEPC_HAVE_ARPACK)
 26: SLEPC_EXTERN PetscErrorCode EPSCreate_ARPACK(EPS);
 27: #endif
 28: #if defined(SLEPC_HAVE_TRLAN)
 29: SLEPC_EXTERN PetscErrorCode EPSCreate_TRLAN(EPS);
 30: #endif
 31: #if defined(SLEPC_HAVE_BLOPEX)
 32: SLEPC_EXTERN PetscErrorCode EPSCreate_BLOPEX(EPS);
 33: #endif
 34: #if defined(SLEPC_HAVE_PRIMME)
 35: SLEPC_EXTERN PetscErrorCode EPSCreate_PRIMME(EPS);
 36: #endif
 37: #if defined(SLEPC_HAVE_FEAST)
 38: SLEPC_EXTERN PetscErrorCode EPSCreate_FEAST(EPS);
 39: #endif
 40: #if defined(SLEPC_HAVE_SCALAPACK)
 41: SLEPC_EXTERN PetscErrorCode EPSCreate_ScaLAPACK(EPS);
 42: #endif
 43: #if defined(SLEPC_HAVE_ELPA)
 44: SLEPC_EXTERN PetscErrorCode EPSCreate_ELPA(EPS);
 45: #endif
 46: #if defined(SLEPC_HAVE_ELEMENTAL)
 47: SLEPC_EXTERN PetscErrorCode EPSCreate_Elemental(EPS);
 48: #endif
 49: #if defined(SLEPC_HAVE_EVSL)
 50: SLEPC_EXTERN PetscErrorCode EPSCreate_EVSL(EPS);
 51: #endif

 53: /*@C
 54:   EPSRegisterAll - Registers all the eigenvalue solvers in the EPS package.

 56:   Not Collective

 58:   Level: advanced

 60: .seealso: EPSRegister()
 61: @*/
 62: PetscErrorCode EPSRegisterAll(void)
 63: {
 64:   PetscFunctionBegin;
 65:   if (EPSRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
 66:   EPSRegisterAllCalled = PETSC_TRUE;
 67:   PetscCall(EPSRegister(EPSPOWER,EPSCreate_Power));
 68:   PetscCall(EPSRegister(EPSSUBSPACE,EPSCreate_Subspace));
 69:   PetscCall(EPSRegister(EPSARNOLDI,EPSCreate_Arnoldi));
 70:   PetscCall(EPSRegister(EPSLANCZOS,EPSCreate_Lanczos));
 71:   PetscCall(EPSRegister(EPSKRYLOVSCHUR,EPSCreate_KrylovSchur));
 72:   PetscCall(EPSRegister(EPSGD,EPSCreate_GD));
 73:   PetscCall(EPSRegister(EPSJD,EPSCreate_JD));
 74:   PetscCall(EPSRegister(EPSRQCG,EPSCreate_RQCG));
 75:   PetscCall(EPSRegister(EPSLOBPCG,EPSCreate_LOBPCG));
 76:   PetscCall(EPSRegister(EPSCISS,EPSCreate_CISS));
 77:   PetscCall(EPSRegister(EPSLYAPII,EPSCreate_LyapII));
 78:   PetscCall(EPSRegister(EPSLAPACK,EPSCreate_LAPACK));
 79: #if defined(SLEPC_HAVE_ARPACK)
 80:   PetscCall(EPSRegister(EPSARPACK,EPSCreate_ARPACK));
 81: #endif
 82: #if defined(SLEPC_HAVE_TRLAN)
 83:   PetscCall(EPSRegister(EPSTRLAN,EPSCreate_TRLAN));
 84: #endif
 85: #if defined(SLEPC_HAVE_BLOPEX)
 86:   PetscCall(EPSRegister(EPSBLOPEX,EPSCreate_BLOPEX));
 87: #endif
 88: #if defined(SLEPC_HAVE_PRIMME)
 89:   PetscCall(EPSRegister(EPSPRIMME,EPSCreate_PRIMME));
 90: #endif
 91: #if defined(SLEPC_HAVE_FEAST)
 92:   PetscCall(EPSRegister(EPSFEAST,EPSCreate_FEAST));
 93: #endif
 94: #if defined(SLEPC_HAVE_SCALAPACK)
 95:   PetscCall(EPSRegister(EPSSCALAPACK,EPSCreate_ScaLAPACK));
 96: #endif
 97: #if defined(SLEPC_HAVE_ELPA)
 98:   PetscCall(EPSRegister(EPSELPA,EPSCreate_ELPA));
 99: #endif
100: #if defined(SLEPC_HAVE_ELEMENTAL)
101:   PetscCall(EPSRegister(EPSELEMENTAL,EPSCreate_Elemental));
102: #endif
103: #if defined(SLEPC_HAVE_EVSL)
104:   PetscCall(EPSRegister(EPSEVSL,EPSCreate_EVSL));
105: #endif
106:   PetscFunctionReturn(PETSC_SUCCESS);
107: }

109: /*@C
110:   EPSMonitorRegisterAll - Registers all the monitors in the EPS package.

112:   Not Collective

114:   Level: advanced

116: .seealso: EPSMonitorRegister()
117: @*/
118: PetscErrorCode EPSMonitorRegisterAll(void)
119: {
120:   PetscFunctionBegin;
121:   if (EPSMonitorRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
122:   EPSMonitorRegisterAllCalled = PETSC_TRUE;

124:   PetscCall(EPSMonitorRegister("first_approximation",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorFirst,NULL,NULL));
125:   PetscCall(EPSMonitorRegister("first_approximation",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorFirstDrawLG,EPSMonitorFirstDrawLGCreate,NULL));
126:   PetscCall(EPSMonitorRegister("all_approximations",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorAll,NULL,NULL));
127:   PetscCall(EPSMonitorRegister("all_approximations",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorAllDrawLG,EPSMonitorAllDrawLGCreate,NULL));
128:   PetscCall(EPSMonitorRegister("convergence_history",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorConverged,EPSMonitorConvergedCreate,EPSMonitorConvergedDestroy));
129:   PetscCall(EPSMonitorRegister("convergence_history",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorConvergedDrawLG,EPSMonitorConvergedDrawLGCreate,EPSMonitorConvergedDestroy));
130:   PetscFunctionReturn(PETSC_SUCCESS);
131: }