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 : #if defined(SLEPC_HAVE_CHASE)
53 : SLEPC_EXTERN PetscErrorCode EPSCreate_ChASE(EPS);
54 : #endif
55 :
56 : /*@C
57 : EPSRegisterAll - Registers all the eigenvalue solvers in the EPS package.
58 :
59 : Not Collective
60 :
61 : Level: advanced
62 :
63 : .seealso: EPSRegister()
64 : @*/
65 1144 : PetscErrorCode EPSRegisterAll(void)
66 : {
67 1144 : PetscFunctionBegin;
68 1144 : if (EPSRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
69 573 : EPSRegisterAllCalled = PETSC_TRUE;
70 573 : PetscCall(EPSRegister(EPSPOWER,EPSCreate_Power));
71 573 : PetscCall(EPSRegister(EPSSUBSPACE,EPSCreate_Subspace));
72 573 : PetscCall(EPSRegister(EPSARNOLDI,EPSCreate_Arnoldi));
73 573 : PetscCall(EPSRegister(EPSLANCZOS,EPSCreate_Lanczos));
74 573 : PetscCall(EPSRegister(EPSKRYLOVSCHUR,EPSCreate_KrylovSchur));
75 573 : PetscCall(EPSRegister(EPSGD,EPSCreate_GD));
76 573 : PetscCall(EPSRegister(EPSJD,EPSCreate_JD));
77 573 : PetscCall(EPSRegister(EPSRQCG,EPSCreate_RQCG));
78 573 : PetscCall(EPSRegister(EPSLOBPCG,EPSCreate_LOBPCG));
79 573 : PetscCall(EPSRegister(EPSCISS,EPSCreate_CISS));
80 573 : PetscCall(EPSRegister(EPSLYAPII,EPSCreate_LyapII));
81 573 : PetscCall(EPSRegister(EPSLAPACK,EPSCreate_LAPACK));
82 : #if defined(SLEPC_HAVE_ARPACK)
83 573 : PetscCall(EPSRegister(EPSARPACK,EPSCreate_ARPACK));
84 : #endif
85 : #if defined(SLEPC_HAVE_TRLAN)
86 : PetscCall(EPSRegister(EPSTRLAN,EPSCreate_TRLAN));
87 : #endif
88 : #if defined(SLEPC_HAVE_BLOPEX)
89 573 : PetscCall(EPSRegister(EPSBLOPEX,EPSCreate_BLOPEX));
90 : #endif
91 : #if defined(SLEPC_HAVE_PRIMME)
92 573 : PetscCall(EPSRegister(EPSPRIMME,EPSCreate_PRIMME));
93 : #endif
94 : #if defined(SLEPC_HAVE_FEAST)
95 : PetscCall(EPSRegister(EPSFEAST,EPSCreate_FEAST));
96 : #endif
97 : #if defined(SLEPC_HAVE_SCALAPACK)
98 : PetscCall(EPSRegister(EPSSCALAPACK,EPSCreate_ScaLAPACK));
99 : #endif
100 : #if defined(SLEPC_HAVE_ELPA)
101 : PetscCall(EPSRegister(EPSELPA,EPSCreate_ELPA));
102 : #endif
103 : #if defined(SLEPC_HAVE_ELEMENTAL)
104 : PetscCall(EPSRegister(EPSELEMENTAL,EPSCreate_Elemental));
105 : #endif
106 : #if defined(SLEPC_HAVE_EVSL)
107 : PetscCall(EPSRegister(EPSEVSL,EPSCreate_EVSL));
108 : #endif
109 : #if defined(SLEPC_HAVE_CHASE)
110 : PetscCall(EPSRegister(EPSCHASE,EPSCreate_ChASE));
111 : #endif
112 573 : PetscFunctionReturn(PETSC_SUCCESS);
113 : }
114 :
115 : /*@C
116 : EPSMonitorRegisterAll - Registers all the monitors in the EPS package.
117 :
118 : Not Collective
119 :
120 : Level: advanced
121 :
122 : .seealso: EPSMonitorRegister()
123 : @*/
124 573 : PetscErrorCode EPSMonitorRegisterAll(void)
125 : {
126 573 : PetscFunctionBegin;
127 573 : if (EPSMonitorRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
128 573 : EPSMonitorRegisterAllCalled = PETSC_TRUE;
129 :
130 573 : PetscCall(EPSMonitorRegister("first_approximation",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorFirst,NULL,NULL));
131 573 : PetscCall(EPSMonitorRegister("first_approximation",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorFirstDrawLG,EPSMonitorFirstDrawLGCreate,NULL));
132 573 : PetscCall(EPSMonitorRegister("all_approximations",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorAll,NULL,NULL));
133 573 : PetscCall(EPSMonitorRegister("all_approximations",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorAllDrawLG,EPSMonitorAllDrawLGCreate,NULL));
134 573 : PetscCall(EPSMonitorRegister("convergence_history",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,EPSMonitorConverged,EPSMonitorConvergedCreate,EPSMonitorConvergedDestroy));
135 573 : PetscCall(EPSMonitorRegister("convergence_history",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,EPSMonitorConvergedDrawLG,EPSMonitorConvergedDrawLGCreate,EPSMonitorConvergedDestroy));
136 573 : PetscFunctionReturn(PETSC_SUCCESS);
137 : }
|