Date: 2022-10-01T06:40:52+00:00

Actual source code: slepcnep.h
slepc-3.18.0 2022-10-01
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 SLEPc's nonlinear eigenvalue solvers
     12: */

     14: #if !defined(SLEPCNEP_H)
     15: #define SLEPCNEP_H

     17: #include <slepceps.h>
     18: #include <slepcpep.h>
     19: #include <slepcfn.h>

     21: /* SUBMANSEC = NEP */

     23: SLEPC_EXTERN PetscErrorCode NEPInitializePackage(void);

     25: /*S
     26:      NEP - Abstract SLEPc object that manages all solvers for
     27:      nonlinear eigenvalue problems.

     29:    Level: beginner

     31: .seealso:  NEPCreate()
     32: S*/
     33: typedef struct _p_NEP* NEP;

     35: /*J
     36:     NEPType - String with the name of a nonlinear eigensolver

     38:    Level: beginner

     40: .seealso: NEPSetType(), NEP
     41: J*/
     42: typedef const char* NEPType;
     43: #define NEPRII       "rii"
     44: #define NEPSLP       "slp"
     45: #define NEPNARNOLDI  "narnoldi"
     46: #define NEPCISS      "ciss"
     47: #define NEPINTERPOL  "interpol"
     48: #define NEPNLEIGS    "nleigs"

     50: /* Logging support */
     51: SLEPC_EXTERN PetscClassId NEP_CLASSID;

     53: /*E
     54:     NEPProblemType - Determines the type of the nonlinear eigenproblem

     56:     Level: intermediate

     58: .seealso: NEPSetProblemType(), NEPGetProblemType()
     59: E*/
     60: typedef enum { NEP_GENERAL=1,
     61:                NEP_RATIONAL     /* NEP defined in split form with all f_i rational */
     62:              } NEPProblemType;

     64: /*E
     65:     NEPWhich - Determines which part of the spectrum is requested

     67:     Level: intermediate

     69: .seealso: NEPSetWhichEigenpairs(), NEPGetWhichEigenpairs()
     70: E*/
     71: typedef enum { NEP_LARGEST_MAGNITUDE=1,
     72:                NEP_SMALLEST_MAGNITUDE,
     73:                NEP_LARGEST_REAL,
     74:                NEP_SMALLEST_REAL,
     75:                NEP_LARGEST_IMAGINARY,
     76:                NEP_SMALLEST_IMAGINARY,
     77:                NEP_TARGET_MAGNITUDE,
     78:                NEP_TARGET_REAL,
     79:                NEP_TARGET_IMAGINARY,
     80:                NEP_ALL,
     81:                NEP_WHICH_USER } NEPWhich;

     83: /*E
     84:     NEPErrorType - The error type used to assess accuracy of computed solutions

     86:     Level: intermediate

     88: .seealso: NEPComputeError()
     89: E*/
     90: typedef enum { NEP_ERROR_ABSOLUTE,
     91:                NEP_ERROR_RELATIVE,
     92:                NEP_ERROR_BACKWARD } NEPErrorType;
     93: SLEPC_EXTERN const char *NEPErrorTypes[];

     95: /*E
     96:     NEPRefine - The refinement type

     98:     Level: intermediate

    100: .seealso: NEPSetRefine()
    101: E*/
    102: typedef enum { NEP_REFINE_NONE,
    103:                NEP_REFINE_SIMPLE,
    104:                NEP_REFINE_MULTIPLE } NEPRefine;
    105: SLEPC_EXTERN const char *NEPRefineTypes[];

    107: /*E
    108:     NEPRefineScheme - The scheme used for solving linear systems during iterative refinement

    110:     Level: intermediate

    112: .seealso: NEPSetRefine()
    113: E*/
    114: typedef enum { NEP_REFINE_SCHEME_SCHUR=1,
    115:                NEP_REFINE_SCHEME_MBE,
    116:                NEP_REFINE_SCHEME_EXPLICIT } NEPRefineScheme;
    117: SLEPC_EXTERN const char *NEPRefineSchemes[];

    119: /*E
    120:     NEPConv - Determines the convergence test

    122:     Level: intermediate

    124: .seealso: NEPSetConvergenceTest(), NEPSetConvergenceTestFunction()
    125: E*/
    126: typedef enum { NEP_CONV_ABS,
    127:                NEP_CONV_REL,
    128:                NEP_CONV_NORM,
    129:                NEP_CONV_USER } NEPConv;

    131: /*E
    132:     NEPStop - Determines the stopping test

    134:     Level: advanced

    136: .seealso: NEPSetStoppingTest(), NEPSetStoppingTestFunction()
    137: E*/
    138: typedef enum { NEP_STOP_BASIC,
    139:                NEP_STOP_USER } NEPStop;

    141: /*E
    142:     NEPConvergedReason - Reason a nonlinear eigensolver was said to
    143:          have converged or diverged

    145:     Level: intermediate

    147: .seealso: NEPSolve(), NEPGetConvergedReason(), NEPSetTolerances()
    148: E*/
    149: typedef enum {/* converged */
    150:               NEP_CONVERGED_TOL                =  1,
    151:               NEP_CONVERGED_USER               =  2,
    152:               /* diverged */
    153:               NEP_DIVERGED_ITS                 = -1,
    154:               NEP_DIVERGED_BREAKDOWN           = -2,
    155:                     /* unused                  = -3 */
    156:               NEP_DIVERGED_LINEAR_SOLVE        = -4,
    157:               NEP_DIVERGED_SUBSPACE_EXHAUSTED  = -5,
    158:               NEP_CONVERGED_ITERATING          =  0} NEPConvergedReason;
    159: SLEPC_EXTERN const char *const*NEPConvergedReasons;

    161: SLEPC_EXTERN PetscErrorCode NEPCreate(MPI_Comm,NEP*);
    162: SLEPC_EXTERN PetscErrorCode NEPDestroy(NEP*);
    163: SLEPC_EXTERN PetscErrorCode NEPReset(NEP);
    164: SLEPC_EXTERN PetscErrorCode NEPSetType(NEP,NEPType);
    165: SLEPC_EXTERN PetscErrorCode NEPGetType(NEP,NEPType*);
    166: SLEPC_EXTERN PetscErrorCode NEPSetProblemType(NEP,NEPProblemType);
    167: SLEPC_EXTERN PetscErrorCode NEPGetProblemType(NEP,NEPProblemType*);
    168: SLEPC_EXTERN PetscErrorCode NEPSetTarget(NEP,PetscScalar);
    169: SLEPC_EXTERN PetscErrorCode NEPGetTarget(NEP,PetscScalar*);
    170: SLEPC_EXTERN PetscErrorCode NEPSetFromOptions(NEP);
    171: SLEPC_EXTERN PetscErrorCode NEPSetUp(NEP);
    172: SLEPC_EXTERN PetscErrorCode NEPSolve(NEP);
    173: SLEPC_EXTERN PetscErrorCode NEPView(NEP,PetscViewer);
    174: SLEPC_EXTERN PetscErrorCode NEPViewFromOptions(NEP,PetscObject,const char[]);
    175: SLEPC_EXTERN PetscErrorCode NEPErrorView(NEP,NEPErrorType,PetscViewer);
    176: SLEPC_EXTERN PetscErrorCode NEPErrorViewFromOptions(NEP);
    177: SLEPC_EXTERN PetscErrorCode NEPConvergedReasonView(NEP,PetscViewer);
    178: SLEPC_EXTERN PetscErrorCode NEPConvergedReasonViewFromOptions(NEP);
    179: PETSC_DEPRECATED_FUNCTION("Use NEPConvergedReasonView() (since version 3.14)") static inline PetscErrorCode NEPReasonView(NEP nep,PetscViewer v) {return NEPConvergedReasonView(nep,v);}
    180: PETSC_DEPRECATED_FUNCTION("Use NEPConvergedReasonViewFromOptions() (since version 3.14)") static inline PetscErrorCode NEPReasonViewFromOptions(NEP nep) {return NEPConvergedReasonViewFromOptions(nep);}
    181: SLEPC_EXTERN PetscErrorCode NEPValuesView(NEP,PetscViewer);
    182: SLEPC_EXTERN PetscErrorCode NEPValuesViewFromOptions(NEP);
    183: SLEPC_EXTERN PetscErrorCode NEPVectorsView(NEP,PetscViewer);
    184: SLEPC_EXTERN PetscErrorCode NEPVectorsViewFromOptions(NEP);

    186: SLEPC_EXTERN PetscErrorCode NEPSetFunction(NEP,Mat,Mat,PetscErrorCode (*)(NEP,PetscScalar,Mat,Mat,void*),void*);
    187: SLEPC_EXTERN PetscErrorCode NEPGetFunction(NEP,Mat*,Mat*,PetscErrorCode (**)(NEP,PetscScalar,Mat,Mat,void*),void**);
    188: SLEPC_EXTERN PetscErrorCode NEPSetJacobian(NEP,Mat,PetscErrorCode (*)(NEP,PetscScalar,Mat,void*),void*);
    189: SLEPC_EXTERN PetscErrorCode NEPGetJacobian(NEP,Mat*,PetscErrorCode (**)(NEP,PetscScalar,Mat,void*),void**);
    190: PETSC_DEPRECATED_FUNCTION("Use NEPSetFunction() and NEPSetJacobian") static inline PetscErrorCode NEPSetDerivatives(NEP nep,Mat A,PetscErrorCode (*fun)(NEP,PetscScalar,PetscInt,Mat,void*),void *ctx) {(void)A;(void)fun;(void)ctx;SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Not implemented in this version");}
    191: PETSC_DEPRECATED_FUNCTION("Use NEPGetFunction() and NEPGetJacobian") static inline PetscErrorCode NEPGetDerivatives(NEP nep,Mat *A,PetscErrorCode (**fun)(NEP,PetscScalar,PetscInt,Mat,void*),void **ctx) {(void)A;(void)fun;(void)ctx;SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"Not implemented in this version");}
    192: SLEPC_EXTERN PetscErrorCode NEPSetSplitOperator(NEP,PetscInt,Mat[],FN[],MatStructure);
    193: SLEPC_EXTERN PetscErrorCode NEPGetSplitOperatorTerm(NEP,PetscInt,Mat*,FN*);
    194: SLEPC_EXTERN PetscErrorCode NEPGetSplitOperatorInfo(NEP,PetscInt*,MatStructure*);
    195: SLEPC_EXTERN PetscErrorCode NEPSetSplitPreconditioner(NEP,PetscInt,Mat[],MatStructure);
    196: SLEPC_EXTERN PetscErrorCode NEPGetSplitPreconditionerTerm(NEP,PetscInt,Mat*);
    197: SLEPC_EXTERN PetscErrorCode NEPGetSplitPreconditionerInfo(NEP,PetscInt*,MatStructure*);

    199: SLEPC_EXTERN PetscErrorCode NEPSetBV(NEP,BV);
    200: SLEPC_EXTERN PetscErrorCode NEPGetBV(NEP,BV*);
    201: SLEPC_EXTERN PetscErrorCode NEPSetRG(NEP,RG);
    202: SLEPC_EXTERN PetscErrorCode NEPGetRG(NEP,RG*);
    203: SLEPC_EXTERN PetscErrorCode NEPSetDS(NEP,DS);
    204: SLEPC_EXTERN PetscErrorCode NEPGetDS(NEP,DS*);
    205: SLEPC_EXTERN PetscErrorCode NEPRefineGetKSP(NEP,KSP*);
    206: SLEPC_EXTERN PetscErrorCode NEPSetTolerances(NEP,PetscReal,PetscInt);
    207: SLEPC_EXTERN PetscErrorCode NEPGetTolerances(NEP,PetscReal*,PetscInt*);
    208: SLEPC_EXTERN PetscErrorCode NEPSetConvergenceTestFunction(NEP,PetscErrorCode (*)(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*),void*,PetscErrorCode (*)(void*));
    209: SLEPC_EXTERN PetscErrorCode NEPSetConvergenceTest(NEP,NEPConv);
    210: SLEPC_EXTERN PetscErrorCode NEPGetConvergenceTest(NEP,NEPConv*);
    211: SLEPC_EXTERN PetscErrorCode NEPConvergedAbsolute(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
    212: SLEPC_EXTERN PetscErrorCode NEPConvergedRelative(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
    213: SLEPC_EXTERN PetscErrorCode NEPConvergedNorm(NEP,PetscScalar,PetscScalar,PetscReal,PetscReal*,void*);
    214: SLEPC_EXTERN PetscErrorCode NEPSetStoppingTestFunction(NEP,PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*),void*,PetscErrorCode (*)(void*));
    215: SLEPC_EXTERN PetscErrorCode NEPSetStoppingTest(NEP,NEPStop);
    216: SLEPC_EXTERN PetscErrorCode NEPGetStoppingTest(NEP,NEPStop*);
    217: SLEPC_EXTERN PetscErrorCode NEPStoppingBasic(NEP,PetscInt,PetscInt,PetscInt,PetscInt,NEPConvergedReason*,void*);
    218: SLEPC_EXTERN PetscErrorCode NEPSetDimensions(NEP,PetscInt,PetscInt,PetscInt);
    219: SLEPC_EXTERN PetscErrorCode NEPGetDimensions(NEP,PetscInt*,PetscInt*,PetscInt*);
    220: SLEPC_EXTERN PetscErrorCode NEPSetRefine(NEP,NEPRefine,PetscInt,PetscReal,PetscInt,NEPRefineScheme);
    221: SLEPC_EXTERN PetscErrorCode NEPGetRefine(NEP,NEPRefine*,PetscInt*,PetscReal*,PetscInt*,NEPRefineScheme*);

    223: SLEPC_EXTERN PetscErrorCode NEPGetConverged(NEP,PetscInt*);
    224: SLEPC_EXTERN PetscErrorCode NEPGetEigenpair(NEP,PetscInt,PetscScalar*,PetscScalar*,Vec,Vec);
    225: SLEPC_EXTERN PetscErrorCode NEPGetLeftEigenvector(NEP,PetscInt,Vec,Vec);

    227: SLEPC_EXTERN PetscErrorCode NEPComputeError(NEP,PetscInt,NEPErrorType,PetscReal*);
    228: PETSC_DEPRECATED_FUNCTION("Use NEPComputeError()") static inline PetscErrorCode NEPComputeRelativeError(NEP nep,PetscInt i,PetscReal *r) {return NEPComputeError(nep,i,NEP_ERROR_RELATIVE,r);}
    229: PETSC_DEPRECATED_FUNCTION("Use NEPComputeError() with NEP_ERROR_ABSOLUTE") static inline PetscErrorCode NEPComputeResidualNorm(NEP nep,PetscInt i,PetscReal *r) {return NEPComputeError(nep,i,NEP_ERROR_ABSOLUTE,r);}
    230: SLEPC_EXTERN PetscErrorCode NEPGetErrorEstimate(NEP,PetscInt,PetscReal*);

    232: SLEPC_EXTERN PetscErrorCode NEPComputeFunction(NEP,PetscScalar,Mat,Mat);
    233: SLEPC_EXTERN PetscErrorCode NEPComputeJacobian(NEP,PetscScalar,Mat);
    234: SLEPC_EXTERN PetscErrorCode NEPApplyFunction(NEP,PetscScalar,Vec,Vec,Vec,Mat,Mat);
    235: SLEPC_EXTERN PetscErrorCode NEPApplyAdjoint(NEP,PetscScalar,Vec,Vec,Vec,Mat,Mat);
    236: SLEPC_EXTERN PetscErrorCode NEPApplyJacobian(NEP,PetscScalar,Vec,Vec,Vec,Mat);
    237: SLEPC_EXTERN PetscErrorCode NEPProjectOperator(NEP,PetscInt,PetscInt);
    238: SLEPC_EXTERN PetscErrorCode NEPGetIterationNumber(NEP,PetscInt*);

    240: SLEPC_EXTERN PetscErrorCode NEPSetInitialSpace(NEP,PetscInt,Vec[]);
    241: SLEPC_EXTERN PetscErrorCode NEPSetWhichEigenpairs(NEP,NEPWhich);
    242: SLEPC_EXTERN PetscErrorCode NEPGetWhichEigenpairs(NEP,NEPWhich*);
    243: SLEPC_EXTERN PetscErrorCode NEPSetTwoSided(NEP,PetscBool);
    244: SLEPC_EXTERN PetscErrorCode NEPGetTwoSided(NEP,PetscBool*);

    246: SLEPC_EXTERN PetscErrorCode NEPApplyResolvent(NEP,RG,PetscScalar,Vec,Vec);

    248: SLEPC_EXTERN PetscErrorCode NEPSetEigenvalueComparison(NEP,PetscErrorCode (*func)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*);

    250: SLEPC_EXTERN PetscErrorCode NEPSetTrackAll(NEP,PetscBool);
    251: SLEPC_EXTERN PetscErrorCode NEPGetTrackAll(NEP,PetscBool*);

    253: SLEPC_EXTERN PetscErrorCode NEPGetConvergedReason(NEP,NEPConvergedReason*);

    255: SLEPC_EXTERN PetscErrorCode NEPMonitor(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt);
    256: SLEPC_EXTERN PetscErrorCode NEPMonitorSet(NEP,PetscErrorCode (*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,void*),void*,PetscErrorCode (*)(void**));
    257: SLEPC_EXTERN PetscErrorCode NEPMonitorCancel(NEP);
    258: SLEPC_EXTERN PetscErrorCode NEPGetMonitorContext(NEP,void*);

    260: SLEPC_EXTERN PetscErrorCode NEPMonitorSetFromOptions(NEP,const char[],const char[],void*,PetscBool);
    261: SLEPC_EXTERN PetscErrorCode NEPMonitorLGCreate(MPI_Comm,const char[],const char[],const char[],PetscInt,const char*[],int,int,int,int,PetscDrawLG*);
    262: SLEPC_EXTERN PetscErrorCode NEPMonitorFirst(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    263: SLEPC_EXTERN PetscErrorCode NEPMonitorFirstDrawLG(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    264: SLEPC_EXTERN PetscErrorCode NEPMonitorFirstDrawLGCreate(PetscViewer,PetscViewerFormat,void *,PetscViewerAndFormat**);
    265: SLEPC_EXTERN PetscErrorCode NEPMonitorAll(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    266: SLEPC_EXTERN PetscErrorCode NEPMonitorAllDrawLG(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    267: SLEPC_EXTERN PetscErrorCode NEPMonitorAllDrawLGCreate(PetscViewer,PetscViewerFormat,void *,PetscViewerAndFormat**);
    268: SLEPC_EXTERN PetscErrorCode NEPMonitorConverged(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    269: SLEPC_EXTERN PetscErrorCode NEPMonitorConvergedCreate(PetscViewer,PetscViewerFormat,void *,PetscViewerAndFormat**);
    270: SLEPC_EXTERN PetscErrorCode NEPMonitorConvergedDrawLG(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*);
    271: SLEPC_EXTERN PetscErrorCode NEPMonitorConvergedDrawLGCreate(PetscViewer,PetscViewerFormat,void *,PetscViewerAndFormat**);
    272: SLEPC_EXTERN PetscErrorCode NEPMonitorConvergedDestroy(PetscViewerAndFormat**);

    274: SLEPC_EXTERN PetscErrorCode NEPSetOptionsPrefix(NEP,const char*);
    275: SLEPC_EXTERN PetscErrorCode NEPAppendOptionsPrefix(NEP,const char*);
    276: SLEPC_EXTERN PetscErrorCode NEPGetOptionsPrefix(NEP,const char*[]);

    278: SLEPC_EXTERN PetscFunctionList NEPList;
    279: SLEPC_EXTERN PetscFunctionList NEPMonitorList;
    280: SLEPC_EXTERN PetscFunctionList NEPMonitorCreateList;
    281: SLEPC_EXTERN PetscFunctionList NEPMonitorDestroyList;
    282: SLEPC_EXTERN PetscErrorCode NEPRegister(const char[],PetscErrorCode(*)(NEP));
    283: SLEPC_EXTERN PetscErrorCode NEPMonitorRegister(const char[],PetscViewerType,PetscViewerFormat,PetscErrorCode(*)(NEP,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscReal*,PetscInt,PetscViewerAndFormat*),PetscErrorCode(*)(PetscViewer,PetscViewerFormat,void*,PetscViewerAndFormat**),PetscErrorCode(*)(PetscViewerAndFormat**));

    285: SLEPC_EXTERN PetscErrorCode NEPSetWorkVecs(NEP,PetscInt);
    286: SLEPC_EXTERN PetscErrorCode NEPAllocateSolution(NEP,PetscInt);

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

    290: SLEPC_EXTERN PetscErrorCode NEPRIISetMaximumIterations(NEP,PetscInt);
    291: SLEPC_EXTERN PetscErrorCode NEPRIIGetMaximumIterations(NEP,PetscInt*);
    292: SLEPC_EXTERN PetscErrorCode NEPRIISetLagPreconditioner(NEP,PetscInt);
    293: SLEPC_EXTERN PetscErrorCode NEPRIIGetLagPreconditioner(NEP,PetscInt*);
    294: SLEPC_EXTERN PetscErrorCode NEPRIISetConstCorrectionTol(NEP,PetscBool);
    295: SLEPC_EXTERN PetscErrorCode NEPRIIGetConstCorrectionTol(NEP,PetscBool*);
    296: SLEPC_EXTERN PetscErrorCode NEPRIISetHermitian(NEP,PetscBool);
    297: SLEPC_EXTERN PetscErrorCode NEPRIIGetHermitian(NEP,PetscBool*);
    298: SLEPC_EXTERN PetscErrorCode NEPRIISetDeflationThreshold(NEP,PetscReal);
    299: SLEPC_EXTERN PetscErrorCode NEPRIIGetDeflationThreshold(NEP,PetscReal*);
    300: SLEPC_EXTERN PetscErrorCode NEPRIISetKSP(NEP,KSP);
    301: SLEPC_EXTERN PetscErrorCode NEPRIIGetKSP(NEP,KSP*);

    303: SLEPC_EXTERN PetscErrorCode NEPSLPSetDeflationThreshold(NEP,PetscReal);
    304: SLEPC_EXTERN PetscErrorCode NEPSLPGetDeflationThreshold(NEP,PetscReal*);
    305: SLEPC_EXTERN PetscErrorCode NEPSLPSetEPS(NEP,EPS);
    306: SLEPC_EXTERN PetscErrorCode NEPSLPGetEPS(NEP,EPS*);
    307: SLEPC_EXTERN PetscErrorCode NEPSLPSetEPSLeft(NEP,EPS);
    308: SLEPC_EXTERN PetscErrorCode NEPSLPGetEPSLeft(NEP,EPS*);
    309: SLEPC_EXTERN PetscErrorCode NEPSLPSetKSP(NEP,KSP);
    310: SLEPC_EXTERN PetscErrorCode NEPSLPGetKSP(NEP,KSP*);

    312: SLEPC_EXTERN PetscErrorCode NEPNArnoldiSetKSP(NEP,KSP);
    313: SLEPC_EXTERN PetscErrorCode NEPNArnoldiGetKSP(NEP,KSP*);
    314: SLEPC_EXTERN PetscErrorCode NEPNArnoldiSetLagPreconditioner(NEP,PetscInt);
    315: SLEPC_EXTERN PetscErrorCode NEPNArnoldiGetLagPreconditioner(NEP,PetscInt*);

    317: /*E
    318:     NEPCISSExtraction - determines the extraction technique in the CISS solver

    320:     Level: advanced

    322: .seealso: NEPCISSSetExtraction(), NEPCISSGetExtraction()
    323: E*/
    324: typedef enum { NEP_CISS_EXTRACTION_RITZ,
    325:                NEP_CISS_EXTRACTION_HANKEL,
    326:                NEP_CISS_EXTRACTION_CAA    } NEPCISSExtraction;
    327: SLEPC_EXTERN const char *NEPCISSExtractions[];

    329: #if defined(PETSC_USE_COMPLEX) || defined(PETSC_CLANG_STATIC_ANALYZER)
    330: SLEPC_EXTERN PetscErrorCode NEPCISSSetExtraction(NEP,NEPCISSExtraction);
    331: SLEPC_EXTERN PetscErrorCode NEPCISSGetExtraction(NEP,NEPCISSExtraction*);
    332: SLEPC_EXTERN PetscErrorCode NEPCISSSetSizes(NEP,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscBool);
    333: SLEPC_EXTERN PetscErrorCode NEPCISSGetSizes(NEP,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscInt*,PetscBool*);
    334: SLEPC_EXTERN PetscErrorCode NEPCISSSetThreshold(NEP,PetscReal,PetscReal);
    335: SLEPC_EXTERN PetscErrorCode NEPCISSGetThreshold(NEP,PetscReal*,PetscReal*);
    336: SLEPC_EXTERN PetscErrorCode NEPCISSSetRefinement(NEP,PetscInt,PetscInt);
    337: SLEPC_EXTERN PetscErrorCode NEPCISSGetRefinement(NEP,PetscInt*,PetscInt*);
    338: SLEPC_EXTERN PetscErrorCode NEPCISSGetKSPs(NEP,PetscInt*,KSP**);
    339: #else
    340: #define SlepcNEPCISSUnavailable(nep) do { \
    341:     SETERRQ(PetscObjectComm((PetscObject)nep),PETSC_ERR_SUP,"%s() not available with real scalars",PETSC_FUNCTION_NAME); \
    342:     } while (0)
    343: static inline PetscErrorCode NEPCISSSetExtraction(NEP nep,PETSC_UNUSED NEPCISSExtraction ex) {SlepcNEPCISSUnavailable(nep);}
    344: static inline PetscErrorCode NEPCISSGetExtraction(NEP nep,PETSC_UNUSED NEPCISSExtraction *ex) {SlepcNEPCISSUnavailable(nep);}
    345: static inline PetscErrorCode NEPCISSSetSizes(NEP nep,PETSC_UNUSED PetscInt ip,PETSC_UNUSED PetscInt bs,PETSC_UNUSED PetscInt ms,PETSC_UNUSED PetscInt npart,PETSC_UNUSED PetscInt bsmax,PETSC_UNUSED PetscBool realmats) {SlepcNEPCISSUnavailable(nep);}
    346: static inline PetscErrorCode NEPCISSGetSizes(NEP nep,PETSC_UNUSED PetscInt *ip,PETSC_UNUSED PetscInt *bs,PETSC_UNUSED PetscInt *ms,PETSC_UNUSED PetscInt *npart,PETSC_UNUSED PetscInt *bsmak,PETSC_UNUSED PetscBool *realmats) {SlepcNEPCISSUnavailable(nep);}
    347: static inline PetscErrorCode NEPCISSSetThreshold(NEP nep,PETSC_UNUSED PetscReal delta,PETSC_UNUSED PetscReal spur) {SlepcNEPCISSUnavailable(nep);}
    348: static inline PetscErrorCode NEPCISSGetThreshold(NEP nep,PETSC_UNUSED PetscReal *delta,PETSC_UNUSED PetscReal *spur) {SlepcNEPCISSUnavailable(nep);}
    349: static inline PetscErrorCode NEPCISSSetRefinement(NEP nep,PETSC_UNUSED PetscInt inner,PETSC_UNUSED PetscInt blsize) {SlepcNEPCISSUnavailable(nep);}
    350: static inline PetscErrorCode NEPCISSGetRefinement(NEP nep,PETSC_UNUSED PetscInt *inner,PETSC_UNUSED PetscInt *blsize) {SlepcNEPCISSUnavailable(nep);}
    351: static inline PetscErrorCode NEPCISSGetKSPs(NEP nep,PETSC_UNUSED PetscInt *nsolve,PETSC_UNUSED KSP **ksp) {SlepcNEPCISSUnavailable(nep);}
    352: #undef SlepcNEPCISSUnavailable
    353: #endif

    355: SLEPC_EXTERN PetscErrorCode NEPInterpolSetPEP(NEP,PEP);
    356: SLEPC_EXTERN PetscErrorCode NEPInterpolGetPEP(NEP,PEP*);
    357: SLEPC_EXTERN PetscErrorCode NEPInterpolSetInterpolation(NEP,PetscReal,PetscInt);
    358: SLEPC_EXTERN PetscErrorCode NEPInterpolGetInterpolation(NEP,PetscReal*,PetscInt*);

    360: SLEPC_EXTERN PetscErrorCode NEPNLEIGSSetSingularitiesFunction(NEP,PetscErrorCode (*)(NEP,PetscInt*,PetscScalar*,void*),void*);
    361: SLEPC_EXTERN PetscErrorCode NEPNLEIGSGetSingularitiesFunction(NEP,PetscErrorCode (**)(NEP,PetscInt*,PetscScalar*,void*),void**);
    362: SLEPC_EXTERN PetscErrorCode NEPNLEIGSSetRestart(NEP,PetscReal);
    363: SLEPC_EXTERN PetscErrorCode NEPNLEIGSGetRestart(NEP,PetscReal*);
    364: SLEPC_EXTERN PetscErrorCode NEPNLEIGSSetLocking(NEP,PetscBool);
    365: SLEPC_EXTERN PetscErrorCode NEPNLEIGSGetLocking(NEP,PetscBool*);
    366: SLEPC_EXTERN PetscErrorCode NEPNLEIGSSetInterpolation(NEP,PetscReal,PetscInt);
    367: SLEPC_EXTERN PetscErrorCode NEPNLEIGSGetInterpolation(NEP,PetscReal*,PetscInt*);
    368: SLEPC_EXTERN PetscErrorCode NEPNLEIGSSetRKShifts(NEP,PetscInt,PetscScalar[]);
    369: SLEPC_EXTERN PetscErrorCode NEPNLEIGSGetRKShifts(NEP,PetscInt*,PetscScalar*[]);
    370: SLEPC_EXTERN PetscErrorCode NEPNLEIGSGetKSPs(NEP,PetscInt*,KSP**);
    371: SLEPC_EXTERN PetscErrorCode NEPNLEIGSSetFullBasis(NEP,PetscBool);
    372: SLEPC_EXTERN PetscErrorCode NEPNLEIGSGetFullBasis(NEP,PetscBool*);
    373: SLEPC_EXTERN PetscErrorCode NEPNLEIGSSetEPS(NEP,EPS);
    374: SLEPC_EXTERN PetscErrorCode NEPNLEIGSGetEPS(NEP,EPS*);

    376: #endif