| 6 |
dsic.upv.es!jroman |
1 |
/*
|
|
|
2 |
User interface for the SLEPC eigenproblem solvers.
|
| 1376 |
slepc |
3 |
|
|
|
4 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 1672 |
slepc |
5 |
SLEPc - Scalable Library for Eigenvalue Problem Computations
|
| 2116 |
eromero |
6 |
Copyright (c) 2002-2010, Universidad Politecnica de Valencia, Spain
|
| 1376 |
slepc |
7 |
|
| 1672 |
slepc |
8 |
This file is part of SLEPc.
|
|
|
9 |
|
|
|
10 |
SLEPc is free software: you can redistribute it and/or modify it under the
|
|
|
11 |
terms of version 3 of the GNU Lesser General Public License as published by
|
|
|
12 |
the Free Software Foundation.
|
|
|
13 |
|
|
|
14 |
SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
15 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
16 |
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
|
|
17 |
more details.
|
|
|
18 |
|
|
|
19 |
You should have received a copy of the GNU Lesser General Public License
|
|
|
20 |
along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
|
| 1376 |
slepc |
21 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 6 |
dsic.upv.es!jroman |
22 |
*/
|
| 1376 |
slepc |
23 |
|
| 6 |
dsic.upv.es!jroman |
24 |
#if !defined(__SLEPCEPS_H)
|
|
|
25 |
#define __SLEPCEPS_H
|
| 1885 |
jroman |
26 |
#include "slepcsys.h"
|
| 6 |
dsic.upv.es!jroman |
27 |
#include "slepcst.h"
|
| 1345 |
slepc |
28 |
#include "slepcip.h"
|
| 476 |
dsic.upv.es!antodo |
29 |
PETSC_EXTERN_CXX_BEGIN
|
| 6 |
dsic.upv.es!jroman |
30 |
|
| 2375 |
jroman |
31 |
extern PetscErrorCode EPSInitializePackage(const char[]);
|
| 6 |
dsic.upv.es!jroman |
32 |
|
|
|
33 |
/*S
|
| 2375 |
jroman |
34 |
EPS - Abstract SLEPc object that manages all the eigenvalue
|
|
|
35 |
problem solvers.
|
| 6 |
dsic.upv.es!jroman |
36 |
|
| 2375 |
jroman |
37 |
Level: beginner
|
| 6 |
dsic.upv.es!jroman |
38 |
|
|
|
39 |
.seealso: EPSCreate(), ST
|
|
|
40 |
S*/
|
|
|
41 |
typedef struct _p_EPS* EPS;
|
|
|
42 |
|
| 1364 |
slepc |
43 |
/*E
|
|
|
44 |
EPSType - String with the name of a SLEPc eigensolver
|
|
|
45 |
|
| 2375 |
jroman |
46 |
Level: beginner
|
| 1364 |
slepc |
47 |
|
|
|
48 |
.seealso: EPSSetType(), EPS
|
|
|
49 |
E*/
|
| 1502 |
slepc |
50 |
#define EPSType char*
|
| 6 |
dsic.upv.es!jroman |
51 |
#define EPSPOWER "power"
|
|
|
52 |
#define EPSSUBSPACE "subspace"
|
|
|
53 |
#define EPSARNOLDI "arnoldi"
|
| 646 |
dsic.upv.es!antodo |
54 |
#define EPSLANCZOS "lanczos"
|
| 1171 |
slepc |
55 |
#define EPSKRYLOVSCHUR "krylovschur"
|
| 1878 |
antodo |
56 |
#define EPSDSITRLANCZOS "dsitrlanczos"
|
| 2073 |
jroman |
57 |
#define EPSGD "gd"
|
|
|
58 |
#define EPSJD "jd"
|
| 6 |
dsic.upv.es!jroman |
59 |
#define EPSLAPACK "lapack"
|
|
|
60 |
/* the next ones are interfaces to external libraries */
|
|
|
61 |
#define EPSARPACK "arpack"
|
|
|
62 |
#define EPSBLZPACK "blzpack"
|
|
|
63 |
#define EPSTRLAN "trlan"
|
| 1195 |
slepc |
64 |
#define EPSBLOPEX "blopex"
|
| 1187 |
slepc |
65 |
#define EPSPRIMME "primme"
|
| 6 |
dsic.upv.es!jroman |
66 |
|
| 2375 |
jroman |
67 |
/* Logging support */
|
|
|
68 |
extern PetscClassId EPS_CLASSID;
|
|
|
69 |
|
| 1364 |
slepc |
70 |
/*E
|
|
|
71 |
EPSProblemType - determines the type of eigenvalue problem
|
|
|
72 |
|
|
|
73 |
Level: beginner
|
|
|
74 |
|
|
|
75 |
.seealso: EPSSetProblemType(), EPSGetProblemType()
|
|
|
76 |
E*/
|
| 1940 |
jroman |
77 |
typedef enum { EPS_HEP=1,
|
|
|
78 |
EPS_GHEP,
|
|
|
79 |
EPS_NHEP,
|
|
|
80 |
EPS_GNHEP,
|
|
|
81 |
EPS_PGNHEP,
|
|
|
82 |
EPS_GHIEP } EPSProblemType;
|
| 6 |
dsic.upv.es!jroman |
83 |
|
| 1364 |
slepc |
84 |
/*E
|
| 1560 |
slepc |
85 |
EPSExtraction - determines the type of extraction technique employed
|
| 1426 |
slepc |
86 |
by the eigensolver
|
|
|
87 |
|
|
|
88 |
Level: beginner
|
|
|
89 |
|
| 1560 |
slepc |
90 |
.seealso: EPSSetExtraction(), EPSGetExtraction()
|
| 1426 |
slepc |
91 |
E*/
|
| 1940 |
jroman |
92 |
typedef enum { EPS_RITZ=1,
|
|
|
93 |
EPS_HARMONIC,
|
| 1987 |
eromero |
94 |
EPS_HARMONIC_RELATIVE,
|
|
|
95 |
EPS_HARMONIC_RIGHT,
|
|
|
96 |
EPS_HARMONIC_LARGEST,
|
| 1940 |
jroman |
97 |
EPS_REFINED,
|
|
|
98 |
EPS_REFINED_HARMONIC } EPSExtraction;
|
| 1426 |
slepc |
99 |
|
|
|
100 |
/*E
|
| 1364 |
slepc |
101 |
EPSWhich - determines which part of the spectrum is requested
|
|
|
102 |
|
|
|
103 |
Level: intermediate
|
|
|
104 |
|
|
|
105 |
.seealso: EPSSetWhichEigenpairs(), EPSGetWhichEigenpairs()
|
|
|
106 |
E*/
|
| 1942 |
jroman |
107 |
typedef enum { EPS_LARGEST_MAGNITUDE=1,
|
| 1940 |
jroman |
108 |
EPS_SMALLEST_MAGNITUDE,
|
|
|
109 |
EPS_LARGEST_REAL,
|
|
|
110 |
EPS_SMALLEST_REAL,
|
|
|
111 |
EPS_LARGEST_IMAGINARY,
|
|
|
112 |
EPS_SMALLEST_IMAGINARY,
|
|
|
113 |
EPS_TARGET_MAGNITUDE,
|
|
|
114 |
EPS_TARGET_REAL,
|
|
|
115 |
EPS_TARGET_IMAGINARY,
|
| 2403 |
jroman |
116 |
EPS_ALL,
|
| 1945 |
jroman |
117 |
EPS_WHICH_USER } EPSWhich;
|
| 6 |
dsic.upv.es!jroman |
118 |
|
| 1799 |
jroman |
119 |
/*E
|
|
|
120 |
EPSBalance - the type of balancing used for non-Hermitian problems
|
|
|
121 |
|
|
|
122 |
Level: intermediate
|
|
|
123 |
|
|
|
124 |
.seealso: EPSSetBalance()
|
|
|
125 |
E*/
|
| 1940 |
jroman |
126 |
typedef enum { EPS_BALANCE_NONE=1,
|
|
|
127 |
EPS_BALANCE_ONESIDE,
|
|
|
128 |
EPS_BALANCE_TWOSIDE,
|
|
|
129 |
EPS_BALANCE_USER } EPSBalance;
|
| 1799 |
jroman |
130 |
|
| 2083 |
eromero |
131 |
/*E
|
|
|
132 |
EPSConv - determines the convergence test
|
|
|
133 |
|
|
|
134 |
Level: intermediate
|
|
|
135 |
|
|
|
136 |
.seealso: EPSSetConvergenceTest(), EPSSetConvergenceTestFunction()
|
|
|
137 |
E*/
|
|
|
138 |
typedef enum { EPS_CONV_ABS=1,
|
|
|
139 |
EPS_CONV_EIG,
|
|
|
140 |
EPS_CONV_NORM,
|
|
|
141 |
EPS_CONV_USER } EPSConv;
|
|
|
142 |
|
| 2240 |
jroman |
143 |
extern PetscErrorCode EPSCreate(MPI_Comm,EPS *);
|
| 2308 |
jroman |
144 |
extern PetscErrorCode EPSDestroy(EPS*);
|
| 2348 |
jroman |
145 |
extern PetscErrorCode EPSReset(EPS);
|
| 2240 |
jroman |
146 |
extern PetscErrorCode EPSSetType(EPS,const EPSType);
|
|
|
147 |
extern PetscErrorCode EPSGetType(EPS,const EPSType*);
|
|
|
148 |
extern PetscErrorCode EPSSetProblemType(EPS,EPSProblemType);
|
|
|
149 |
extern PetscErrorCode EPSGetProblemType(EPS,EPSProblemType*);
|
|
|
150 |
extern PetscErrorCode EPSSetExtraction(EPS,EPSExtraction);
|
|
|
151 |
extern PetscErrorCode EPSGetExtraction(EPS,EPSExtraction*);
|
|
|
152 |
extern PetscErrorCode EPSSetBalance(EPS,EPSBalance,PetscInt,PetscReal);
|
|
|
153 |
extern PetscErrorCode EPSGetBalance(EPS,EPSBalance*,PetscInt*,PetscReal*);
|
|
|
154 |
extern PetscErrorCode EPSSetOperators(EPS,Mat,Mat);
|
|
|
155 |
extern PetscErrorCode EPSGetOperators(EPS,Mat*,Mat*);
|
|
|
156 |
extern PetscErrorCode EPSSetFromOptions(EPS);
|
|
|
157 |
extern PetscErrorCode EPSSetUp(EPS);
|
|
|
158 |
extern PetscErrorCode EPSSolve(EPS);
|
|
|
159 |
extern PetscErrorCode EPSView(EPS,PetscViewer);
|
| 6 |
dsic.upv.es!jroman |
160 |
|
| 2240 |
jroman |
161 |
extern PetscErrorCode EPSSetTarget(EPS,PetscScalar);
|
|
|
162 |
extern PetscErrorCode EPSGetTarget(EPS,PetscScalar*);
|
| 2403 |
jroman |
163 |
extern PetscErrorCode EPSSetInterval(EPS,PetscReal,PetscReal);
|
|
|
164 |
extern PetscErrorCode EPSGetInterval(EPS,PetscReal*,PetscReal*);
|
| 2240 |
jroman |
165 |
extern PetscErrorCode EPSSetST(EPS,ST);
|
|
|
166 |
extern PetscErrorCode EPSGetST(EPS,ST*);
|
|
|
167 |
extern PetscErrorCode EPSSetIP(EPS,IP);
|
|
|
168 |
extern PetscErrorCode EPSGetIP(EPS,IP*);
|
|
|
169 |
extern PetscErrorCode EPSSetTolerances(EPS,PetscReal,PetscInt);
|
|
|
170 |
extern PetscErrorCode EPSGetTolerances(EPS,PetscReal*,PetscInt*);
|
|
|
171 |
extern PetscErrorCode EPSSetConvergenceTestFunction(EPS,PetscErrorCode (*)(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*);
|
|
|
172 |
extern PetscErrorCode EPSSetConvergenceTest(EPS eps,EPSConv conv);
|
|
|
173 |
extern PetscErrorCode EPSGetConvergenceTest(EPS eps,EPSConv *conv);
|
|
|
174 |
extern PetscErrorCode EPSEigRelativeConverged(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
|
|
|
175 |
extern PetscErrorCode EPSAbsoluteConverged(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
|
|
|
176 |
extern PetscErrorCode EPSNormRelativeConverged(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
|
|
|
177 |
extern PetscErrorCode EPSSetDimensions(EPS,PetscInt,PetscInt,PetscInt);
|
|
|
178 |
extern PetscErrorCode EPSGetDimensions(EPS,PetscInt*,PetscInt*,PetscInt*);
|
| 6 |
dsic.upv.es!jroman |
179 |
|
| 2240 |
jroman |
180 |
extern PetscErrorCode EPSGetConverged(EPS,PetscInt*);
|
|
|
181 |
extern PetscErrorCode EPSGetEigenpair(EPS,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec);
|
|
|
182 |
extern PetscErrorCode EPSGetEigenvalue(EPS,PetscInt,PetscScalar*,PetscScalar*);
|
|
|
183 |
extern PetscErrorCode EPSGetEigenvector(EPS,PetscInt,Vec,Vec);
|
|
|
184 |
extern PetscErrorCode EPSGetEigenvectorLeft(EPS,PetscInt,Vec,Vec);
|
|
|
185 |
extern PetscErrorCode EPSComputeRelativeError(EPS,PetscInt,PetscReal*);
|
|
|
186 |
extern PetscErrorCode EPSComputeRelativeErrorLeft(EPS,PetscInt,PetscReal*);
|
|
|
187 |
extern PetscErrorCode EPSComputeResidualNorm(EPS,PetscInt,PetscReal*);
|
|
|
188 |
extern PetscErrorCode EPSComputeResidualNormLeft(EPS,PetscInt,PetscReal*);
|
|
|
189 |
extern PetscErrorCode EPSGetInvariantSubspace(EPS,Vec*);
|
|
|
190 |
extern PetscErrorCode EPSGetInvariantSubspaceLeft(EPS,Vec*);
|
|
|
191 |
extern PetscErrorCode EPSGetErrorEstimate(EPS,PetscInt,PetscReal*);
|
|
|
192 |
extern PetscErrorCode EPSGetErrorEstimateLeft(EPS,PetscInt,PetscReal*);
|
| 6 |
dsic.upv.es!jroman |
193 |
|
| 2351 |
jroman |
194 |
extern PetscErrorCode EPSMonitorSet(EPS,PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**));
|
| 2240 |
jroman |
195 |
extern PetscErrorCode EPSMonitorCancel(EPS);
|
|
|
196 |
extern PetscErrorCode EPSGetMonitorContext(EPS,void **);
|
|
|
197 |
extern PetscErrorCode EPSGetIterationNumber(EPS,PetscInt*);
|
|
|
198 |
extern PetscErrorCode EPSGetOperationCounters(EPS,PetscInt*,PetscInt*,PetscInt*);
|
| 6 |
dsic.upv.es!jroman |
199 |
|
| 2240 |
jroman |
200 |
extern PetscErrorCode EPSSetWhichEigenpairs(EPS,EPSWhich);
|
|
|
201 |
extern PetscErrorCode EPSGetWhichEigenpairs(EPS,EPSWhich*);
|
|
|
202 |
extern PetscErrorCode EPSSetLeftVectorsWanted(EPS,PetscBool);
|
|
|
203 |
extern PetscErrorCode EPSGetLeftVectorsWanted(EPS,PetscBool*);
|
|
|
204 |
extern PetscErrorCode EPSSetMatrixNorms(EPS,PetscReal,PetscReal,PetscBool);
|
|
|
205 |
extern PetscErrorCode EPSGetMatrixNorms(EPS,PetscReal*,PetscReal*,PetscBool*);
|
|
|
206 |
extern PetscErrorCode EPSSetTrueResidual(EPS,PetscBool);
|
|
|
207 |
extern PetscErrorCode EPSGetTrueResidual(EPS,PetscBool*);
|
|
|
208 |
extern PetscErrorCode EPSSetEigenvalueComparison(EPS,PetscErrorCode (*func)(EPS,PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*);
|
|
|
209 |
extern PetscErrorCode EPSIsGeneralized(EPS,PetscBool*);
|
|
|
210 |
extern PetscErrorCode EPSIsHermitian(EPS,PetscBool*);
|
| 6 |
dsic.upv.es!jroman |
211 |
|
| 2240 |
jroman |
212 |
extern PetscErrorCode EPSMonitorFirst(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
|
|
|
213 |
extern PetscErrorCode EPSMonitorAll(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
|
|
|
214 |
extern PetscErrorCode EPSMonitorConverged(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
|
|
|
215 |
extern PetscErrorCode EPSMonitorLG(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
|
|
|
216 |
extern PetscErrorCode EPSMonitorLGAll(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*);
|
| 6 |
dsic.upv.es!jroman |
217 |
|
| 2240 |
jroman |
218 |
extern PetscErrorCode EPSSetTrackAll(EPS,PetscBool);
|
|
|
219 |
extern PetscErrorCode EPSGetTrackAll(EPS,PetscBool*);
|
| 2041 |
eromero |
220 |
|
| 2240 |
jroman |
221 |
extern PetscErrorCode EPSSetDeflationSpace(EPS,PetscInt,Vec*);
|
|
|
222 |
extern PetscErrorCode EPSRemoveDeflationSpace(EPS);
|
|
|
223 |
extern PetscErrorCode EPSSetInitialSpace(EPS,PetscInt,Vec*);
|
|
|
224 |
extern PetscErrorCode EPSSetInitialSpaceLeft(EPS,PetscInt,Vec*);
|
| 780 |
dsic.upv.es!jroman |
225 |
|
| 2240 |
jroman |
226 |
extern PetscErrorCode EPSSetOptionsPrefix(EPS,const char*);
|
|
|
227 |
extern PetscErrorCode EPSAppendOptionsPrefix(EPS,const char*);
|
|
|
228 |
extern PetscErrorCode EPSGetOptionsPrefix(EPS,const char*[]);
|
| 6 |
dsic.upv.es!jroman |
229 |
|
| 1364 |
slepc |
230 |
/*E
|
|
|
231 |
EPSConvergedReason - reason an eigensolver was said to
|
|
|
232 |
have converged or diverged
|
|
|
233 |
|
| 1799 |
jroman |
234 |
Level: beginner
|
| 1364 |
slepc |
235 |
|
|
|
236 |
.seealso: EPSSolve(), EPSGetConvergedReason(), EPSSetTolerances()
|
|
|
237 |
E*/
|
| 6 |
dsic.upv.es!jroman |
238 |
typedef enum {/* converged */
|
|
|
239 |
EPS_CONVERGED_TOL = 2,
|
|
|
240 |
/* diverged */
|
|
|
241 |
EPS_DIVERGED_ITS = -3,
|
|
|
242 |
EPS_DIVERGED_BREAKDOWN = -4,
|
|
|
243 |
EPS_CONVERGED_ITERATING = 0} EPSConvergedReason;
|
|
|
244 |
|
| 2240 |
jroman |
245 |
extern PetscErrorCode EPSGetConvergedReason(EPS,EPSConvergedReason *);
|
| 6 |
dsic.upv.es!jroman |
246 |
|
| 2240 |
jroman |
247 |
extern PetscErrorCode EPSSortEigenvalues(EPS,PetscInt,PetscScalar*,PetscScalar*,PetscInt*);
|
|
|
248 |
extern PetscErrorCode EPSSortEigenvaluesReal(EPS,PetscInt,PetscReal*,PetscInt*);
|
|
|
249 |
extern PetscErrorCode EPSCompareEigenvalues(EPS,PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*);
|
|
|
250 |
extern PetscErrorCode EPSDenseNHEP(PetscInt,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*);
|
|
|
251 |
extern PetscErrorCode EPSDenseGNHEP(PetscInt,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*);
|
|
|
252 |
extern PetscErrorCode EPSDenseHEP(PetscInt,PetscScalar*,PetscInt,PetscReal*,PetscScalar*);
|
|
|
253 |
extern PetscErrorCode EPSDenseGHEP(PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscScalar*);
|
|
|
254 |
extern PetscErrorCode EPSDenseHessenberg(PetscInt,PetscInt,PetscScalar*,PetscInt,PetscScalar*);
|
|
|
255 |
extern PetscErrorCode EPSDenseSchur(PetscInt,PetscInt,PetscScalar*,PetscInt,PetscScalar*,PetscScalar*,PetscScalar*);
|
|
|
256 |
extern PetscErrorCode EPSSortDenseSchur(EPS,PetscInt,PetscInt,PetscScalar*,PetscInt,PetscScalar*,PetscScalar*,PetscScalar*);
|
|
|
257 |
extern PetscErrorCode EPSSortDenseSchurGeneralized(EPS,PetscInt,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscInt,PetscScalar*,PetscScalar*,PetscScalar*,PetscScalar*);
|
|
|
258 |
extern PetscErrorCode EPSDenseTridiagonal(PetscInt,PetscReal*,PetscReal*,PetscReal*,PetscScalar*);
|
| 676 |
dsic.upv.es!antodo |
259 |
|
| 2240 |
jroman |
260 |
extern PetscErrorCode EPSGetStartVector(EPS,PetscInt,Vec,PetscBool*);
|
|
|
261 |
extern PetscErrorCode EPSGetStartVectorLeft(EPS,PetscInt,Vec,PetscBool*);
|
| 6 |
dsic.upv.es!jroman |
262 |
|
| 2375 |
jroman |
263 |
extern PetscFList EPSList;
|
|
|
264 |
extern PetscBool EPSRegisterAllCalled;
|
|
|
265 |
extern PetscErrorCode EPSRegisterAll(const char[]);
|
|
|
266 |
extern PetscErrorCode EPSRegisterDestroy(void);
|
|
|
267 |
extern PetscErrorCode EPSRegister(const char[],const char[],const char[],PetscErrorCode(*)(EPS));
|
|
|
268 |
|
|
|
269 |
/*MC
|
|
|
270 |
EPSRegisterDynamic - Adds a method to the eigenproblem solver package.
|
|
|
271 |
|
|
|
272 |
Synopsis:
|
|
|
273 |
PetscErrorCode EPSRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(EPS))
|
|
|
274 |
|
|
|
275 |
Not Collective
|
|
|
276 |
|
|
|
277 |
Input Parameters:
|
|
|
278 |
+ name_solver - name of a new user-defined solver
|
|
|
279 |
. path - path (either absolute or relative) the library containing this solver
|
|
|
280 |
. name_create - name of routine to create the solver context
|
|
|
281 |
- routine_create - routine to create the solver context
|
|
|
282 |
|
|
|
283 |
Notes:
|
|
|
284 |
EPSRegisterDynamic() may be called multiple times to add several user-defined solvers.
|
|
|
285 |
|
|
|
286 |
If dynamic libraries are used, then the fourth input argument (routine_create)
|
|
|
287 |
is ignored.
|
|
|
288 |
|
|
|
289 |
Sample usage:
|
|
|
290 |
.vb
|
|
|
291 |
EPSRegisterDynamic("my_solver",/home/username/my_lib/lib/libO/solaris/mylib.a,
|
|
|
292 |
"MySolverCreate",MySolverCreate);
|
|
|
293 |
.ve
|
|
|
294 |
|
|
|
295 |
Then, your solver can be chosen with the procedural interface via
|
|
|
296 |
$ EPSSetType(eps,"my_solver")
|
|
|
297 |
or at runtime via the option
|
|
|
298 |
$ -eps_type my_solver
|
|
|
299 |
|
|
|
300 |
Level: advanced
|
|
|
301 |
|
|
|
302 |
.seealso: EPSRegisterDestroy(), EPSRegisterAll()
|
|
|
303 |
M*/
|
| 1389 |
slepc |
304 |
#if defined(PETSC_USE_DYNAMIC_LIBRARIES)
|
|
|
305 |
#define EPSRegisterDynamic(a,b,c,d) EPSRegister(a,b,c,0)
|
|
|
306 |
#else
|
|
|
307 |
#define EPSRegisterDynamic(a,b,c,d) EPSRegister(a,b,c,d)
|
|
|
308 |
#endif
|
|
|
309 |
|
| 6 |
dsic.upv.es!jroman |
310 |
/* --------- options specific to particular eigensolvers -------- */
|
|
|
311 |
|
| 1364 |
slepc |
312 |
/*E
|
|
|
313 |
EPSPowerShiftType - determines the type of shift used in the Power iteration
|
|
|
314 |
|
|
|
315 |
Level: advanced
|
|
|
316 |
|
|
|
317 |
.seealso: EPSPowerSetShiftType(), EPSPowerGetShiftType()
|
|
|
318 |
E*/
|
| 1940 |
jroman |
319 |
typedef enum { EPS_POWER_SHIFT_CONSTANT,
|
|
|
320 |
EPS_POWER_SHIFT_RAYLEIGH,
|
|
|
321 |
EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;
|
| 2321 |
jroman |
322 |
extern const char *EPSPowerShiftTypes[];
|
| 444 |
dsic.upv.es!antodo |
323 |
|
| 2240 |
jroman |
324 |
extern PetscErrorCode EPSPowerSetShiftType(EPS,EPSPowerShiftType);
|
|
|
325 |
extern PetscErrorCode EPSPowerGetShiftType(EPS,EPSPowerShiftType*);
|
| 444 |
dsic.upv.es!antodo |
326 |
|
| 2240 |
jroman |
327 |
extern PetscErrorCode EPSArnoldiSetDelayed(EPS,PetscBool);
|
|
|
328 |
extern PetscErrorCode EPSArnoldiGetDelayed(EPS,PetscBool*);
|
| 1098 |
slepc |
329 |
|
| 1364 |
slepc |
330 |
/*E
|
|
|
331 |
EPSLanczosReorthogType - determines the type of reorthogonalization
|
|
|
332 |
used in the Lanczos method
|
|
|
333 |
|
|
|
334 |
Level: advanced
|
|
|
335 |
|
|
|
336 |
.seealso: EPSLanczosSetReorthog(), EPSLanczosGetReorthog()
|
|
|
337 |
E*/
|
| 1940 |
jroman |
338 |
typedef enum { EPS_LANCZOS_REORTHOG_LOCAL,
|
|
|
339 |
EPS_LANCZOS_REORTHOG_FULL,
|
|
|
340 |
EPS_LANCZOS_REORTHOG_SELECTIVE,
|
|
|
341 |
EPS_LANCZOS_REORTHOG_PERIODIC,
|
|
|
342 |
EPS_LANCZOS_REORTHOG_PARTIAL,
|
|
|
343 |
EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;
|
| 2322 |
jroman |
344 |
extern const char *EPSLanczosReorthogTypes[];
|
| 673 |
dsic.upv.es!antodo |
345 |
|
| 2240 |
jroman |
346 |
extern PetscErrorCode EPSLanczosSetReorthog(EPS,EPSLanczosReorthogType);
|
|
|
347 |
extern PetscErrorCode EPSLanczosGetReorthog(EPS,EPSLanczosReorthogType*);
|
| 673 |
dsic.upv.es!antodo |
348 |
|
| 2240 |
jroman |
349 |
extern PetscErrorCode EPSBlzpackSetBlockSize(EPS,PetscInt);
|
|
|
350 |
extern PetscErrorCode EPSBlzpackSetInterval(EPS,PetscReal,PetscReal);
|
|
|
351 |
extern PetscErrorCode EPSBlzpackSetNSteps(EPS,PetscInt);
|
| 6 |
dsic.upv.es!jroman |
352 |
|
| 1364 |
slepc |
353 |
/*E
|
|
|
354 |
EPSPRIMMEMethod - determines the method selected in the PRIMME library
|
|
|
355 |
|
|
|
356 |
Level: advanced
|
|
|
357 |
|
|
|
358 |
.seealso: EPSPRIMMESetMethod(), EPSPRIMMEGetMethod()
|
|
|
359 |
E*/
|
| 1940 |
jroman |
360 |
typedef enum { EPS_PRIMME_DYNAMIC,
|
|
|
361 |
EPS_PRIMME_DEFAULT_MIN_TIME,
|
|
|
362 |
EPS_PRIMME_DEFAULT_MIN_MATVECS,
|
|
|
363 |
EPS_PRIMME_ARNOLDI,
|
|
|
364 |
EPS_PRIMME_GD,
|
|
|
365 |
EPS_PRIMME_GD_PLUSK,
|
|
|
366 |
EPS_PRIMME_GD_OLSEN_PLUSK,
|
|
|
367 |
EPS_PRIMME_JD_OLSEN_PLUSK,
|
|
|
368 |
EPS_PRIMME_RQI,
|
|
|
369 |
EPS_PRIMME_JDQR,
|
|
|
370 |
EPS_PRIMME_JDQMR,
|
|
|
371 |
EPS_PRIMME_JDQMR_ETOL,
|
|
|
372 |
EPS_PRIMME_SUBSPACE_ITERATION,
|
|
|
373 |
EPS_PRIMME_LOBPCG_ORTHOBASIS,
|
|
|
374 |
EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;
|
| 2322 |
jroman |
375 |
extern const char *EPSPRIMMEMethods[];
|
| 1187 |
slepc |
376 |
|
| 2240 |
jroman |
377 |
extern PetscErrorCode EPSPRIMMESetBlockSize(EPS eps,PetscInt bs);
|
|
|
378 |
extern PetscErrorCode EPSPRIMMESetMethod(EPS eps, EPSPRIMMEMethod method);
|
|
|
379 |
extern PetscErrorCode EPSPRIMMEGetBlockSize(EPS eps,PetscInt *bs);
|
|
|
380 |
extern PetscErrorCode EPSPRIMMEGetMethod(EPS eps, EPSPRIMMEMethod *method);
|
| 1187 |
slepc |
381 |
|
| 2240 |
jroman |
382 |
extern PetscErrorCode EPSGDSetKrylovStart(EPS eps,PetscBool krylovstart);
|
|
|
383 |
extern PetscErrorCode EPSGDGetKrylovStart(EPS eps,PetscBool *krylovstart);
|
|
|
384 |
extern PetscErrorCode EPSGDSetBlockSize(EPS eps,PetscInt blocksize);
|
|
|
385 |
extern PetscErrorCode EPSGDGetBlockSize(EPS eps,PetscInt *blocksize);
|
|
|
386 |
extern PetscErrorCode EPSGDSetRestart(EPS eps,PetscInt minv,PetscInt plusk);
|
|
|
387 |
extern PetscErrorCode EPSGDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk);
|
|
|
388 |
extern PetscErrorCode EPSGDSetInitialSize(EPS eps,PetscInt initialsize);
|
|
|
389 |
extern PetscErrorCode EPSGDGetInitialSize(EPS eps,PetscInt *initialsize);
|
| 1987 |
eromero |
390 |
|
| 2240 |
jroman |
391 |
extern PetscErrorCode EPSJDSetKrylovStart(EPS eps,PetscBool krylovstart);
|
|
|
392 |
extern PetscErrorCode EPSJDGetKrylovStart(EPS eps,PetscBool *krylovstart);
|
|
|
393 |
extern PetscErrorCode EPSJDSetBlockSize(EPS eps,PetscInt blocksize);
|
|
|
394 |
extern PetscErrorCode EPSJDGetBlockSize(EPS eps,PetscInt *blocksize);
|
|
|
395 |
extern PetscErrorCode EPSJDSetRestart(EPS eps,PetscInt minv,PetscInt plusk);
|
|
|
396 |
extern PetscErrorCode EPSJDGetRestart(EPS eps,PetscInt *minv,PetscInt *plusk);
|
|
|
397 |
extern PetscErrorCode EPSJDSetInitialSize(EPS eps,PetscInt initialsize);
|
|
|
398 |
extern PetscErrorCode EPSJDGetInitialSize(EPS eps,PetscInt *initialsize);
|
|
|
399 |
extern PetscErrorCode EPSJDSetFix(EPS eps,PetscReal fix);
|
|
|
400 |
extern PetscErrorCode EPSJDGetFix(EPS eps,PetscReal *fix);
|
| 1995 |
eromero |
401 |
|
| 476 |
dsic.upv.es!antodo |
402 |
PETSC_EXTERN_CXX_END
|
| 6 |
dsic.upv.es!jroman |
403 |
#endif
|
|
|
404 |
|