| 6 |
dsic.upv.es!jroman |
1 |
/*
|
|
|
2 |
User interface for the SLEPC eigenproblem solvers.
|
| 1376 |
slepc |
3 |
|
|
|
4 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
5 |
SLEPc - Scalable Library for Eigenvalue Problem Computations
|
|
|
6 |
Copyright (c) 2002-2007, Universidad Politecnica de Valencia, Spain
|
|
|
7 |
|
|
|
8 |
This file is part of SLEPc. See the README file for conditions of use
|
|
|
9 |
and additional information.
|
|
|
10 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 6 |
dsic.upv.es!jroman |
11 |
*/
|
| 1376 |
slepc |
12 |
|
| 6 |
dsic.upv.es!jroman |
13 |
#if !defined(__SLEPCEPS_H)
|
|
|
14 |
#define __SLEPCEPS_H
|
|
|
15 |
#include "slepc.h"
|
|
|
16 |
#include "slepcst.h"
|
| 1345 |
slepc |
17 |
#include "slepcip.h"
|
| 476 |
dsic.upv.es!antodo |
18 |
PETSC_EXTERN_CXX_BEGIN
|
| 6 |
dsic.upv.es!jroman |
19 |
|
| 476 |
dsic.upv.es!antodo |
20 |
extern PetscCookie EPS_COOKIE;
|
| 6 |
dsic.upv.es!jroman |
21 |
|
|
|
22 |
/*S
|
|
|
23 |
EPS - Abstract SLEPc object that manages all the eigenvalue
|
|
|
24 |
problem solvers.
|
|
|
25 |
|
|
|
26 |
Level: beginner
|
|
|
27 |
|
|
|
28 |
.seealso: EPSCreate(), ST
|
|
|
29 |
S*/
|
|
|
30 |
typedef struct _p_EPS* EPS;
|
|
|
31 |
|
| 1364 |
slepc |
32 |
/*E
|
|
|
33 |
EPSType - String with the name of a SLEPc eigensolver
|
|
|
34 |
|
|
|
35 |
Level: beginner
|
|
|
36 |
|
|
|
37 |
.seealso: EPSSetType(), EPS
|
|
|
38 |
E*/
|
| 1252 |
slepc |
39 |
#define EPSType const char*
|
| 6 |
dsic.upv.es!jroman |
40 |
#define EPSPOWER "power"
|
|
|
41 |
#define EPSSUBSPACE "subspace"
|
|
|
42 |
#define EPSARNOLDI "arnoldi"
|
| 646 |
dsic.upv.es!antodo |
43 |
#define EPSLANCZOS "lanczos"
|
| 1171 |
slepc |
44 |
#define EPSKRYLOVSCHUR "krylovschur"
|
| 6 |
dsic.upv.es!jroman |
45 |
#define EPSLAPACK "lapack"
|
|
|
46 |
/* the next ones are interfaces to external libraries */
|
|
|
47 |
#define EPSARPACK "arpack"
|
|
|
48 |
#define EPSBLZPACK "blzpack"
|
|
|
49 |
#define EPSTRLAN "trlan"
|
| 1195 |
slepc |
50 |
#define EPSBLOPEX "blopex"
|
| 1187 |
slepc |
51 |
#define EPSPRIMME "primme"
|
| 6 |
dsic.upv.es!jroman |
52 |
|
| 1364 |
slepc |
53 |
/*E
|
|
|
54 |
EPSProblemType - determines the type of eigenvalue problem
|
|
|
55 |
|
|
|
56 |
Level: beginner
|
|
|
57 |
|
|
|
58 |
.seealso: EPSSetProblemType(), EPSGetProblemType()
|
|
|
59 |
E*/
|
| 6 |
dsic.upv.es!jroman |
60 |
typedef enum { EPS_HEP=1, EPS_GHEP,
|
| 1358 |
slepc |
61 |
EPS_NHEP, EPS_GNHEP, EPS_PGNHEP } EPSProblemType;
|
| 6 |
dsic.upv.es!jroman |
62 |
|
| 1364 |
slepc |
63 |
/*E
|
|
|
64 |
EPSClass - determines if the eigensolver is one- or two-sided
|
|
|
65 |
|
|
|
66 |
Level: intermediate
|
|
|
67 |
|
|
|
68 |
.seealso: EPSSetClass(), EPSGetClass()
|
|
|
69 |
E*/
|
| 780 |
dsic.upv.es!jroman |
70 |
typedef enum { EPS_ONE_SIDE, EPS_TWO_SIDE } EPSClass;
|
|
|
71 |
|
| 1364 |
slepc |
72 |
/*E
|
|
|
73 |
EPSWhich - determines which part of the spectrum is requested
|
|
|
74 |
|
|
|
75 |
Level: intermediate
|
|
|
76 |
|
|
|
77 |
.seealso: EPSSetWhichEigenpairs(), EPSGetWhichEigenpairs()
|
|
|
78 |
E*/
|
| 6 |
dsic.upv.es!jroman |
79 |
typedef enum { EPS_LARGEST_MAGNITUDE, EPS_SMALLEST_MAGNITUDE,
|
|
|
80 |
EPS_LARGEST_REAL, EPS_SMALLEST_REAL,
|
| 89 |
dsic.upv.es!antodo |
81 |
EPS_LARGEST_IMAGINARY, EPS_SMALLEST_IMAGINARY } EPSWhich;
|
| 6 |
dsic.upv.es!jroman |
82 |
|
| 476 |
dsic.upv.es!antodo |
83 |
EXTERN PetscErrorCode EPSCreate(MPI_Comm,EPS *);
|
|
|
84 |
EXTERN PetscErrorCode EPSDestroy(EPS);
|
|
|
85 |
EXTERN PetscErrorCode EPSSetType(EPS,EPSType);
|
|
|
86 |
EXTERN PetscErrorCode EPSGetType(EPS,EPSType*);
|
|
|
87 |
EXTERN PetscErrorCode EPSSetProblemType(EPS,EPSProblemType);
|
|
|
88 |
EXTERN PetscErrorCode EPSGetProblemType(EPS,EPSProblemType*);
|
| 780 |
dsic.upv.es!jroman |
89 |
EXTERN PetscErrorCode EPSSetClass(EPS,EPSClass);
|
|
|
90 |
EXTERN PetscErrorCode EPSGetClass(EPS,EPSClass*);
|
| 476 |
dsic.upv.es!antodo |
91 |
EXTERN PetscErrorCode EPSSetOperators(EPS,Mat,Mat);
|
|
|
92 |
EXTERN PetscErrorCode EPSSetFromOptions(EPS);
|
|
|
93 |
EXTERN PetscErrorCode EPSSetUp(EPS);
|
|
|
94 |
EXTERN PetscErrorCode EPSSolve(EPS);
|
|
|
95 |
EXTERN PetscErrorCode EPSView(EPS,PetscViewer);
|
| 6 |
dsic.upv.es!jroman |
96 |
|
| 842 |
dsic.upv.es!antodo |
97 |
EXTERN PetscErrorCode EPSInitializePackage(char *);
|
| 6 |
dsic.upv.es!jroman |
98 |
|
| 476 |
dsic.upv.es!antodo |
99 |
EXTERN PetscErrorCode EPSSetST(EPS,ST);
|
|
|
100 |
EXTERN PetscErrorCode EPSGetST(EPS,ST*);
|
| 1345 |
slepc |
101 |
EXTERN PetscErrorCode EPSSetIP(EPS,IP);
|
|
|
102 |
EXTERN PetscErrorCode EPSGetIP(EPS,IP*);
|
| 476 |
dsic.upv.es!antodo |
103 |
EXTERN PetscErrorCode EPSSetTolerances(EPS,PetscReal,int);
|
|
|
104 |
EXTERN PetscErrorCode EPSGetTolerances(EPS,PetscReal*,int*);
|
|
|
105 |
EXTERN PetscErrorCode EPSSetDimensions(EPS,int,int);
|
|
|
106 |
EXTERN PetscErrorCode EPSGetDimensions(EPS,int*,int*);
|
| 6 |
dsic.upv.es!jroman |
107 |
|
| 476 |
dsic.upv.es!antodo |
108 |
EXTERN PetscErrorCode EPSGetConverged(EPS,int*);
|
|
|
109 |
EXTERN PetscErrorCode EPSGetEigenpair(EPS,int,PetscScalar*,PetscScalar*,Vec,Vec);
|
| 780 |
dsic.upv.es!jroman |
110 |
EXTERN PetscErrorCode EPSGetValue(EPS,int,PetscScalar*,PetscScalar*);
|
|
|
111 |
EXTERN PetscErrorCode EPSGetRightVector(EPS,int,Vec,Vec);
|
|
|
112 |
EXTERN PetscErrorCode EPSGetLeftVector(EPS,int,Vec,Vec);
|
| 476 |
dsic.upv.es!antodo |
113 |
EXTERN PetscErrorCode EPSComputeRelativeError(EPS,int,PetscReal*);
|
| 780 |
dsic.upv.es!jroman |
114 |
EXTERN PetscErrorCode EPSComputeRelativeErrorLeft(EPS,int,PetscReal*);
|
| 476 |
dsic.upv.es!antodo |
115 |
EXTERN PetscErrorCode EPSComputeResidualNorm(EPS,int,PetscReal*);
|
| 780 |
dsic.upv.es!jroman |
116 |
EXTERN PetscErrorCode EPSComputeResidualNormLeft(EPS,int,PetscReal*);
|
| 476 |
dsic.upv.es!antodo |
117 |
EXTERN PetscErrorCode EPSGetInvariantSubspace(EPS,Vec*);
|
| 780 |
dsic.upv.es!jroman |
118 |
EXTERN PetscErrorCode EPSGetLeftInvariantSubspace(EPS,Vec*);
|
| 476 |
dsic.upv.es!antodo |
119 |
EXTERN PetscErrorCode EPSGetErrorEstimate(EPS,int,PetscReal*);
|
| 780 |
dsic.upv.es!jroman |
120 |
EXTERN PetscErrorCode EPSGetErrorEstimateLeft(EPS,int,PetscReal*);
|
| 6 |
dsic.upv.es!jroman |
121 |
|
| 1331 |
slepc |
122 |
EXTERN PetscErrorCode EPSMonitorSet(EPS,PetscErrorCode (*)(EPS,int,int,PetscScalar*,PetscScalar*,PetscReal*,int,void*),
|
| 1287 |
slepc |
123 |
void*,PetscErrorCode (*monitordestroy)(void*));
|
| 1331 |
slepc |
124 |
EXTERN PetscErrorCode EPSMonitorCancel(EPS);
|
| 476 |
dsic.upv.es!antodo |
125 |
EXTERN PetscErrorCode EPSGetMonitorContext(EPS,void **);
|
|
|
126 |
EXTERN PetscErrorCode EPSGetIterationNumber(EPS,int*);
|
| 1209 |
slepc |
127 |
EXTERN PetscErrorCode EPSGetOperationCounters(EPS,int*,int*,int*);
|
| 6 |
dsic.upv.es!jroman |
128 |
|
| 476 |
dsic.upv.es!antodo |
129 |
EXTERN PetscErrorCode EPSSetInitialVector(EPS,Vec);
|
| 1384 |
slepc |
130 |
EXTERN PetscErrorCode EPSGetInitialVector(EPS,Vec*);
|
| 780 |
dsic.upv.es!jroman |
131 |
EXTERN PetscErrorCode EPSSetLeftInitialVector(EPS,Vec);
|
| 1384 |
slepc |
132 |
EXTERN PetscErrorCode EPSGetLeftInitialVector(EPS,Vec*);
|
| 476 |
dsic.upv.es!antodo |
133 |
EXTERN PetscErrorCode EPSSetWhichEigenpairs(EPS,EPSWhich);
|
|
|
134 |
EXTERN PetscErrorCode EPSGetWhichEigenpairs(EPS,EPSWhich*);
|
|
|
135 |
EXTERN PetscErrorCode EPSIsGeneralized(EPS,PetscTruth*);
|
|
|
136 |
EXTERN PetscErrorCode EPSIsHermitian(EPS,PetscTruth*);
|
| 6 |
dsic.upv.es!jroman |
137 |
|
| 1331 |
slepc |
138 |
EXTERN PetscErrorCode EPSMonitorDefault(EPS,int,int,PetscScalar*,PetscScalar*,PetscReal*,int,void*);
|
|
|
139 |
EXTERN PetscErrorCode EPSMonitorLG(EPS,int,int,PetscScalar*,PetscScalar*,PetscReal*,int,void*);
|
| 6 |
dsic.upv.es!jroman |
140 |
|
| 780 |
dsic.upv.es!jroman |
141 |
EXTERN PetscErrorCode EPSAttachDeflationSpace(EPS,int,Vec*,PetscTruth);
|
|
|
142 |
EXTERN PetscErrorCode EPSRemoveDeflationSpace(EPS);
|
|
|
143 |
|
| 1248 |
slepc |
144 |
EXTERN PetscErrorCode EPSSetOptionsPrefix(EPS,const char*);
|
|
|
145 |
EXTERN PetscErrorCode EPSAppendOptionsPrefix(EPS,const char*);
|
| 812 |
dsic.upv.es!antodo |
146 |
EXTERN PetscErrorCode EPSGetOptionsPrefix(EPS,const char*[]);
|
| 6 |
dsic.upv.es!jroman |
147 |
|
| 1364 |
slepc |
148 |
/*E
|
|
|
149 |
EPSConvergedReason - reason an eigensolver was said to
|
|
|
150 |
have converged or diverged
|
|
|
151 |
|
|
|
152 |
Level: beginner
|
|
|
153 |
|
|
|
154 |
.seealso: EPSSolve(), EPSGetConvergedReason(), EPSSetTolerances()
|
|
|
155 |
E*/
|
| 6 |
dsic.upv.es!jroman |
156 |
typedef enum {/* converged */
|
|
|
157 |
EPS_CONVERGED_TOL = 2,
|
|
|
158 |
/* diverged */
|
|
|
159 |
EPS_DIVERGED_ITS = -3,
|
|
|
160 |
EPS_DIVERGED_BREAKDOWN = -4,
|
|
|
161 |
EPS_DIVERGED_NONSYMMETRIC = -5,
|
|
|
162 |
EPS_CONVERGED_ITERATING = 0} EPSConvergedReason;
|
|
|
163 |
|
| 476 |
dsic.upv.es!antodo |
164 |
EXTERN PetscErrorCode EPSGetConvergedReason(EPS,EPSConvergedReason *);
|
| 6 |
dsic.upv.es!jroman |
165 |
|
| 476 |
dsic.upv.es!antodo |
166 |
EXTERN PetscErrorCode EPSSortEigenvalues(int,PetscScalar*,PetscScalar*,EPSWhich,int,int*);
|
| 780 |
dsic.upv.es!jroman |
167 |
EXTERN PetscErrorCode EPSDenseNHEP(int,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*);
|
|
|
168 |
EXTERN PetscErrorCode EPSDenseGNHEP(int,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*);
|
| 1175 |
slepc |
169 |
EXTERN PetscErrorCode EPSDenseHEP(int,PetscScalar*,int,PetscReal*,PetscScalar*);
|
| 676 |
dsic.upv.es!antodo |
170 |
EXTERN PetscErrorCode EPSDenseGHEP(int,PetscScalar*,PetscScalar*,PetscReal*,PetscScalar*);
|
| 1175 |
slepc |
171 |
EXTERN PetscErrorCode EPSDenseHessenberg(int,int,PetscScalar*,int,PetscScalar*);
|
| 1057 |
slepc |
172 |
EXTERN PetscErrorCode EPSDenseSchur(int,int,PetscScalar*,int,PetscScalar*,PetscScalar*,PetscScalar*);
|
| 1174 |
slepc |
173 |
EXTERN PetscErrorCode EPSSortDenseSchur(int,int,PetscScalar*,int,PetscScalar*,PetscScalar*,PetscScalar*,EPSWhich);
|
| 1175 |
slepc |
174 |
EXTERN PetscErrorCode EPSDenseTridiagonal(int,PetscScalar*,int,PetscReal*,PetscScalar*);
|
| 676 |
dsic.upv.es!antodo |
175 |
|
| 1057 |
slepc |
176 |
EXTERN PetscErrorCode EPSGetStartVector(EPS,int,Vec,PetscTruth*);
|
| 780 |
dsic.upv.es!jroman |
177 |
EXTERN PetscErrorCode EPSGetLeftStartVector(EPS,int,Vec);
|
| 6 |
dsic.upv.es!jroman |
178 |
|
|
|
179 |
/* --------- options specific to particular eigensolvers -------- */
|
|
|
180 |
|
| 1364 |
slepc |
181 |
/*E
|
|
|
182 |
EPSPowerShiftType - determines the type of shift used in the Power iteration
|
|
|
183 |
|
|
|
184 |
Level: advanced
|
|
|
185 |
|
|
|
186 |
.seealso: EPSPowerSetShiftType(), EPSPowerGetShiftType()
|
|
|
187 |
E*/
|
| 444 |
dsic.upv.es!antodo |
188 |
typedef enum { EPSPOWER_SHIFT_CONSTANT, EPSPOWER_SHIFT_RAYLEIGH,
|
|
|
189 |
EPSPOWER_SHIFT_WILKINSON } EPSPowerShiftType;
|
|
|
190 |
|
| 476 |
dsic.upv.es!antodo |
191 |
EXTERN PetscErrorCode EPSPowerSetShiftType(EPS,EPSPowerShiftType);
|
|
|
192 |
EXTERN PetscErrorCode EPSPowerGetShiftType(EPS,EPSPowerShiftType*);
|
| 444 |
dsic.upv.es!antodo |
193 |
|
| 1098 |
slepc |
194 |
EXTERN PetscErrorCode EPSArnoldiSetDelayed(EPS,PetscTruth);
|
|
|
195 |
EXTERN PetscErrorCode EPSArnoldiGetDelayed(EPS,PetscTruth*);
|
|
|
196 |
|
| 1364 |
slepc |
197 |
/*E
|
|
|
198 |
EPSLanczosReorthogType - determines the type of reorthogonalization
|
|
|
199 |
used in the Lanczos method
|
|
|
200 |
|
|
|
201 |
Level: advanced
|
|
|
202 |
|
|
|
203 |
.seealso: EPSLanczosSetReorthog(), EPSLanczosGetReorthog()
|
|
|
204 |
E*/
|
| 1068 |
slepc |
205 |
typedef enum { EPSLANCZOS_REORTHOG_LOCAL,
|
| 961 |
dsic.upv.es!jroman |
206 |
EPSLANCZOS_REORTHOG_FULL,
|
|
|
207 |
EPSLANCZOS_REORTHOG_SELECTIVE,
|
|
|
208 |
EPSLANCZOS_REORTHOG_PERIODIC,
|
| 1124 |
slepc |
209 |
EPSLANCZOS_REORTHOG_PARTIAL,
|
| 1173 |
slepc |
210 |
EPSLANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;
|
| 673 |
dsic.upv.es!antodo |
211 |
|
| 905 |
dsic.upv.es!antodo |
212 |
EXTERN PetscErrorCode EPSLanczosSetReorthog(EPS,EPSLanczosReorthogType);
|
|
|
213 |
EXTERN PetscErrorCode EPSLanczosGetReorthog(EPS,EPSLanczosReorthogType*);
|
| 673 |
dsic.upv.es!antodo |
214 |
|
| 476 |
dsic.upv.es!antodo |
215 |
EXTERN PetscErrorCode EPSBlzpackSetBlockSize(EPS,int);
|
|
|
216 |
EXTERN PetscErrorCode EPSBlzpackSetInterval(EPS,PetscReal,PetscReal);
|
|
|
217 |
EXTERN PetscErrorCode EPSBlzpackSetNSteps(EPS,int);
|
| 6 |
dsic.upv.es!jroman |
218 |
|
| 1364 |
slepc |
219 |
/*E
|
|
|
220 |
EPSPRIMMEMethod - determines the method selected in the PRIMME library
|
|
|
221 |
|
|
|
222 |
Level: advanced
|
|
|
223 |
|
|
|
224 |
.seealso: EPSPRIMMESetMethod(), EPSPRIMMEGetMethod()
|
|
|
225 |
E*/
|
| 1187 |
slepc |
226 |
typedef enum {
|
| 1239 |
slepc |
227 |
EPSPRIMME_DYNAMIC,
|
| 1187 |
slepc |
228 |
EPSPRIMME_DEFAULT_MIN_TIME,
|
|
|
229 |
EPSPRIMME_DEFAULT_MIN_MATVECS,
|
| 1190 |
slepc |
230 |
EPSPRIMME_ARNOLDI,
|
| 1187 |
slepc |
231 |
EPSPRIMME_GD,
|
| 1190 |
slepc |
232 |
EPSPRIMME_GD_PLUSK,
|
|
|
233 |
EPSPRIMME_GD_OLSEN_PLUSK,
|
| 1239 |
slepc |
234 |
EPSPRIMME_JD_OLSEN_PLUSK,
|
| 1187 |
slepc |
235 |
EPSPRIMME_RQI,
|
|
|
236 |
EPSPRIMME_JDQR,
|
|
|
237 |
EPSPRIMME_JDQMR,
|
| 1190 |
slepc |
238 |
EPSPRIMME_JDQMR_ETOL,
|
| 1187 |
slepc |
239 |
EPSPRIMME_SUBSPACE_ITERATION,
|
| 1190 |
slepc |
240 |
EPSPRIMME_LOBPCG_ORTHOBASIS,
|
|
|
241 |
EPSPRIMME_LOBPCG_ORTHOBASIS_WINDOW
|
|
|
242 |
} EPSPRIMMEMethod;
|
| 1187 |
slepc |
243 |
|
| 1364 |
slepc |
244 |
/*E
|
|
|
245 |
EPSPRIMMEPrecond - determines the type of preconditioning
|
|
|
246 |
used in the PRIMME library
|
|
|
247 |
|
|
|
248 |
Level: advanced
|
|
|
249 |
|
|
|
250 |
.seealso: EPSPRIMMESetPrecond(), EPSPRIMMEGetPrecond()
|
|
|
251 |
E*/
|
| 1190 |
slepc |
252 |
typedef enum {
|
|
|
253 |
EPSPRIMME_NONE,
|
|
|
254 |
EPSPRIMME_DIAGONAL
|
|
|
255 |
} EPSPRIMMEPrecond;
|
|
|
256 |
|
| 1187 |
slepc |
257 |
EXTERN PetscErrorCode EPSPRIMMESetBlockSize(EPS eps,int bs);
|
| 1190 |
slepc |
258 |
EXTERN PetscErrorCode EPSPRIMMESetMethod(EPS eps, EPSPRIMMEMethod method);
|
|
|
259 |
EXTERN PetscErrorCode EPSPRIMMESetPrecond(EPS eps, EPSPRIMMEPrecond precond);
|
| 1187 |
slepc |
260 |
EXTERN PetscErrorCode EPSPRIMMEGetBlockSize(EPS eps,int *bs);
|
| 1190 |
slepc |
261 |
EXTERN PetscErrorCode EPSPRIMMEGetMethod(EPS eps, EPSPRIMMEMethod *method);
|
|
|
262 |
EXTERN PetscErrorCode EPSPRIMMEGetPrecond(EPS eps, EPSPRIMMEPrecond *precond);
|
| 1187 |
slepc |
263 |
|
| 476 |
dsic.upv.es!antodo |
264 |
PETSC_EXTERN_CXX_END
|
| 6 |
dsic.upv.es!jroman |
265 |
#endif
|
|
|
266 |
|