Subversion Repositories slepc-dev

Rev

Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
1426 slepc 64
    EPSProjection - determines the type of projection employed
65
    by the eigensolver
66
 
67
    Level: beginner
68
 
69
.seealso: EPSSetProjection(), EPSGetProjection()
70
E*/
71
typedef enum { EPS_RITZ=1,   EPS_HARMONIC,
72
               EPS_REFINED,  EPS_REFINED_HARMONIC } EPSProjection;
73
 
74
/*E
1364 slepc 75
    EPSClass - determines if the eigensolver is one- or two-sided
76
 
77
    Level: intermediate
78
 
79
.seealso: EPSSetClass(), EPSGetClass()
80
E*/
780 dsic.upv.es!jroman 81
typedef enum { EPS_ONE_SIDE, EPS_TWO_SIDE } EPSClass;
82
 
1364 slepc 83
/*E
84
    EPSWhich - determines which part of the spectrum is requested
85
 
86
    Level: intermediate
87
 
88
.seealso: EPSSetWhichEigenpairs(), EPSGetWhichEigenpairs()
89
E*/
6 dsic.upv.es!jroman 90
typedef enum { EPS_LARGEST_MAGNITUDE, EPS_SMALLEST_MAGNITUDE,
91
               EPS_LARGEST_REAL,      EPS_SMALLEST_REAL,
89 dsic.upv.es!antodo 92
               EPS_LARGEST_IMAGINARY, EPS_SMALLEST_IMAGINARY } EPSWhich;
6 dsic.upv.es!jroman 93
 
476 dsic.upv.es!antodo 94
EXTERN PetscErrorCode EPSCreate(MPI_Comm,EPS *);
95
EXTERN PetscErrorCode EPSDestroy(EPS);
96
EXTERN PetscErrorCode EPSSetType(EPS,EPSType);
97
EXTERN PetscErrorCode EPSGetType(EPS,EPSType*);
98
EXTERN PetscErrorCode EPSSetProblemType(EPS,EPSProblemType);
99
EXTERN PetscErrorCode EPSGetProblemType(EPS,EPSProblemType*);
1426 slepc 100
EXTERN PetscErrorCode EPSSetProjection(EPS,EPSProjection);
101
EXTERN PetscErrorCode EPSGetProjection(EPS,EPSProjection*);
780 dsic.upv.es!jroman 102
EXTERN PetscErrorCode EPSSetClass(EPS,EPSClass);
103
EXTERN PetscErrorCode EPSGetClass(EPS,EPSClass*);
476 dsic.upv.es!antodo 104
EXTERN PetscErrorCode EPSSetOperators(EPS,Mat,Mat);
105
EXTERN PetscErrorCode EPSSetFromOptions(EPS);
106
EXTERN PetscErrorCode EPSSetUp(EPS);
107
EXTERN PetscErrorCode EPSSolve(EPS);
108
EXTERN PetscErrorCode EPSView(EPS,PetscViewer);
6 dsic.upv.es!jroman 109
 
842 dsic.upv.es!antodo 110
EXTERN PetscErrorCode EPSInitializePackage(char *);
6 dsic.upv.es!jroman 111
 
1425 slepc 112
EXTERN PetscErrorCode EPSSetTarget(EPS,PetscScalar);
113
EXTERN PetscErrorCode EPSGetTarget(EPS,PetscScalar*);
476 dsic.upv.es!antodo 114
EXTERN PetscErrorCode EPSSetST(EPS,ST);
115
EXTERN PetscErrorCode EPSGetST(EPS,ST*);
1345 slepc 116
EXTERN PetscErrorCode EPSSetIP(EPS,IP);
117
EXTERN PetscErrorCode EPSGetIP(EPS,IP*);
476 dsic.upv.es!antodo 118
EXTERN PetscErrorCode EPSSetTolerances(EPS,PetscReal,int);
119
EXTERN PetscErrorCode EPSGetTolerances(EPS,PetscReal*,int*);
120
EXTERN PetscErrorCode EPSSetDimensions(EPS,int,int);
121
EXTERN PetscErrorCode EPSGetDimensions(EPS,int*,int*);
6 dsic.upv.es!jroman 122
 
