Date: 2020-01-13T12:02:23+00:00

Actual source code: slepclme.h
slepc-3.12.2 2020-01-13
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-2019, 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 object for solving linear matrix equations
     12: */

     14: #if !defined(SLEPCLME_H)
     15: #define SLEPCLME_H
     16:  #include <slepcbv.h>

     18: SLEPC_EXTERN PetscErrorCode LMEInitializePackage(void);

     20: /*S
     21:     LME - SLEPc object that encapsulates functionality for linear matrix equations

     23:     Level: beginner

     25: .seealso:  LMECreate()
     26: S*/
     27: typedef struct _p_LME* LME;

     29: /*J
     30:     LMEType - String with the name of a method for solving linear matrix equations

     32:     Level: beginner

     34: .seealso: LMESetType(), LME
     35: J*/
     36: typedef const char* LMEType;
     37: #define LMEKRYLOV   "krylov"

     39: /* Logging support */
     40: SLEPC_EXTERN PetscClassId LME_CLASSID;

     42: /*E
     43:     LMEProblemType - Determines the type of linear matrix equation

     45:     Level: beginner

     47: .seealso: LMESetProblemType(), LMEGetProblemType()
     48: E*/
     49: typedef enum { LME_LYAPUNOV,
     50:                LME_SYLVESTER,
     51:                LME_GEN_LYAPUNOV,
     52:                LME_GEN_SYLVESTER,
     53:                LME_DT_LYAPUNOV ,
     54:                LME_STEIN} LMEProblemType;
     55: SLEPC_EXTERN const char *LMEProblemTypes[];

     57: SLEPC_EXTERN PetscErrorCode LMECreate(MPI_Comm,LME *);
     58: SLEPC_EXTERN PetscErrorCode LMEDestroy(LME*);
     59: SLEPC_EXTERN PetscErrorCode LMEReset(LME);
     60: SLEPC_EXTERN PetscErrorCode LMESetType(LME,LMEType);
     61: SLEPC_EXTERN PetscErrorCode LMEGetType(LME,LMEType*);
     62: SLEPC_EXTERN PetscErrorCode LMESetProblemType(LME,LMEProblemType);
     63: SLEPC_EXTERN PetscErrorCode LMEGetProblemType(LME,LMEProblemType*);
     64: SLEPC_EXTERN PetscErrorCode LMESetCoefficients(LME,Mat,Mat,Mat,Mat);
     65: SLEPC_EXTERN PetscErrorCode LMEGetCoefficients(LME,Mat*,Mat*,Mat*,Mat*);
     66: SLEPC_EXTERN PetscErrorCode LMESetRHS(LME,Mat);
     67: SLEPC_EXTERN PetscErrorCode LMEGetRHS(LME,Mat*);
     68: SLEPC_EXTERN PetscErrorCode LMESetSolution(LME,Mat);
     69: SLEPC_EXTERN PetscErrorCode LMEGetSolution(LME,Mat*);
     70: SLEPC_EXTERN PetscErrorCode LMESetFromOptions(LME);
     71: SLEPC_EXTERN PetscErrorCode LMESetUp(LME);
     72: SLEPC_EXTERN PetscErrorCode LMESolve(LME);
     73: SLEPC_EXTERN PetscErrorCode LMEView(LME,PetscViewer);
     74: PETSC_STATIC_INLINE PetscErrorCode LMEViewFromOptions(LME lme,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)lme,obj,name);}
     75: SLEPC_EXTERN PetscErrorCode LMEReasonView(LME,PetscViewer);
     76: SLEPC_EXTERN PetscErrorCode LMEReasonViewFromOptions(LME);

     78: SLEPC_EXTERN PetscErrorCode LMESetBV(LME,BV);
     79: SLEPC_EXTERN PetscErrorCode LMEGetBV(LME,BV*);
     80: SLEPC_EXTERN PetscErrorCode LMESetTolerances(LME,PetscReal,PetscInt);
     81: SLEPC_EXTERN PetscErrorCode LMEGetTolerances(LME,PetscReal*,PetscInt*);
     82: SLEPC_EXTERN PetscErrorCode LMESetDimensions(LME,PetscInt);
     83: SLEPC_EXTERN PetscErrorCode LMEGetDimensions(LME,PetscInt*);

     85: SLEPC_EXTERN PetscErrorCode LMEMonitor(LME,PetscInt,PetscReal);
     86: SLEPC_EXTERN PetscErrorCode LMEMonitorSet(LME,PetscErrorCode (*)(LME,PetscInt,PetscReal,void*),void*,PetscErrorCode (*)(void**));
     87: SLEPC_EXTERN PetscErrorCode LMEMonitorSetFromOptions(LME,const char*,const char*,const char*,PetscErrorCode (*)(LME,PetscInt,PetscReal,PetscViewerAndFormat*));
     88: SLEPC_EXTERN PetscErrorCode LMEMonitorCancel(LME);
     89: SLEPC_EXTERN PetscErrorCode LMEGetMonitorContext(LME,void **);
     90: SLEPC_EXTERN PetscErrorCode LMEGetIterationNumber(LME,PetscInt*);

     92: SLEPC_EXTERN PetscErrorCode LMEGetErrorEstimate(LME,PetscReal*);
     93: SLEPC_EXTERN PetscErrorCode LMEComputeError(LME,PetscReal*);
     94: SLEPC_EXTERN PetscErrorCode LMESetErrorIfNotConverged(LME,PetscBool);
     95: SLEPC_EXTERN PetscErrorCode LMEGetErrorIfNotConverged(LME,PetscBool*);

     97: SLEPC_EXTERN PetscErrorCode LMEDenseLyapunovChol(LME,PetscScalar*,PetscInt,PetscInt,PetscScalar*,PetscScalar*,PetscInt,PetscReal*);

     99: SLEPC_EXTERN PetscErrorCode LMEMonitorDefault(LME,PetscInt,PetscReal,PetscViewerAndFormat*);
    100: SLEPC_EXTERN PetscErrorCode LMEMonitorLGCreate(MPI_Comm,const char[],const char[],int,int,int,int,PetscDrawLG*);
    101: SLEPC_EXTERN PetscErrorCode LMEMonitorLG(LME,PetscInt,PetscReal,void*);

    103: SLEPC_EXTERN PetscErrorCode LMESetOptionsPrefix(LME,const char*);
    104: SLEPC_EXTERN PetscErrorCode LMEAppendOptionsPrefix(LME,const char*);
    105: SLEPC_EXTERN PetscErrorCode LMEGetOptionsPrefix(LME,const char*[]);

    107: /*E
    108:     LMEConvergedReason - reason a matrix function iteration was said to
    109:          have converged or diverged

    111:     Level: intermediate

    113: .seealso: LMESolve(), LMEGetConvergedReason(), LMESetTolerances()
    114: E*/
    115: typedef enum {/* converged */
    116:               LME_CONVERGED_TOL                =  1,
    117:               /* diverged */
    118:               LME_DIVERGED_ITS                 = -1,
    119:               LME_DIVERGED_BREAKDOWN           = -2,
    120:               LME_CONVERGED_ITERATING          =  0} LMEConvergedReason;
    121: SLEPC_EXTERN const char *const*LMEConvergedReasons;

    123: SLEPC_EXTERN PetscErrorCode LMEGetConvergedReason(LME,LMEConvergedReason *);

    125: SLEPC_EXTERN PetscFunctionList LMEList;
    126: SLEPC_EXTERN PetscErrorCode LMERegister(const char[],PetscErrorCode(*)(LME));

    128: SLEPC_EXTERN PetscErrorCode LMEAllocateSolution(LME,PetscInt);

    130: #endif