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
6 dsic.upv.es!jroman 1
/*
2
      Spectral transformation module for eigenvalue problems.  
1376 slepc 3
 
4
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1672 slepc 5
   SLEPc - Scalable Library for Eigenvalue Problem Computations
2116 eromero 6
   Copyright (c) 2002-2010, Universidad Politecnica de Valencia, Spain
1376 slepc 7
 
1672 slepc 8
   This file is part of SLEPc.
9
 
10
   SLEPc is free software: you can redistribute it and/or modify it under  the
11
   terms of version 3 of the GNU Lesser General Public License as published by
12
   the Free Software Foundation.
13
 
14
   SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
15
   WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
16
   FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
17
   more details.
18
 
19
   You  should have received a copy of the GNU Lesser General  Public  License
20
   along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
1376 slepc 21
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
6 dsic.upv.es!jroman 22
*/
1376 slepc 23
 
6 dsic.upv.es!jroman 24
#if !defined(__SLEPCST_H)
25
#define __SLEPCST_H
18 dsic.upv.es!jroman 26
#include "petscksp.h"
476 dsic.upv.es!antodo 27
PETSC_EXTERN_CXX_BEGIN
6 dsic.upv.es!jroman 28
 
2213 jroman 29
extern PetscClassId ST_CLASSID;
6 dsic.upv.es!jroman 30
 
1364 slepc 31
/*S
32
     ST - Abstract SLEPc object that manages spectral transformations.
33
     This object is accessed only in advanced applications.
34
 
35
   Level: beginner
36
 
37
.seealso:  STCreate(), EPS
38
S*/
6 dsic.upv.es!jroman 39
typedef struct _p_ST* ST;
40
 
1364 slepc 41
/*E
42
    STType - String with the name of a SLEPc spectral transformation
43
 
44
   Level: beginner
45
 
46
.seealso: STSetType(), ST
47
E*/
1502 slepc 48
#define STType      char*
6 dsic.upv.es!jroman 49
#define STSHELL     "shell"
50
#define STSHIFT     "shift"
2092 jroman 51
#define STSINVERT   "sinvert"
344 dsic.upv.es!antodo 52
#define STCAYLEY    "cayley"
777 dsic.upv.es!antodo 53
#define STFOLD      "fold"
1996 eromero 54
#define STPRECOND   "precond"
6 dsic.upv.es!jroman 55
 
476 dsic.upv.es!antodo 56
EXTERN PetscErrorCode STCreate(MPI_Comm,ST*);
57
EXTERN PetscErrorCode STDestroy(ST);
1502 slepc 58
EXTERN PetscErrorCode STSetType(ST,const STType);
1501 slepc 59
EXTERN PetscErrorCode STGetType(ST,const STType*);
476 dsic.upv.es!antodo 60
EXTERN PetscErrorCode STSetOperators(ST,Mat,Mat);
61
EXTERN PetscErrorCode STGetOperators(ST,Mat*,Mat*);
62
EXTERN PetscErrorCode STSetUp(ST);
63
EXTERN PetscErrorCode STSetFromOptions(ST);
64
EXTERN PetscErrorCode STView(ST,PetscViewer);
6 dsic.upv.es!jroman 65
 
476 dsic.upv.es!antodo 66
EXTERN PetscErrorCode STApply(ST,Vec,Vec);
1358 slepc 67
EXTERN PetscErrorCode STGetBilinearForm(ST,Mat*);
780 dsic.upv.es!jroman 68
EXTERN PetscErrorCode STApplyTranspose(ST,Vec,Vec);
677 dsic.upv.es!antodo 69
EXTERN PetscErrorCode STComputeExplicitOperator(ST,Mat*);
1029 slepc 70
EXTERN PetscErrorCode STPostSolve(ST);
6 dsic.upv.es!jroman 71
 
476 dsic.upv.es!antodo 72
EXTERN PetscErrorCode STSetKSP(ST,KSP);
73
EXTERN PetscErrorCode STGetKSP(ST,KSP*);
74
EXTERN PetscErrorCode STSetShift(ST,PetscScalar);
75
EXTERN PetscErrorCode STGetShift(ST,PetscScalar*);
2074 jroman 76
EXTERN PetscErrorCode STSetDefaultShift(ST,PetscScalar);
1804 jroman 77
EXTERN PetscErrorCode STSetBalanceMatrix(ST,Vec);
78
EXTERN PetscErrorCode STGetBalanceMatrix(ST,Vec*);
6 dsic.upv.es!jroman 79
 
