Line data Source code
1 : /*
2 : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3 : SLEPc - Scalable Library for Eigenvalue Problem Computations
4 : Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain
5 :
6 : This file is part of SLEPc.
7 : SLEPc is distributed under a 2-clause BSD license (see LICENSE).
8 : - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
9 : */
10 :
11 : #include <slepc/private/epsimpl.h> /*I "slepceps.h" I*/
12 :
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
52 :
53 : /*@C
54 : EPSRegisterAll - Registers all the eigenvalue solvers in the EPS package.
55 :
56 : Not Collective
57 :
58 : Level: advanced
59 :
60 : .seealso: EPSRegister()
61 : @*/
62 1114 : PetscErrorCode EPSRegisterAll(void)
63 : {
64 1114 : PetscFunctionBegin;
65 1114 : if (EPSRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
66 558 : EPSRegisterAllCalled = PETSC_TRUE;
67 558 : PetscCall(EPSRegister(EPSPOWER,EPSCreate_Power));
68 558 : PetscCall(EPSRegister(EPSSUBSPACE,EPSCreate_Subspace));
69 558 : PetscCall(EPSRegister(EPSARNOLDI,EPSCreate_Arnoldi));
70 558 : PetscCall(EPSRegister(EPSLANCZOS,EPSCreate_Lanczos));
71 558 : PetscCall(EPSRegister(EPSKRYLOVSCHUR,EPSCreate_KrylovSchur));
72 558 : PetscCall(EPSRegister(EPSGD,EPSCreate_GD));
73 558 : PetscCall(EPSRegister(EPSJD,EPSCreate_JD));
74 558 : PetscCall(EPSRegister(EPSRQCG,EPSCreate_RQCG));
75 558 : PetscCall(EPSRegister(EPSLOBPCG,EPSCreate_LOBPCG));
76 558 : PetscCall(EPSRegister(EPSCISS,EPSCreate_CISS));
77 558 : PetscCall(EPSRegister(EPSLYAPII,EPSCreate_LyapII));
78 558 : PetscCall(EPSRegister(EPSLAPACK,EPSCreate_LAPACK));
79 : #if defined(SLEPC_HAVE_ARPACK)
80 558 : 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 558 : PetscCall(EPSRegister(EPSBLOPEX,EPSCreate_BLOPEX));
87 : #endif
88 : #if defined(SLEPC_HAVE_PRIMME)
89 558 : 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 558 : PetscFunctionReturn(PETSC_SUCCESS);
107 : }
108 :
109 : /*@C
110 : EPSMonitorRegisterAll - Registers all the monitors in the EPS package.
111 :
112 : Not Collective
113 :
114 : Level: advanced
115 :
116 : .seealso: EPSMonitorRegister()
117 : @*/
118 558 : PetscErrorCode EPSMonitorRegisterAll(void)
119 : {
120 558 : PetscFunctionBegin;
121 558 : if (EPSMonitorRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
122 558 : EPSMonitorRegisterAllCalled = PETSC_TRUE;
123 :
124 558 : PetscCall(EPSMonitorRegister("first_approximation",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorFirst,NULL,NULL));
125 558 : PetscCall(EPSMonitorRegister("first_approximation",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorFirstDrawLG,EPSMonitorFirstDrawLGCreate,NULL));
126 558 : PetscCall(EPSMonitorRegister("all_approximations",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorAll,NULL,NULL));
127 558 : PetscCall(EPSMonitorRegister("all_approximations",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorAllDrawLG,EPSMonitorAllDrawLGCreate,NULL));
128 558 : PetscCall(EPSMonitorRegister("convergence_history",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorConverged,EPSMonitorConvergedCreate,EPSMonitorConvergedDestroy));
129 558 : PetscCall(EPSMonitorRegister("convergence_history",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorConvergedDrawLG,EPSMonitorConvergedDrawLGCreate,EPSMonitorConvergedDestroy));
130 558 : PetscFunctionReturn(PETSC_SUCCESS);
131 : }
|