476 dsic.upv.es!antodo 123
EXTERN PetscErrorCode EPSGetConverged(EPS,int*);
124
EXTERN PetscErrorCode EPSGetEigenpair(EPS,int,PetscScalar*,PetscScalar*,Vec,Vec);
780 dsic.upv.es!jroman 125
EXTERN PetscErrorCode EPSGetValue(EPS,int,PetscScalar*,PetscScalar*);
126
EXTERN PetscErrorCode EPSGetRightVector(EPS,int,Vec,Vec);
127
EXTERN PetscErrorCode EPSGetLeftVector(EPS,int,Vec,Vec);
476 dsic.upv.es!antodo 128
EXTERN PetscErrorCode EPSComputeRelativeError(EPS,int,PetscReal*);
780 dsic.upv.es!jroman 129
EXTERN PetscErrorCode EPSComputeRelativeErrorLeft(EPS,int,PetscReal*);
476 dsic.upv.es!antodo 130
EXTERN PetscErrorCode EPSComputeResidualNorm(EPS,int,PetscReal*);
780 dsic.upv.es!jroman 131
EXTERN PetscErrorCode EPSComputeResidualNormLeft(EPS,int,PetscReal*);
476 dsic.upv.es!antodo 132
EXTERN PetscErrorCode EPSGetInvariantSubspace(EPS,Vec*);
780 dsic.upv.es!jroman 133
EXTERN PetscErrorCode EPSGetLeftInvariantSubspace(EPS,Vec*);
476 dsic.upv.es!antodo 134
EXTERN PetscErrorCode EPSGetErrorEstimate(EPS,int,PetscReal*);
780 dsic.upv.es!jroman 135
EXTERN PetscErrorCode EPSGetErrorEstimateLeft(EPS,int,PetscReal*);
6 dsic.upv.es!jroman 136
 
1331 slepc 137
EXTERN PetscErrorCode EPSMonitorSet(EPS,PetscErrorCode (*)(EPS,int,int,PetscScalar*,PetscScalar*,PetscReal*,int,void*),
1287 slepc 138
                                    void*,PetscErrorCode (*monitordestroy)(void*));
1331 slepc 139
EXTERN PetscErrorCode EPSMonitorCancel(EPS);
476 dsic.upv.es!antodo 140
EXTERN PetscErrorCode EPSGetMonitorContext(EPS,void **);
141
EXTERN PetscErrorCode EPSGetIterationNumber(EPS,int*);
1209 slepc 142
EXTERN PetscErrorCode EPSGetOperationCounters(EPS,int*,int*,int*);
6 dsic.upv.es!jroman 143
 
476 dsic.upv.es!antodo 144
EXTERN PetscErrorCode EPSSetInitialVector(EPS,Vec);
1384 slepc 145
EXTERN PetscErrorCode EPSGetInitialVector(EPS,Vec*);
780 dsic.upv.es!jroman 146
EXTERN PetscErrorCode EPSSetLeftInitialVector(EPS,Vec);
1384 slepc 147
EXTERN PetscErrorCode EPSGetLeftInitialVector(EPS,Vec*);
476 dsic.upv.es!antodo 148
EXTERN PetscErrorCode EPSSetWhichEigenpairs(EPS,EPSWhich);
149
EXTERN PetscErrorCode EPSGetWhichEigenpairs(EPS,EPSWhich*);
150
EXTERN PetscErrorCode EPSIsGeneralized(EPS,PetscTruth*);
151
EXTERN PetscErrorCode EPSIsHermitian(EPS,PetscTruth*);
6 dsic.upv.es!jroman 152
 
1331 slepc 153
EXTERN PetscErrorCode EPSMonitorDefault(EPS,int,int,PetscScalar*,PetscScalar*,PetscReal*,int,void*);
154
EXTERN PetscErrorCode EPSMonitorLG(EPS,int,int,PetscScalar*,PetscScalar*,PetscReal*,int,void*);
6 dsic.upv.es!jroman 155
 
780 dsic.upv.es!jroman 156
EXTERN PetscErrorCode EPSAttachDeflationSpace(EPS,int,Vec*,PetscTruth);
157
EXTERN PetscErrorCode EPSRemoveDeflationSpace(EPS);
158
 
1248 slepc 159
EXTERN PetscErrorCode EPSSetOptionsPrefix(EPS,const char*);
160
EXTERN PetscErrorCode EPSAppendOptionsPrefix(EPS,const char*);
812 dsic.upv.es!antodo 161
EXTERN PetscErrorCode EPSGetOptionsPrefix(EPS,const char*[]);
6 dsic.upv.es!jroman 162
 
