Subversion Repositories slepc-dev

Rev

Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1251 slepc 1
/*
2
   User interface for the SLEPC singular value solvers.
3
*/
4
#if !defined(__SLEPCSVD_H)
5
#define __SLEPCSVD_H
6
#include "slepc.h"
1253 slepc 7
#include "slepceps.h"
1251 slepc 8
PETSC_EXTERN_CXX_BEGIN
9
 
10
extern PetscCookie SVD_COOKIE;
11
 
12
/*S
13
     SVD - Abstract SLEPc object that manages all the singular value
14
     problem solvers.
15
 
16
   Level: beginner
17
 
18
.seealso:  SVDCreate()
19
S*/
20
typedef struct _p_SVD* SVD;
21
 
22
#define SVDType const char*
23
#define SVDEIGENSOLVER "eigensolver"
24
#define SVDLAPACK      "lapack"
1268 slepc 25
#define SVDLANCZOS     "lanczos"
1251 slepc 26
 
1283 slepc 27
typedef enum { SVD_TRANSPOSE_EXPLICIT, SVD_TRANSPOSE_IMPLICIT } SVDTransposeMode;
1255 slepc 28
 
1272 slepc 29
typedef enum { SVD_LARGEST, SVD_SMALLEST } SVDWhich;
30
 
1283 slepc 31
typedef enum {/* converged */
32
              SVD_CONVERGED_TOL                =  2,
33
              /* diverged */
34
              SVD_DIVERGED_ITS                 = -3,
35
              SVD_DIVERGED_BREAKDOWN           = -4,
36
              SVD_CONVERGED_ITERATING          =  0 } SVDConvergedReason;
37
 
1251 slepc 38
EXTERN PetscErrorCode SVDCreate(MPI_Comm,SVD*);
39
EXTERN PetscErrorCode SVDSetType(SVD,SVDType);
40
EXTERN PetscErrorCode SVDGetType(SVD,SVDType*);
41
EXTERN PetscErrorCode SVDSetOperator(SVD,Mat);
1268 slepc 42
EXTERN PetscErrorCode SVDGetOperator(SVD,Mat*);
1272 slepc 43
EXTERN PetscErrorCode SVDSetInitialVector(SVD,Vec);
44
EXTERN PetscErrorCode SVDGetInitialVector(SVD,Vec*);
1268 slepc 45
EXTERN PetscErrorCode SVDSetTransposeMode(SVD,SVDTransposeMode);
46
EXTERN PetscErrorCode SVDGetTransposeMode(SVD,SVDTransposeMode*);
1272 slepc 47
EXTERN PetscErrorCode SVDSetDimensions(SVD,int,int);
48
EXTERN PetscErrorCode SVDGetDimensions(SVD,int*,int*);
49
EXTERN PetscErrorCode SVDSetTolerances(SVD,PetscReal,int);
50
EXTERN PetscErrorCode SVDGetTolerances(SVD,PetscReal*,int*);
51
EXTERN PetscErrorCode SVDSetWhichSingularTriplets(SVD,SVDWhich);
52
EXTERN PetscErrorCode SVDGetWhichSingularTriplets(SVD,SVDWhich*);
1251 slepc 53
EXTERN PetscErrorCode SVDSetFromOptions(SVD);
54
EXTERN PetscErrorCode SVDSetUp(SVD);
55
EXTERN PetscErrorCode SVDSolve(SVD);
1283 slepc 56
EXTERN PetscErrorCode SVDGetIterationNumber(SVD,int*);
1251 slepc 57
EXTERN PetscErrorCode SVDGetConverged(SVD,int*);
58
EXTERN PetscErrorCode SVDGetSingularTriplet(SVD,int,PetscReal*,Vec,Vec);
1257 slepc 59
EXTERN PetscErrorCode SVDComputeResidualNorms(SVD,int,PetscReal*,PetscReal*);
1251 slepc 60
EXTERN PetscErrorCode SVDView(SVD,PetscViewer);
61
EXTERN PetscErrorCode SVDDestroy(SVD);
62
EXTERN PetscErrorCode SVDInitializePackage(char*);
63
 
1288 slepc 64
EXTERN PetscErrorCode SVDSetMonitor(SVD,PetscErrorCode (*)(SVD,int,int,PetscReal*,PetscReal*,int,void*),
65
                                    void*,PetscErrorCode (*monitordestroy)(void*));
66
EXTERN PetscErrorCode SVDClearMonitor(SVD);
67
EXTERN PetscErrorCode SVDGetMonitorContext(SVD,void **);
68
EXTERN PetscErrorCode SVDDefaultMonitor(SVD,int,int,PetscReal*,PetscReal*,int,void*);
69
EXTERN PetscErrorCode SVDLGMonitor(SVD,int,int,PetscReal*,PetscReal*,int,void*);
70
 
1283 slepc 71
typedef enum { SVDEIGENSOLVER_ATA, SVDEIGENSOLVER_AAT,
1253 slepc 72
               SVDEIGENSOLVER_CYCLIC } SVDEigensolverMode;
73
 
74
EXTERN PetscErrorCode SVDEigensolverSetMode(SVD,SVDEigensolverMode);
75
EXTERN PetscErrorCode SVDEigensolverGetMode(SVD,SVDEigensolverMode*);
76
EXTERN PetscErrorCode SVDEigensolverSetEPS(SVD,EPS);
77
EXTERN PetscErrorCode SVDEigensolverGetEPS(SVD,EPS*);
78
 
1251 slepc 79
#endif