Date: 2024-12-02T08:56:43+00:00

Actual source code: slepceps.h
slepc-3.22.2 2024-12-02
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain

      6:    This file is part of SLEPc.
      7:    SLEPc is distributed under a 2-clause BSD license (see LICENSE).
      8:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      9: */
     10: /*
     11:    User interface for the SLEPc linear eigenvalue solvers
     12: */

     14: #pragma once

     16: #include <slepcst.h>
     17: #include <slepcbv.h>
     18: #include <slepcds.h>
     19: #include <slepcrg.h>
     20: #include <slepclme.h>
     21: #include <petscsnes.h>

     23: /* SUBMANSEC = EPS */

     25: SLEPC_EXTERN PetscErrorCode EPSInitializePackage(void);
     26: SLEPC_EXTERN PetscErrorCode EPSFinalizePackage(void);

     28: /*S
     29:     EPS - Abstract SLEPc object that manages all the eigenvalue
     30:     problem solvers.

     32:     Level: beginner

     34: .seealso:  EPSCreate(), ST
     35: S*/
     36: typedef struct _p_EPS* EPS;

     38: /*J
     39:     EPSType - String with the name of a SLEPc eigensolver

     41:     Level: beginner

     43: .seealso: EPSSetType(), EPS
     44: J*/
     45: typedef const char* EPSType;
     46: #define EPSPOWER       "power"
     47: #define EPSSUBSPACE    "subspace"
     48: #define EPSARNOLDI     "arnoldi"
     49: #define EPSLANCZOS     "lanczos"
     50: #define EPSKRYLOVSCHUR "krylovschur"
     51: #define EPSGD          "gd"
     52: #define EPSJD          "jd"
     53: #define EPSRQCG        "rqcg"
     54: #define EPSLOBPCG      "lobpcg"
     55: #define EPSCISS        "ciss"
     56: #define EPSLYAPII      "lyapii"
     57: #define EPSLAPACK      "lapack"
     58: #define EPSARPACK      "arpack"
     59: #define EPSTRLAN       "trlan"
     60: #define EPSBLOPEX      "blopex"
     61: #define EPSPRIMME      "primme"
     62: #define EPSFEAST       "feast"
     63: #define EPSSCALAPACK   "scalapack"
     64: #define EPSELPA        "elpa"
     65: #define EPSELEMENTAL   "elemental"
     66: #define EPSEVSL        "evsl"

     68: /* Logging support */
     69: SLEPC_EXTERN PetscClassId EPS_CLASSID;

     71: /*E
     72:     EPSProblemType - Determines the type of eigenvalue problem

     74:     Level: beginner

     76: .seealso: EPSSetProblemType(), EPSGetProblemType()
     77: E*/
     78: typedef enum { EPS_HEP=1,
     79:                EPS_GHEP,
     80:                EPS_NHEP,
     81:                EPS_GNHEP,
     82:                EPS_PGNHEP,
     83:                EPS_GHIEP,
     84:                EPS_BSE   } EPSProblemType;

     86: /*E
     87:     EPSExtraction - Determines the type of extraction technique employed
     88:     by the eigensolver

     90:     Level: advanced

     92: .seealso: EPSSetExtraction(), EPSGetExtraction()
     93: E*/
     94: typedef enum { EPS_RITZ,
     95:                EPS_HARMONIC,
     96:                EPS_HARMONIC_RELATIVE,
     97:                EPS_HARMONIC_RIGHT,
     98:                EPS_HARMONIC_LARGEST,
     99:                EPS_REFINED,
    100:                EPS_REFINED_HARMONIC } EPSExtraction;

    102: /*E
    103:     EPSWhich - Determines which part of the spectrum is requested

    105:     Level: intermediate

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

    121: /*E
    122:     EPSBalance - The type of balancing used for non-Hermitian problems

    124:     Level: intermediate

    126: .seealso: EPSSetBalance()
    127: E*/
    128: typedef enum { EPS_BALANCE_NONE,
    129:                EPS_BALANCE_ONESIDE,
    130:                EPS_BALANCE_TWOSIDE,
    131:                EPS_BALANCE_USER } EPSBalance;
    132: SLEPC_EXTERN const char *EPSBalanceTypes[];

    134: /*E
    135:     EPSErrorType - The error type used to assess accuracy of computed solutions

    137:     Level: intermediate

    139: .seealso: EPSComputeError()
    140: E*/
    141: typedef enum { EPS_ERROR_ABSOLUTE,
    142:                EPS_ERROR_RELATIVE,
    143:                EPS_ERROR_BACKWARD } EPSErrorType;
    144: SLEPC_EXTERN const char *EPSErrorTypes[];

    146: /*E
    147:     EPSConv - Determines the convergence test

    149:     Level: intermediate

    151: .seealso: EPSSetConvergenceTest(), EPSSetConvergenceTestFunction()
    152: E*/
    153: typedef enum { EPS_CONV_ABS,
    154:                EPS_CONV_REL,
    155:                EPS_CONV_NORM,
    156:                EPS_CONV_USER } EPSConv;

    158: /*E
    159:     EPSStop - Determines the stopping test

    161:     Level: advanced

    163: .seealso: EPSSetStoppingTest(), EPSSetStoppingTestFunction()
    164: E*/
    165: typedef enum { EPS_STOP_BASIC,
    166:                EPS_STOP_USER } EPSStop;

    168: /*E
    169:     EPSConvergedReason - Reason an eigensolver was said to
    170:          have converged or diverged

    172:     Level: intermediate

    174: .seealso: EPSSolve(), EPSGetConvergedReason(), EPSSetTolerances()
    175: E*/
    176: typedef enum {/* converged */
    177:               EPS_CONVERGED_TOL                =  1,
    178:               EPS_CONVERGED_USER               =  2,
    179:               /* diverged */
    180:               EPS_DIVERGED_ITS                 = -1,
    181:               EPS_DIVERGED_BREAKDOWN           = -2,
    182:               EPS_DIVERGED_SYMMETRY_LOST       = -3,
    183:               EPS_CONVERGED_ITERATING          =  0} EPSConvergedReason;
    184: SLEPC_EXTERN const char *const*EPSConvergedReasons;

    186: SLEPC_EXTERN PetscErrorCode EPSCreate(MPI_Comm,EPS*);
    187: SLEPC_EXTERN PetscErrorCode EPSDestroy(EPS*);
    188: SLEPC_EXTERN PetscErrorCode EPSReset(EPS);
    189: SLEPC_EXTERN PetscErrorCode EPSSetType(EPS,EPSType);
    190: SLEPC_EXTERN PetscErrorCode EPSGetType(EPS,EPSType*);
    191: SLEPC_EXTERN PetscErrorCode EPSSetProblemType(EPS,EPSProblemType);
    192: SLEPC_EXTERN PetscErrorCode EPSGetProblemType(EPS,EPSProblemType*);
    193: SLEPC_EXTERN PetscErrorCode EPSSetExtraction(EPS,EPSExtraction);
    194: SLEPC_EXTERN PetscErrorCode EPSGetExtraction(EPS,EPSExtraction*);
    195: SLEPC_EXTERN PetscErrorCode EPSSetBalance(EPS,EPSBalance,PetscInt,PetscReal);
    196: SLEPC_EXTERN PetscErrorCode EPSGetBalance(EPS,EPSBalance*,PetscInt*,PetscReal*);
    197: SLEPC_EXTERN PetscErrorCode EPSSetOperators(EPS,Mat,Mat);
    198: SLEPC_EXTERN PetscErrorCode EPSGetOperators(EPS,Mat*,Mat*);
    199: SLEPC_EXTERN PetscErrorCode EPSSetFromOptions(EPS);
    200: SLEPC_EXTERN PetscErrorCode EPSSetDSType(EPS);
    201: SLEPC_EXTERN PetscErrorCode EPSSetUp(EPS);
    202: SLEPC_EXTERN PetscErrorCode EPSSolve(EPS);
    203: SLEPC_EXTERN PetscErrorCode EPSView(EPS,PetscViewer);
    204: SLEPC_EXTERN PetscErrorCode EPSViewFromOptions(EPS,PetscObject,const char[]);
    205: SLEPC_EXTERN PetscErrorCode EPSErrorView(EPS,EPSErrorType,PetscViewer);
    206: PETSC_DEPRECATED_FUNCTION(3, 6, 0, "EPSErrorView()", ) static inline PetscErrorCode EPSPrintSolution(EPS eps,PetscViewer v) {return EPSErrorView(eps,EPS_ERROR_RELATIVE,v);}
    207: SLEPC_EXTERN PetscErrorCode EPSErrorViewFromOptions(EPS);
    208: SLEPC_EXTERN PetscErrorCode EPSConvergedReasonView(EPS,PetscViewer);
    209: SLEPC_EXTERN PetscErrorCode EPSConvergedReasonViewFromOptions(EPS);
    210: PETSC_DEPRECATED_FUNCTION(3, 14, 0, "EPSConvergedReasonView()", ) static inline PetscErrorCode EPSReasonView(EPS eps,PetscViewer v) {return EPSConvergedReasonView(eps,v);}
    211: PETSC_DEPRECATED_FUNCTION(3, 14, 0, "EPSConvergedReasonViewFromOptions()", ) static inline PetscErrorCode EPSReasonViewFromOptions(EPS eps) {return EPSConvergedReasonViewFromOptions(eps);}
    212: SLEPC_EXTERN PetscErrorCode EPSValuesView(EPS,PetscViewer);
    213: SLEPC_EXTERN PetscErrorCode EPSValuesViewFromOptions(EPS);
    214: SLEPC_EXTERN PetscErrorCode EPSVectorsView(EPS,PetscViewer);
    215: SLEPC_EXTERN PetscErrorCode EPSVectorsViewFromOptions(EPS);

    217: SLEPC_EXTERN PetscErrorCode EPSSetTarget(EPS,PetscScalar);
    218: SLEPC_EXTERN PetscErrorCode EPSGetTarget(EPS,PetscScalar*);
    219: SLEPC_EXTERN PetscErrorCode EPSSetInterval(EPS,PetscReal,PetscReal);
    220: SLEPC_EXTERN PetscErrorCode EPSGetInterval(EPS,PetscReal*,PetscReal*);
    221: SLEPC_EXTERN PetscErrorCode EPSSetST(EPS,ST);
    222: SLEPC_EXTERN PetscErrorCode EPSGetST(EPS,ST*);
    223: SLEPC_EXTERN PetscErrorCode EPSSetBV(EPS,BV);
    224: SLEPC_EXTERN PetscErrorCode EPSGetBV(EPS,BV*);
    225: SLEPC_EXTERN PetscErrorCode EPSSetRG(EPS,RG);
    226: SLEPC_EXTERN PetscErrorCode EPSGetRG(EPS,RG*);
    227: SLEPC_EXTERN PetscErrorCode EPSSetDS(EPS,DS);
    228: SLEPC_EXTERN PetscErrorCode EPSGetDS(EPS,DS*);
    229: SLEPC_EXTERN PetscErrorCode EPSSetTolerances(EPS,PetscReal,PetscInt);
    230: SLEPC_EXTERN PetscErrorCode EPSGetTolerances(EPS,PetscReal*,PetscInt*);
    231: SLEPC_EXTERN PetscErrorCode EPSSetConvergenceTest(EPS,EPSConv);
    232: SLEPC_EXTERN PetscErrorCode EPSGetConvergenceTest(EPS,EPSConv*);
    233: SLEPC_EXTERN PetscErrorCode EPSConvergedAbsolute(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
    234: SLEPC_EXTERN PetscErrorCode EPSConvergedRelative(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
    235: SLEPC_EXTERN PetscErrorCode EPSConvergedNorm(EPS,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
    236: SLEPC_EXTERN PetscErrorCode EPSSetStoppingTest(EPS,EPSStop);
    237: SLEPC_EXTERN PetscErrorCode EPSGetStoppingTest(EPS,EPSStop*);
    238: SLEPC_EXTERN PetscErrorCode EPSStoppingBasic(EPS,PetscInt,PetscInt,PetscInt,PetscInt,EPSConvergedReason*,void*);
    239: SLEPC_EXTERN PetscErrorCode EPSGetConvergedReason(EPS,EPSConvergedReason*);

    241: SLEPC_EXTERN PetscErrorCode EPSSetDimensions(EPS,PetscInt,PetscInt,PetscInt);
    242: SLEPC_EXTERN PetscErrorCode EPSGetDimensions(EPS,PetscInt*,PetscInt*,PetscInt*);

    244: SLEPC_EXTERN PetscErrorCode EPSGetConverged(EPS,PetscInt*);
    245: SLEPC_EXTERN PetscErrorCode EPSGetEigenpair(EPS,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec);
    246: SLEPC_EXTERN PetscErrorCode EPSGetEigenvalue(EPS,PetscInt,PetscScalar*,PetscScalar*);
    247: SLEPC_EXTERN PetscErrorCode EPSGetEigenvector(EPS,PetscInt,Vec,Vec);
    248: SLEPC_EXTERN PetscErrorCode EPSGetLeftEigenvector(EPS,PetscInt,Vec,Vec);

    250: SLEPC_EXTERN PetscErrorCode EPSComputeError(EPS,PetscInt,EPSErrorType,PetscReal*);
    251: PETSC_DEPRECATED_FUNCTION(3, 6, 0, "EPSComputeError()", ) static inline PetscErrorCode EPSComputeRelativeError(EPS eps,PetscInt i,PetscReal *r) {return EPSComputeError(eps,i,EPS_ERROR_RELATIVE,r);}
    252: PETSC_DEPRECATED_FUNCTION(3, 6, 0, "EPSComputeError() with EPS_ERROR_ABSOLUTE", ) static inline PetscErrorCode EPSComputeResidualNorm(EPS eps,PetscInt i,PetscReal *r) {return EPSComputeError(eps,i,EPS_ERROR_ABSOLUTE,r);}
    253: SLEPC_EXTERN PetscErrorCode EPSGetInvariantSubspace(EPS,Vec[]);
    254: SLEPC_EXTERN PetscErrorCode EPSGetErrorEstimate(EPS,PetscInt,PetscReal*);
    255: SLEPC_EXTERN PetscErrorCode EPSGetIterationNumber(EPS,PetscInt*);

    257: SLEPC_EXTERN PetscErrorCode EPSSetWhichEigenpairs(EPS,EPSWhich);
    258: SLEPC_EXTERN PetscErrorCode EPSGetWhichEigenpairs(EPS,EPSWhich*);
    259: SLEPC_EXTERN PetscErrorCode EPSSetTwoSided(EPS,PetscBool);
    260: SLEPC_EXTERN PetscErrorCode EPSGetTwoSided(EPS,PetscBool*);
    261: SLEPC_EXTERN PetscErrorCode EPSSetTrueResidual(EPS,PetscBool);
    262: SLEPC_EXTERN PetscErrorCode EPSGetTrueResidual(EPS,PetscBool*);
    263: SLEPC_EXTERN PetscErrorCode EPSSetPurify(EPS,PetscBool);
    264: SLEPC_EXTERN PetscErrorCode EPSGetPurify(EPS,PetscBool*);
    265: SLEPC_EXTERN PetscErrorCode EPSIsGeneralized(EPS,PetscBool*);
    266: SLEPC_EXTERN PetscErrorCode EPSIsHermitian(EPS,PetscBool*);
    267: SLEPC_EXTERN PetscErrorCode EPSIsPositive(EPS,PetscBool*);
    268: SLEPC_EXTERN PetscErrorCode EPSIsStructured(EPS,PetscBool*);

    270: SLEPC_EXTERN PetscErrorCode EPSSetTrackAll(EPS,PetscBool);
    271: SLEPC_EXTERN PetscErrorCode EPSGetTrackAll(EPS,PetscBool*);

    273: SLEPC_EXTERN PetscErrorCode EPSSetDeflationSpace(EPS,PetscInt,Vec[]);
    274: SLEPC_EXTERN PetscErrorCode EPSSetInitialSpace(EPS,PetscInt,Vec[]);
    275: SLEPC_EXTERN PetscErrorCode EPSSetLeftInitialSpace(EPS,PetscInt,Vec[]);

    277: SLEPC_EXTERN PetscErrorCode EPSMonitor(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt);
    278: SLEPC_EXTERN PetscErrorCode EPSMonitorSet(EPS,PetscErrorCode (*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**));
    279: SLEPC_EXTERN PetscErrorCode EPSMonitorCancel(EPS);
    280: SLEPC_EXTERN PetscErrorCode EPSGetMonitorContext(EPS,void*);

    282: SLEPC_EXTERN PetscErrorCode EPSMonitorSetFromOptions(EPS,const char[],const char[],void*,PetscBool);
    283: SLEPC_EXTERN PetscErrorCode EPSMonitorLGCreate(MPI_Comm,const char[],const char[],const char[],PetscInt,const char*[],int,int,int,int,PetscDrawLG*);
    284: SLEPC_EXTERN PetscErrorCode EPSMonitorFirst(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    285: SLEPC_EXTERN PetscErrorCode EPSMonitorFirstDrawLG(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    286: SLEPC_EXTERN PetscErrorCode EPSMonitorFirstDrawLGCreate(PetscViewer,PetscViewerFormat,void *,PetscViewerAndFormat**);
    287: SLEPC_EXTERN PetscErrorCode EPSMonitorAll(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    288: SLEPC_EXTERN PetscErrorCode EPSMonitorAllDrawLG(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    289: SLEPC_EXTERN PetscErrorCode EPSMonitorAllDrawLGCreate(PetscViewer,PetscViewerFormat,void *,PetscViewerAndFormat**);
    290: SLEPC_EXTERN PetscErrorCode EPSMonitorConverged(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    291: SLEPC_EXTERN PetscErrorCode EPSMonitorConvergedCreate(PetscViewer,PetscViewerFormat,void *,PetscViewerAndFormat**);
    292: SLEPC_EXTERN PetscErrorCode EPSMonitorConvergedDrawLG(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    293: SLEPC_EXTERN PetscErrorCode EPSMonitorConvergedDrawLGCreate(PetscViewer,PetscViewerFormat,void *,PetscViewerAndFormat**);
    294: SLEPC_EXTERN PetscErrorCode EPSMonitorConvergedDestroy(PetscViewerAndFormat**);

    296: SLEPC_EXTERN PetscErrorCode EPSSetOptionsPrefix(EPS,const char*);
    297: SLEPC_EXTERN PetscErrorCode EPSAppendOptionsPrefix(EPS,const char*);
    298: SLEPC_EXTERN PetscErrorCode EPSGetOptionsPrefix(EPS,const char*[]);

    300: SLEPC_EXTERN PetscFunctionList EPSList;
    301: SLEPC_EXTERN PetscFunctionList EPSMonitorList;
    302: SLEPC_EXTERN PetscFunctionList EPSMonitorCreateList;
    303: SLEPC_EXTERN PetscFunctionList EPSMonitorDestroyList;
    304: SLEPC_EXTERN PetscErrorCode EPSRegister(const char[],PetscErrorCode(*)(EPS));
    305: SLEPC_EXTERN PetscErrorCode EPSMonitorRegister(const char[],PetscViewerType,PetscViewerFormat,PetscErrorCode(*)(EPS,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscErrorCode(*)(PetscViewer,PetscViewerFormat,void*,PetscViewerAndFormat**),PetscErrorCode(*)(PetscViewerAndFormat**));

    307: SLEPC_EXTERN PetscErrorCode EPSSetWorkVecs(EPS,PetscInt);
    308: SLEPC_EXTERN PetscErrorCode EPSAllocateSolution(EPS,PetscInt);

    310: /*S
    311:   EPSConvergenceTestFn - A prototype of an EPS convergence test function that would be passed to EPSSetConvergenceTestFunction()

    313:   Calling Sequence:
    314: +   eps    - eigensolver context obtained from EPSCreate()
    315: .   eigr   - real part of the eigenvalue
    316: .   eigi   - imaginary part of the eigenvalue
    317: .   res    - residual norm associated to the eigenpair
    318: .   errest - [output] computed error estimate
    319: -   ctx    - [optional] user-defined context for private data for the
    320:              convergence test routine (may be NULL)

    322:   Level: advanced

    324: .seealso: EPSSetConvergenceTestFunction()
    325: S*/
    326: PETSC_EXTERN_TYPEDEF typedef PetscErrorCode(EPSConvergenceTestFn)(EPS eps,PetscScalar eigr,PetscScalar eigi,PetscReal res,PetscReal *errest,void *ctx);

    328: /*S
    329:   EPSStoppingTestFn - A prototype of an EPS stopping test function that would be passed to EPSSetStoppingTestFunction()

    331:   Calling Sequence:
    332: +   eps    - eigensolver context obtained from EPSCreate()
    333: .   its    - current number of iterations
    334: .   max_it - maximum number of iterations
    335: .   nconv  - number of currently converged eigenpairs
    336: .   nev    - number of requested eigenpairs
    337: .   reason - [output] result of the stopping test
    338: -   ctx    - [optional] user-defined context for private data for the
    339:              stopping test routine (may be NULL)

    341:   Level: advanced

    343: .seealso: EPSSetStoppingTestFunction()
    344: S*/
    345: PETSC_EXTERN_TYPEDEF typedef PetscErrorCode(EPSStoppingTestFn)(EPS eps,PetscInt its,PetscInt max_it,PetscInt nconv,PetscInt nev,EPSConvergedReason *reason,void *ctx);

    347: SLEPC_EXTERN PetscErrorCode EPSSetConvergenceTestFunction(EPS,EPSConvergenceTestFn*,void*,PetscErrorCode (*)(void*));
    348: SLEPC_EXTERN PetscErrorCode EPSSetStoppingTestFunction(EPS,EPSStoppingTestFn*,void*,PetscErrorCode (*)(void*));
    349: SLEPC_EXTERN PetscErrorCode EPSSetEigenvalueComparison(EPS,SlepcEigenvalueComparisonFn*,void*);
    350: SLEPC_EXTERN PetscErrorCode EPSSetArbitrarySelection(EPS,SlepcArbitrarySelectionFn*,void*);

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

    354: /*E
    355:     EPSPowerShiftType - determines the type of shift used in the Power iteration

    357:     Level: advanced

    359: .seealso: EPSPowerSetShiftType(), EPSPowerGetShiftType()
    360: E*/
    361: typedef enum { EPS_POWER_SHIFT_CONSTANT,
    362:                EPS_POWER_SHIFT_RAYLEIGH,
    363:                EPS_POWER_SHIFT_WILKINSON } EPSPowerShiftType;
    364: SLEPC_EXTERN const char *EPSPowerShiftTypes[];

    366: SLEPC_EXTERN PetscErrorCode EPSPowerSetShiftType(EPS,EPSPowerShiftType);
    367: SLEPC_EXTERN PetscErrorCode EPSPowerGetShiftType(EPS,EPSPowerShiftType*);
    368: SLEPC_EXTERN PetscErrorCode EPSPowerSetNonlinear(EPS,PetscBool);
    369: SLEPC_EXTERN PetscErrorCode EPSPowerGetNonlinear(EPS,PetscBool*);
    370: SLEPC_EXTERN PetscErrorCode EPSPowerSetUpdate(EPS,PetscBool);
    371: SLEPC_EXTERN PetscErrorCode EPSPowerGetUpdate(EPS,PetscBool*);
    372: SLEPC_EXTERN PetscErrorCode EPSPowerSetSignNormalization(EPS,PetscBool);
    373: SLEPC_EXTERN PetscErrorCode EPSPowerGetSignNormalization(EPS,PetscBool*);
    374: SLEPC_EXTERN PetscErrorCode EPSPowerSetSNES(EPS,SNES);
    375: SLEPC_EXTERN PetscErrorCode EPSPowerGetSNES(EPS,SNES*);

    377: SLEPC_EXTERN PetscErrorCode EPSArnoldiSetDelayed(EPS,PetscBool);
    378: SLEPC_EXTERN PetscErrorCode EPSArnoldiGetDelayed(EPS,PetscBool*);

    380: /*E
    381:     EPSKrylovSchurBSEType - the method to be used in the Krylov-Schur solver
    382:     for the case of BSE structured eigenproblems

    384:     Level: advanced

    386: .seealso: EPSKrylovSchurSetBSEType(), EPSKrylovSchurGetBSEType()
    387: E*/
    388: typedef enum { EPS_KRYLOVSCHUR_BSE_SHAO,
    389:                EPS_KRYLOVSCHUR_BSE_GRUNING,
    390:                EPS_KRYLOVSCHUR_BSE_PROJECTEDBSE } EPSKrylovSchurBSEType;
    391: SLEPC_EXTERN const char *EPSKrylovSchurBSETypes[];

    393: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurSetBSEType(EPS,EPSKrylovSchurBSEType);
    394: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetBSEType(EPS,EPSKrylovSchurBSEType*);
    395: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurSetRestart(EPS,PetscReal);
    396: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetRestart(EPS,PetscReal*);
    397: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurSetLocking(EPS,PetscBool);
    398: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetLocking(EPS,PetscBool*);
    399: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurSetPartitions(EPS,PetscInt);
    400: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetPartitions(EPS,PetscInt*);
    401: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurSetDetectZeros(EPS,PetscBool);
    402: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetDetectZeros(EPS,PetscBool*);
    403: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurSetDimensions(EPS,PetscInt,PetscInt,PetscInt);
    404: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetDimensions(EPS,PetscInt*,PetscInt*,PetscInt*);
    405: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurSetSubintervals(EPS,PetscReal*);
    406: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetSubintervals(EPS,PetscReal**);
    407: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetInertias(EPS,PetscInt*,PetscReal**,PetscInt**);
    408: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetSubcommInfo(EPS,PetscInt*,PetscInt*,Vec*);
    409: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetSubcommPairs(EPS,PetscInt,PetscScalar*,Vec);
    410: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetSubcommMats(EPS,Mat*,Mat*);
    411: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurUpdateSubcommMats(EPS,PetscScalar,PetscScalar,Mat,PetscScalar,PetscScalar, Mat,MatStructure,PetscBool);
    412: SLEPC_EXTERN PetscErrorCode EPSKrylovSchurGetKSP(EPS,KSP*);

    414: /*E
    415:     EPSLanczosReorthogType - determines the type of reorthogonalization
    416:     used in the Lanczos method

    418:     Level: advanced

    420: .seealso: EPSLanczosSetReorthog(), EPSLanczosGetReorthog()
    421: E*/
    422: typedef enum { EPS_LANCZOS_REORTHOG_LOCAL,
    423:                EPS_LANCZOS_REORTHOG_FULL,
    424:                EPS_LANCZOS_REORTHOG_SELECTIVE,
    425:                EPS_LANCZOS_REORTHOG_PERIODIC,
    426:                EPS_LANCZOS_REORTHOG_PARTIAL,
    427:                EPS_LANCZOS_REORTHOG_DELAYED } EPSLanczosReorthogType;
    428: SLEPC_EXTERN const char *EPSLanczosReorthogTypes[];

    430: SLEPC_EXTERN PetscErrorCode EPSLanczosSetReorthog(EPS,EPSLanczosReorthogType);
    431: SLEPC_EXTERN PetscErrorCode EPSLanczosGetReorthog(EPS,EPSLanczosReorthogType*);

    433: /*E
    434:     EPSPRIMMEMethod - determines the method selected in the PRIMME library

    436:     Level: advanced

    438: .seealso: EPSPRIMMESetMethod(), EPSPRIMMEGetMethod()
    439: E*/
    440: typedef enum { EPS_PRIMME_DYNAMIC=1,
    441:                EPS_PRIMME_DEFAULT_MIN_TIME,
    442:                EPS_PRIMME_DEFAULT_MIN_MATVECS,
    443:                EPS_PRIMME_ARNOLDI,
    444:                EPS_PRIMME_GD,
    445:                EPS_PRIMME_GD_PLUSK,
    446:                EPS_PRIMME_GD_OLSEN_PLUSK,
    447:                EPS_PRIMME_JD_OLSEN_PLUSK,
    448:                EPS_PRIMME_RQI,
    449:                EPS_PRIMME_JDQR,
    450:                EPS_PRIMME_JDQMR,
    451:                EPS_PRIMME_JDQMR_ETOL,
    452:                EPS_PRIMME_SUBSPACE_ITERATION,
    453:                EPS_PRIMME_LOBPCG_ORTHOBASIS,
    454:                EPS_PRIMME_LOBPCG_ORTHOBASISW } EPSPRIMMEMethod;
    455: SLEPC_EXTERN const char *EPSPRIMMEMethods[];

    457: SLEPC_EXTERN PetscErrorCode EPSPRIMMESetBlockSize(EPS,PetscInt);
    458: SLEPC_EXTERN PetscErrorCode EPSPRIMMEGetBlockSize(EPS,PetscInt*);
    459: SLEPC_EXTERN PetscErrorCode EPSPRIMMESetMethod(EPS,EPSPRIMMEMethod);
    460: SLEPC_EXTERN PetscErrorCode EPSPRIMMEGetMethod(EPS,EPSPRIMMEMethod*);

    462: SLEPC_EXTERN PetscErrorCode EPSGDSetKrylovStart(EPS,PetscBool);
    463: SLEPC_EXTERN PetscErrorCode EPSGDGetKrylovStart(EPS,PetscBool*);
    464: SLEPC_EXTERN PetscErrorCode EPSGDSetBlockSize(EPS,PetscInt);
    465: SLEPC_EXTERN PetscErrorCode EPSGDGetBlockSize(EPS,PetscInt*);
    466: SLEPC_EXTERN PetscErrorCode EPSGDSetRestart(EPS,PetscInt,PetscInt);
    467: SLEPC_EXTERN PetscErrorCode EPSGDGetRestart(EPS,PetscInt*,PetscInt*);
    468: SLEPC_EXTERN PetscErrorCode EPSGDSetInitialSize(EPS,PetscInt);
    469: SLEPC_EXTERN PetscErrorCode EPSGDGetInitialSize(EPS,PetscInt*);
    470: SLEPC_EXTERN PetscErrorCode EPSGDSetBOrth(EPS,PetscBool);
    471: SLEPC_EXTERN PetscErrorCode EPSGDGetBOrth(EPS,PetscBool*);
    472: SLEPC_EXTERN PetscErrorCode EPSGDSetDoubleExpansion(EPS,PetscBool);
    473: SLEPC_EXTERN PetscErrorCode EPSGDGetDoubleExpansion(EPS,PetscBool*);

    475: SLEPC_EXTERN PetscErrorCode EPSJDSetKrylovStart(EPS,PetscBool);
    476: SLEPC_EXTERN PetscErrorCode EPSJDGetKrylovStart(EPS,PetscBool*);
    477: SLEPC_EXTERN PetscErrorCode EPSJDSetBlockSize(EPS,PetscInt);
    478: SLEPC_EXTERN PetscErrorCode EPSJDGetBlockSize(EPS,PetscInt*);
    479: SLEPC_EXTERN PetscErrorCode EPSJDSetRestart(EPS,PetscInt,PetscInt);
    480: SLEPC_EXTERN PetscErrorCode EPSJDGetRestart(EPS,PetscInt*,PetscInt*);
    481: SLEPC_EXTERN PetscErrorCode EPSJDSetInitialSize(EPS,PetscInt);
    482: SLEPC_EXTERN PetscErrorCode EPSJDGetInitialSize(EPS,PetscInt*);
    483: SLEPC_EXTERN PetscErrorCode EPSJDSetFix(EPS,PetscReal);
    484: SLEPC_EXTERN PetscErrorCode EPSJDGetFix(EPS,PetscReal*);
    485: SLEPC_EXTERN PetscErrorCode EPSJDSetConstCorrectionTol(EPS,PetscBool);
    486: SLEPC_EXTERN PetscErrorCode EPSJDGetConstCorrectionTol(EPS,PetscBool*);
    487: SLEPC_EXTERN PetscErrorCode EPSJDSetBOrth(EPS,PetscBool);
    488: SLEPC_EXTERN PetscErrorCode EPSJDGetBOrth(EPS,PetscBool*);

    490: SLEPC_EXTERN PetscErrorCode EPSRQCGSetReset(EPS,PetscInt);
    491: SLEPC_EXTERN PetscErrorCode EPSRQCGGetReset(EPS,PetscInt*);

    493: SLEPC_EXTERN PetscErrorCode EPSLOBPCGSetBlockSize(EPS,PetscInt);
    494: SLEPC_EXTERN PetscErrorCode EPSLOBPCGGetBlockSize(EPS,PetscInt*);
    495: SLEPC_EXTERN PetscErrorCode EPSLOBPCGSetRestart(EPS,PetscReal);
    496: SLEPC_EXTERN PetscErrorCode EPSLOBPCGGetRestart(EPS,PetscReal*);
    497: SLEPC_EXTERN PetscErrorCode EPSLOBPCGSetLocking(EPS,PetscBool);
    498: SLEPC_EXTERN PetscErrorCode EPSLOBPCGGetLocking(EPS,PetscBool*);

    500: /*E
    501:     EPSCISSQuadRule - determines the quadrature rule in the CISS solver

    503:     Level: advanced

    505: .seealso: EPSCISSSetQuadRule(), EPSCISSGetQuadRule()
    506: E*/
    507: typedef enum { EPS_CISS_QUADRULE_TRAPEZOIDAL=1,
    508:                EPS_CISS_QUADRULE_CHEBYSHEV } EPSCISSQuadRule;
    509: SLEPC_EXTERN const char *EPSCISSQuadRules[];

    511: /*E
    512:     EPSCISSExtraction - determines the extraction technique in the CISS solver

    514:     Level: advanced

    516: .seealso: EPSCISSSetExtraction(), EPSCISSGetExtraction()
    517: E*/
    518: typedef enum { EPS_CISS_EXTRACTION_RITZ,
    519:                EPS_CISS_EXTRACTION_HANKEL } EPSCISSExtraction;
    520: SLEPC_EXTERN const char *EPSCISSExtractions[];

    522: SLEPC_EXTERN PetscErrorCode EPSCISSSetExtraction(EPS,EPSCISSExtraction);
    523: SLEPC_EXTERN PetscErrorCode EPSCISSGetExtraction(EPS,EPSCISSExtraction*);
    524: SLEPC_EXTERN PetscErrorCode EPSCISSSetQuadRule(EPS,EPSCISSQuadRule);
    525: SLEPC_EXTERN PetscErrorCode EPSCISSGetQuadRule(EPS,EPSCISSQuadRule*);
    526: SLEPC_EXTERN PetscErrorCode EPSCISSSetSizes(EPS,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool);
    527: SLEPC_EXTERN PetscErrorCode EPSCISSGetSizes(EPS,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*);
    528: SLEPC_EXTERN PetscErrorCode EPSCISSSetThreshold(EPS,PetscReal,PetscReal);
    529: SLEPC_EXTERN PetscErrorCode EPSCISSGetThreshold(EPS,PetscReal*,PetscReal*);
    530: SLEPC_EXTERN PetscErrorCode EPSCISSSetRefinement(EPS,PetscInt,PetscInt);
    531: SLEPC_EXTERN PetscErrorCode EPSCISSGetRefinement(EPS,PetscInt*,PetscInt*);
    532: SLEPC_EXTERN PetscErrorCode EPSCISSSetUseST(EPS,PetscBool);
    533: SLEPC_EXTERN PetscErrorCode EPSCISSGetUseST(EPS,PetscBool*);
    534: SLEPC_EXTERN PetscErrorCode EPSCISSGetKSPs(EPS,PetscInt*,KSP**);

    536: SLEPC_EXTERN PetscErrorCode EPSLyapIISetLME(EPS,LME);
    537: SLEPC_EXTERN PetscErrorCode EPSLyapIIGetLME(EPS,LME*);
    538: SLEPC_EXTERN PetscErrorCode EPSLyapIISetRanks(EPS,PetscInt,PetscInt);
    539: SLEPC_EXTERN PetscErrorCode EPSLyapIIGetRanks(EPS,PetscInt*,PetscInt*);

    541: SLEPC_EXTERN PetscErrorCode EPSBLOPEXSetBlockSize(EPS,PetscInt);
    542: SLEPC_EXTERN PetscErrorCode EPSBLOPEXGetBlockSize(EPS,PetscInt*);

    544: /*E
    545:     EPSEVSLDOSMethod - the method to approximate the density of states (DOS) in the EVSL solver

    547:     Level: advanced

    549: .seealso: EPSEVSLSetDOSParameters(), EPSEVSLGetDOSParameters()
    550: E*/
    551: typedef enum { EPS_EVSL_DOS_KPM,
    552:                EPS_EVSL_DOS_LANCZOS } EPSEVSLDOSMethod;
    553: SLEPC_EXTERN const char *EPSEVSLDOSMethods[];

    555: /*E
    556:     EPSEVSLDamping - the damping type used in the EVSL solver

    558:     Level: advanced

    560: .seealso: EPSEVSLSetDOSParameters(), EPSEVSLGetDOSParameters()
    561: E*/
    562: typedef enum { EPS_EVSL_DAMPING_NONE,
    563:                EPS_EVSL_DAMPING_JACKSON,
    564:                EPS_EVSL_DAMPING_SIGMA } EPSEVSLDamping;
    565: SLEPC_EXTERN const char *EPSEVSLDampings[];

    567: SLEPC_EXTERN PetscErrorCode EPSEVSLSetRange(EPS,PetscReal,PetscReal);
    568: SLEPC_EXTERN PetscErrorCode EPSEVSLGetRange(EPS,PetscReal*,PetscReal*);
    569: SLEPC_EXTERN PetscErrorCode EPSEVSLSetSlices(EPS,PetscInt);
    570: SLEPC_EXTERN PetscErrorCode EPSEVSLGetSlices(EPS,PetscInt*);
    571: SLEPC_EXTERN PetscErrorCode EPSEVSLSetDOSParameters(EPS,EPSEVSLDOSMethod,PetscInt,PetscInt,PetscInt,PetscInt);
    572: SLEPC_EXTERN PetscErrorCode EPSEVSLGetDOSParameters(EPS,EPSEVSLDOSMethod*,PetscInt*,PetscInt*,PetscInt*,PetscInt*);
    573: SLEPC_EXTERN PetscErrorCode EPSEVSLSetPolParameters(EPS,PetscInt,PetscReal);
    574: SLEPC_EXTERN PetscErrorCode EPSEVSLGetPolParameters(EPS,PetscInt*,PetscReal*);
    575: SLEPC_EXTERN PetscErrorCode EPSEVSLSetDamping(EPS,EPSEVSLDamping);
    576: SLEPC_EXTERN PetscErrorCode EPSEVSLGetDamping(EPS,EPSEVSLDamping*);

    578: SLEPC_EXTERN PetscErrorCode EPSFEASTSetNumPoints(EPS,PetscInt);
    579: SLEPC_EXTERN PetscErrorCode EPSFEASTGetNumPoints(EPS,PetscInt*);