Actual source code: slepceps.h

  1: /*
  2:    User interface for the SLEPC eigenproblem solvers. 

  4:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  5:    SLEPc - Scalable Library for Eigenvalue Problem Computations
  6:    Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain

  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.

 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.

 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/>.
 21:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 22: */

 26:  #include slepcsys.h
 27:  #include slepcst.h
 28:  #include slepcip.h


 33: /*S
 34:     EPS - Abstract SLEPc object that manages all the eigenvalue 
 35:     problem solvers.

 37:     Level: beginner

 39: .seealso:  EPSCreate(), ST
 40: S*/
 41: typedef struct _p_EPS* EPS;

 43: /*E
 44:     EPSType - String with the name of a SLEPc eigensolver

 46:     Level: beginner

 48: .seealso: EPSSetType(), EPS
 49: E*/
 50: #define EPSType      char*
 51: #define EPSPOWER     "power"
 52: #define EPSSUBSPACE  "subspace"
 53: #define EPSARNOLDI   "arnoldi"
 54: #define EPSLANCZOS   "lanczos"
 55: #define EPSKRYLOVSCHUR "krylovschur"
 56: #define EPSGD        "gd"
 57: #define EPSJD        "jd"
 58: #define EPSLAPACK    "lapack"
 59: /* the next ones are interfaces to external libraries */
 60: #define EPSARPACK    "arpack"
 61: #define EPSBLZPACK   "blzpack"
 62: #define EPSTRLAN     "trlan"
 63: #define EPSBLOPEX    "blopex"
 64: #define EPSPRIMME    "primme"

 66: /* Logging support */

 69: /*E
 70:     EPSProblemType - determines the type of eigenvalue problem

 72:     Level: beginner

 74: .seealso: EPSSetProblemType(), EPSGetProblemType()
 75: E*/
 76: typedef enum { EPS_HEP=1,
 77:                EPS_GHEP,
 78:                EPS_NHEP,
 79:                EPS_GNHEP,
 80:                EPS_PGNHEP} EPSProblemType;

 82: /*E
 83:     EPSExtraction - determines the type of extraction technique employed
 84:     by the eigensolver

 86:     Level: beginner

 88: .seealso: EPSSetExtraction(), EPSGetExtraction()
 89: E*/
 90: typedef enum { EPS_RITZ=1,
 91:                EPS_HARMONIC,
 92:                EPS_HARMONIC_RELATIVE,
 93:                EPS_HARMONIC_RIGHT,
 94:                EPS_HARMONIC_LARGEST,
 95:                EPS_REFINED,
 96:                EPS_REFINED_HARMONIC } EPSExtraction;

 98: /*E
 99:     EPSWhich - determines which part of the spectrum is requested

101:     Level: intermediate

103: .seealso: EPSSetWhichEigenpairs(), EPSGetWhichEigenpairs()
104: E*/
105: typedef enum { EPS_LARGEST_MAGNITUDE=1,
106:                EPS_SMALLEST_MAGNITUDE,
107:                EPS_LARGEST_REAL,
108:                EPS_SMALLEST_REAL,
109:                EPS_LARGEST_IMAGINARY,
110:                EPS_SMALLEST_IMAGINARY,
111:                EPS_TARGET_MAGNITUDE,
112:                EPS_TARGET_REAL,
113:                EPS_TARGET_IMAGINARY,
114:                EPS_ALL,
115:                EPS_WHICH_USER } EPSWhich;

117: /*E
118:     EPSBalance - the type of balancing used for non-Hermitian problems

120:     Level: intermediate

122: .seealso: EPSSetBalance()
123: E*/
124: typedef enum { EPS_BALANCE_NONE=1,
125:                EPS_BALANCE_ONESIDE,
126:                EPS_BALANCE_TWOSIDE,
127:                EPS_BALANCE_USER } EPSBalance;

129: /*E
130:     EPSConv - determines the convergence test

132:     Level: intermediate

134: .seealso: EPSSetConvergenceTest(), EPSSetConvergenceTestFunction()
135: E*/
136: typedef enum { EPS_CONV_ABS=1,
137:                EPS_CONV_EIG,
138:                EPS_CONV_NORM,
139:                EPS_CONV_USER } EPSConv;