1364 slepc 163
/*E
164
    EPSConvergedReason - reason an eigensolver was said to
165
         have converged or diverged
166
 
167
   Level: beginner
168
 
169
.seealso: EPSSolve(), EPSGetConvergedReason(), EPSSetTolerances()
170
E*/
6 dsic.upv.es!jroman 171
typedef enum {/* converged */
172
              EPS_CONVERGED_TOL                =  2,
173
              /* diverged */
174
              EPS_DIVERGED_ITS                 = -3,
175
              EPS_DIVERGED_BREAKDOWN           = -4,
176
              EPS_DIVERGED_NONSYMMETRIC        = -5,
177
              EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;
178
 
476 dsic.upv.es!antodo 179
EXTERN PetscErrorCode EPSGetConvergedReason(EPS,EPSConvergedReason *);
6 dsic.upv.es!jroman 180
 
476 dsic.upv.es!antodo 181
EXTERN PetscErrorCode EPSSortEigenvalues(int,PetscScalar*,PetscScalar*,EPSWhich,int,int*);
780 dsic.upv.es!jroman 182
EXTERN PetscErrorCode EPSDenseNHEP(int,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*);
183
EXTERN PetscErrorCode EPSDenseGNHEP(int,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*);
1175 slepc 184
EXTERN PetscErrorCode EPSDenseHEP(int,PetscScalar*,int,PetscReal*,PetscScalar*);
676 dsic.upv.es!antodo 185
EXTERN PetscErrorCode EPSDenseGHEP(int,PetscScalar*,PetscScalar*,PetscReal*,PetscScalar*);
1175 slepc 186
EXTERN PetscErrorCode EPSDenseHessenberg(int,int,PetscScalar*,int,PetscScalar*);
1057 slepc 187
EXTERN PetscErrorCode EPSDenseSchur(int,int,PetscScalar*,int,PetscScalar*,PetscScalar*,PetscScalar*);
1174 slepc 188
EXTERN PetscErrorCode EPSSortDenseSchur(int,int,PetscScalar*,int,PetscScalar*,PetscScalar*,PetscScalar*,EPSWhich);
1428 slepc 189
EXTERN PetscErrorCode EPSSortDenseSchurTarget(int,int,PetscScalar*,int,PetscScalar*,PetscScalar*,PetscScalar*,PetscReal);
1175 slepc 190
EXTERN PetscErrorCode EPSDenseTridiagonal(int,PetscScalar*,int,PetscReal*,PetscScalar*);
676 dsic.upv.es!antodo 191
 
1057 slepc 192
EXTERN PetscErrorCode EPSGetStartVector(EPS,int,Vec,PetscTruth*);
780 dsic.upv.es!jroman 193
EXTERN PetscErrorCode EPSGetLeftStartVector(EPS,int,Vec);
6 dsic.upv.es!jroman 194
 
1389 slepc 195
EXTERN PetscErrorCode EPSRegister(const char*,const char*,const char*,int(*)(EPS));
196
#if defined(PETSC_USE_DYNAMIC_LIBRARIES)
197
#define EPSRegisterDynamic(a,b,c,d) EPSRegister(a,b,c,0)
198
#else
199
#define EPSRegisterDynamic(a,b,c,d) EPSRegister(a,b,c,d)
200
#endif
201
EXTERN PetscErrorCode EPSRegisterDestroy(void);
202
 
6 dsic.upv.es!jroman 203
/* --------- options specific to particular eigensolvers -------- */
204
 
1364 slepc 205
/*E
206
    EPSPowerShiftType - determines the type of shift used in the Power iteration
207
 
208
    Level: advanced
209
 
210
.seealso: EPSPowerSetShiftType(), EPSPowerGetShiftType()
211
E*/
444 dsic.upv.es!antodo 212
typedef enum { EPSPOWER_SHIFT_CONSTANT, EPSPOWER_SHIFT_RAYLEIGH,
213
               EPSPOWER_SHIFT_WILKINSON } EPSPowerShiftType;
214
 
476 dsic.upv.es!antodo 215
EXTERN PetscErrorCode EPSPowerSetShiftType(EPS,EPSPowerShiftType);
216
EXTERN PetscErrorCode EPSPowerGetShiftType(EPS,EPSPowerShiftType*);
444 dsic.upv.es!antodo 217
 
1098 slepc 218
EXTERN PetscErrorCode EPSArnoldiSetDelayed(EPS,PetscTruth);
219
EXTERN PetscErrorCode EPSArnoldiGetDelayed(EPS,PetscTruth*);
220
 
1364 slepc 221
/*E
222
    EPSLanczosReorthogType - determines the type of reorthogonalization
223
    used in the Lanczos method
224
 
225
    Level: advanced
226
 
227
.seealso: EPSLanczosSetReorthog(), EPSLanczosGetReorthog()
228
E*/
1068 slepc 229
typedef enum { EPSLANCZOS_REORTHOG_LOCAL,
961 dsic.upv.es!jroman 230
               EPSLANCZOS_REORTHOG_FULL,
231
               EPSLANCZOS_REORTHOG_SELECTIVE,
232
               EPSLANCZOS_REORTHOG_PERIODIC,
1124 slepc 233
               EPSLANCZOS_REORTHOG_PARTIAL,
1173 slepc 234
               EPSLANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;
673 dsic.upv.es!antodo 235
 
905 dsic.upv.es!antodo 236
EXTERN PetscErrorCode EPSLanczosSetReorthog(EPS,EPSLanczosReorthogType);
237
EXTERN PetscErrorCode EPSLanczosGetReorthog(EPS,EPSLanczosReorthogType*);
673 dsic.upv.es!antodo 238
 
476 dsic.upv.es!antodo 239
EXTERN PetscErrorCode EPSBlzpackSetBlockSize(EPS,int);
240
EXTERN PetscErrorCode EPSBlzpackSetInterval(EPS,PetscReal,PetscReal);
241
EXTERN PetscErrorCode EPSBlzpackSetNSteps(EPS,int);
6 dsic.upv.es!jroman 242
 
1364 slepc 243
/*E
244
    EPSPRIMMEMethod - determines the method selected in the PRIMME library
245
 
246
    Level: advanced
247
 
248
.seealso: EPSPRIMMESetMethod(), EPSPRIMMEGetMethod()
249
E*/
1187 slepc 250
typedef enum {
1239 slepc 251
  EPSPRIMME_DYNAMIC,
1187 slepc 252
  EPSPRIMME_DEFAULT_MIN_TIME,
253
  EPSPRIMME_DEFAULT_MIN_MATVECS,
1190 slepc 254
  EPSPRIMME_ARNOLDI,
1187 slepc 255
  EPSPRIMME_GD,
1190 slepc 256
  EPSPRIMME_GD_PLUSK,
257
  EPSPRIMME_GD_OLSEN_PLUSK,
1239 slepc 258
  EPSPRIMME_JD_OLSEN_PLUSK,
1187 slepc 259
  EPSPRIMME_RQI,
260
  EPSPRIMME_JDQR,
261
  EPSPRIMME_JDQMR,
1190 slepc 262
  EPSPRIMME_JDQMR_ETOL,
1187 slepc 263
  EPSPRIMME_SUBSPACE_ITERATION,
1190 slepc 264
  EPSPRIMME_LOBPCG_ORTHOBASIS,
265
  EPSPRIMME_LOBPCG_ORTHOBASIS_WINDOW
266
} EPSPRIMMEMethod;
1187 slepc 267
 
1364 slepc 268
/*E
269
    EPSPRIMMEPrecond - determines the type of preconditioning
270
    used in the PRIMME library
271
 
272
    Level: advanced
273
 
274
.seealso: EPSPRIMMESetPrecond(), EPSPRIMMEGetPrecond()
275
E*/
1190 slepc 276
typedef enum {
277
  EPSPRIMME_NONE,
278
  EPSPRIMME_DIAGONAL
279
} EPSPRIMMEPrecond;
280
 
1187 slepc 281
EXTERN PetscErrorCode EPSPRIMMESetBlockSize(EPS eps,int bs);
1190 slepc 282
EXTERN PetscErrorCode EPSPRIMMESetMethod(EPS eps, EPSPRIMMEMethod method);
283
EXTERN PetscErrorCode EPSPRIMMESetPrecond(EPS eps, EPSPRIMMEPrecond precond);
1187 slepc 284
EXTERN PetscErrorCode EPSPRIMMEGetBlockSize(EPS eps,int *bs);
1190 slepc 285
EXTERN PetscErrorCode EPSPRIMMEGetMethod(EPS eps, EPSPRIMMEMethod *method);
286
EXTERN PetscErrorCode EPSPRIMMEGetPrecond(EPS eps, EPSPRIMMEPrecond *precond);
1187 slepc 287
 
476 dsic.upv.es!antodo 288
PETSC_EXTERN_CXX_END
6 dsic.upv.es!jroman 289
#endif
290