1248 slepc 80
EXTERN PetscErrorCode STSetOptionsPrefix(ST,const char*);
81
EXTERN PetscErrorCode STAppendOptionsPrefix(ST,const char*);
812 dsic.upv.es!antodo 82
EXTERN PetscErrorCode STGetOptionsPrefix(ST,const char*[]);
6 dsic.upv.es!jroman 83
 
1780 antodo 84
EXTERN PetscErrorCode STBackTransform(ST,PetscInt,PetscScalar*,PetscScalar*);
6 dsic.upv.es!jroman 85
 
1508 slepc 86
EXTERN PetscErrorCode STCheckNullSpace(ST,PetscInt,const Vec[]);
310 dsic.upv.es!antodo 87
 
1508 slepc 88
EXTERN PetscErrorCode STGetOperationCounters(ST,PetscInt*,PetscInt*);
1209 slepc 89
EXTERN PetscErrorCode STResetOperationCounters(ST);
163 dsic.upv.es!antodo 90
 
1364 slepc 91
/*E
92
    STMatMode - determines how to handle the coefficient matrix associated
93
    to the spectral transformation
94
 
95
    Level: intermediate
96
 
97
.seealso: STSetMatMode(), STGetMatMode()
98
E*/
1940 jroman 99
typedef enum { ST_MATMODE_COPY,
100
               ST_MATMODE_INPLACE,
101
               ST_MATMODE_SHELL } STMatMode;
476 dsic.upv.es!antodo 102
EXTERN PetscErrorCode STSetMatMode(ST,STMatMode);
103
EXTERN PetscErrorCode STGetMatMode(ST,STMatMode*);
104
EXTERN PetscErrorCode STSetMatStructure(ST,MatStructure);
2109 eromero 105
EXTERN PetscErrorCode STGetMatStructure(ST,MatStructure*);
6 dsic.upv.es!jroman 106
 
1508 slepc 107
EXTERN PetscErrorCode STRegister(const char*,const char*,const char*,PetscErrorCode(*)(ST));
1389 slepc 108
#if defined(PETSC_USE_DYNAMIC_LIBRARIES)
109
#define STRegisterDynamic(a,b,c,d) STRegister(a,b,c,0)
110
#else
111
#define STRegisterDynamic(a,b,c,d) STRegister(a,b,c,d)
112
#endif
113
EXTERN PetscErrorCode STRegisterDestroy(void);
114
 
386 dsic.upv.es!jroman 115
/* --------- options specific to particular spectral transformations-------- */
116
 
1024 slepc 117
EXTERN PetscErrorCode STShellGetContext(ST st,void **ctx);
118
EXTERN PetscErrorCode STShellSetContext(ST st,void *ctx);
1760 antodo 119
EXTERN PetscErrorCode STShellSetApply(ST st,PetscErrorCode (*apply)(ST,Vec,Vec));
120
EXTERN PetscErrorCode STShellSetApplyTranspose(ST st,PetscErrorCode (*applytrans)(ST,Vec,Vec));
1780 antodo 121
EXTERN PetscErrorCode STShellSetBackTransform(ST st,PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*));
1024 slepc 122
EXTERN PetscErrorCode STShellSetName(ST,const char[]);
123
EXTERN PetscErrorCode STShellGetName(ST,char*[]);
6 dsic.upv.es!jroman 124
 
476 dsic.upv.es!antodo 125
EXTERN PetscErrorCode STCayleySetAntishift(ST,PetscScalar);
344 dsic.upv.es!antodo 126
 
1996 eromero 127
EXTERN PetscErrorCode STPrecondGetMatForPC(ST st,Mat *mat);
128
EXTERN PetscErrorCode STPrecondSetMatForPC(ST st,Mat mat);
2216 jroman 129
EXTERN PetscErrorCode STPrecondGetKSPHasMat(ST st,PetscBool *setmat);
130
EXTERN PetscErrorCode STPrecondSetKSPHasMat(ST st,PetscBool setmat);
1996 eromero 131
 
476 dsic.upv.es!antodo 132
PETSC_EXTERN_CXX_END
6 dsic.upv.es!jroman 133
#endif
134