Actual source code: slepcqep.h

  1: /*
  2:    User interface for SLEPc's quadratic eigenvalue 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 slepceps.h


 32: /*S
 33:      QEP - Abstract SLEPc object that manages all the quadratic eigenvalue 
 34:      problem solvers.

 36:    Level: beginner

 38: .seealso:  QEPCreate()
 39: S*/
 40: typedef struct _p_QEP* QEP;

 42: /*E
 43:     QEPType - String with the name of a quadratic eigensolver

 45:    Level: beginner

 47: .seealso: QEPSetType(), QEP
 48: E*/
 49: #define QEPType      char*
 50: #define QEPLINEAR    "linear"
 51: #define QEPQARNOLDI  "qarnoldi"

 53: /* Logging support */

 56: /*E
 57:     QEPProblemType - determines the type of the quadratic eigenproblem

 59:     Level: intermediate

 61: .seealso: QEPSetProblemType(), QEPGetProblemType()
 62: E*/
 63: typedef enum { QEP_GENERAL=1,
 64:                QEP_HERMITIAN,   /* M, C, K  Hermitian */
 65:                QEP_GYROSCOPIC   /* M, K  Hermitian, M>0, C skew-Hermitian */
 66:              } QEPProblemType;

 68: /*E
 69:     QEPWhich - determines which part of the spectrum is requested

 71:     Level: intermediate

 73: .seealso: QEPSetWhichEigenpairs(), QEPGetWhichEigenpairs()
 74: E*/
 75: typedef enum { QEP_LARGEST_MAGNITUDE=1,
 76:                QEP_SMALLEST_MAGNITUDE,
 77:                QEP_LARGEST_REAL,
 78:                QEP_SMALLEST_REAL,
 79:                QEP_LARGEST_IMAGINARY,
 80:                QEP_SMALLEST_IMAGINARY } QEPWhich;









142: /*E
143:     QEPConvergedReason - reason an eigensolver was said to 
144:          have converged or diverged

146:     Level: beginner

148: .seealso: QEPSolve(), QEPGetConvergedReason(), QEPSetTolerances()
149: E*/
150: typedef enum {/* converged */
151:               QEP_CONVERGED_TOL                =  2,
152:               /* diverged */
153:               QEP_DIVERGED_ITS                 = -3,
154:               QEP_DIVERGED_BREAKDOWN           = -4,
155:               QEP_CONVERGED_ITERATING          =  0} QEPConvergedReason;




170: /*MC
171:    QEPRegisterDynamic - Adds a method to the quadratic eigenproblem solver package.

173:    Synopsis:
174:    PetscErrorCode QEPRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(QEP))

176:    Not Collective

178:    Input Parameters:
179: +  name_solver - name of a new user-defined solver
180: .  path - path (either absolute or relative) the library containing this solver
181: .  name_create - name of routine to create the solver context
182: -  routine_create - routine to create the solver context

184:    Notes:
185:    QEPRegisterDynamic() may be called multiple times to add several user-defined solvers.

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

190:    Sample usage:
191: .vb
192:    QEPRegisterDynamic("my_solver",/home/username/my_lib/lib/libO/solaris/mylib.a,
193:                "MySolverCreate",MySolverCreate);
194: .ve

196:    Then, your solver can be chosen with the procedural interface via
197: $     QEPSetType(qep,"my_solver")
198:    or at runtime via the option
199: $     -qep_type my_solver

201:    Level: advanced

203: .seealso: QEPRegisterDestroy(), QEPRegisterAll()
204: M*/
205: #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
206: #define QEPRegisterDynamic(a,b,c,d) QEPRegister(a,b,c,0)
207: #else
208: #define QEPRegisterDynamic(a,b,c,d) QEPRegister(a,b,c,d)
209: #endif

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


221: #endif