Actual source code: slepclme.h
slepc-3.10.1 2018-10-23
Report Typos and Errors

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-2018, 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: */

     16:  #include <slepcbv.h>

     18: PETSC_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: PETSC_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: PETSC_EXTERN const char *LMEProblemTypes[];

     57: PETSC_EXTERN PetscErrorCode LMECreate(MPI_Comm,LME *);
     58: PETSC_EXTERN PetscErrorCode LMEDestroy(LME*);
     59: PETSC_EXTERN PetscErrorCode LMEReset(LME);
     60: PETSC_EXTERN PetscErrorCode LMESetType(LME,LMEType);
     61: PETSC_EXTERN PetscErrorCode LMEGetType(LME,LMEType*);
     62: PETSC_EXTERN PetscErrorCode LMESetProblemType(LME,LMEProblemType);
     63: PETSC_EXTERN PetscErrorCode LMEGetProblemType(LME,LMEProblemType*);
     64: PETSC_EXTERN PetscErrorCode LMESetCoefficients(LME,Mat,Mat,Mat,Mat);
     65: PETSC_EXTERN PetscErrorCode LMEGetCoefficients(LME,Mat*,Mat*,Mat*,Mat*);
     66: PETSC_EXTERN PetscErrorCode LMESetRHS(LME,Mat);
     67: PETSC_EXTERN PetscErrorCode LMEGetRHS(LME,Mat*);
     68: PETSC_EXTERN PetscErrorCode LMESetSolution(LME,Mat);
     69: PETSC_EXTERN PetscErrorCode LMEGetSolution(LME,Mat*);
     70: PETSC_EXTERN PetscErrorCode LMESetFromOptions(LME);
     71: PETSC_EXTERN PetscErrorCode LMESetUp(LME);
     72: PETSC_EXTERN PetscErrorCode LMESolve(LME);
     73: PETSC_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: PETSC_EXTERN PetscErrorCode LMEReasonView(LME,PetscViewer);
     76: PETSC_EXTERN PetscErrorCode LMEReasonViewFromOptions(LME);

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

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

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

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

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

    103: PETSC_EXTERN PetscErrorCode LMESetOptionsPrefix(LME,const char*);
    104: PETSC_EXTERN PetscErrorCode LMEAppendOptionsPrefix(LME,const char*);
    105: PETSC_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: PETSC_EXTERN const char *const*LMEConvergedReasons;

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

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

    128: PETSC_EXTERN PetscErrorCode LMEAllocateSolution(LME,PetscInt);

    130: #endif