229: /*E
230:     EPSConvergedReason - reason an eigensolver was said to 
231:          have converged or diverged

233:     Level: beginner

235: .seealso: EPSSolve(), EPSGetConvergedReason(), EPSSetTolerances()
236: E*/
237: typedef enum {/* converged */
238:               EPS_CONVERGED_TOL                =  2,
239:               /* diverged */
240:               EPS_DIVERGED_ITS                 = -3,
241:               EPS_DIVERGED_BREAKDOWN           = -4,
242:               EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;





268: /*MC
269:    EPSRegisterDynamic - Adds a method to the eigenproblem solver package.

271:    Synopsis:
272:    PetscErrorCode EPSRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(EPS))

274:    Not Collective

276:    Input Parameters:
277: +  name_solver - name of a new user-defined solver
278: .  path - path (either absolute or relative) the library containing this solver
279: .  name_create - name of routine to create the solver context
280: -  routine_create - routine to create the solver context

282:    Notes:
283:    EPSRegisterDynamic() may be called multiple times to add several user-defined solvers.

285:    If dynamic libraries are used, then the fourth input argument (routine_create)
286:    is ignored.

288:    Sample usage:
289: .vb
290:    EPSRegisterDynamic("my_solver",/home/username/my_lib/lib/libO/solaris/mylib.a,
291:                "MySolverCreate",MySolverCreate);
292: .ve

294:    Then, your solver can be chosen with the procedural interface via
295: $     EPSSetType(eps,"my_solver")
296:    or at runtime via the option
297: $     -eps_type my_solver

299:    Level: advanced

301: .seealso: EPSRegisterDestroy(), EPSRegisterAll()
302: M*/
303: #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
304: #define EPSRegisterDynamic(a,b,c,d) EPSRegister(a,b,c,0)
305: #else
306: #define EPSRegisterDynamic(a,b,c,d) EPSRegister(a,b,c,d)
307: #endif

309: /* --------- options specific to particular eigensolvers -------- */

311: /*E
312:     EPSPowerShiftType - determines the type of shift used in the Power iteration

314:     Level: advanced

316: .seealso: EPSPowerSetShiftType(), EPSPowerGetShiftType()
317: E*/
318: typedef enum { EPS_POWER_SHIFT_CONSTANT,
319:                EPS_POWER_SHIFT_RAYLEIGH,
320:                EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;



329: /*E
330:     EPSLanczosReorthogType - determines the type of reorthogonalization
331:     used in the Lanczos method

333:     Level: advanced

335: .seealso: EPSLanczosSetReorthog(), EPSLanczosGetReorthog()
336: E*/
337: typedef enum { EPS_LANCZOS_REORTHOG_LOCAL,
338:                EPS_LANCZOS_REORTHOG_FULL,
339:                EPS_LANCZOS_REORTHOG_SELECTIVE,
340:                EPS_LANCZOS_REORTHOG_PERIODIC,
341:                EPS_LANCZOS_REORTHOG_PARTIAL,
342:                EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;



351: /*E
352:     EPSPRIMMEMethod - determines the method selected in the PRIMME library

354:     Level: advanced

356: .seealso: EPSPRIMMESetMethod(), EPSPRIMMEGetMethod()
357: E*/
358: typedef enum { EPS_PRIMME_DYNAMIC,
359:                EPS_PRIMME_DEFAULT_MIN_TIME,
360:                EPS_PRIMME_DEFAULT_MIN_MATVECS,
361:                EPS_PRIMME_ARNOLDI,
362:                EPS_PRIMME_GD,
363:                EPS_PRIMME_GD_PLUSK,
364:                EPS_PRIMME_GD_OLSEN_PLUSK,
365:                EPS_PRIMME_JD_OLSEN_PLUSK,
366:                EPS_PRIMME_RQI,
367:                EPS_PRIMME_JDQR,
368:                EPS_PRIMME_JDQMR,
369:                EPS_PRIMME_JDQMR_ETOL,
370:                EPS_PRIMME_SUBSPACE_ITERATION,
371:                EPS_PRIMME_LOBPCG_ORTHOBASIS,
372:                EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;




409: #endif