Subversion Repositories slepc-dev

Rev

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
6
   Copyright (c) 2002-2009, 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
 
476 dsic.upv.es!antodo 29
extern PetscCookie ST_COOKIE;
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"
51
#define STSINV      "sinvert"
344 dsic.upv.es!antodo 52
#define STCAYLEY    "cayley"
777 dsic.upv.es!antodo 53
#define STFOLD      "fold"
6 dsic.upv.es!jroman 54
 
476 dsic.upv.es!antodo 55
EXTERN PetscErrorCode STCreate(MPI_Comm,ST*);
56
EXTERN PetscErrorCode STDestroy(ST);
1502 slepc 57
EXTERN PetscErrorCode STSetType(ST,const STType);
1501 slepc 58
EXTERN PetscErrorCode STGetType(ST,const STType*);
476 dsic.upv.es!antodo 59
EXTERN PetscErrorCode STSetOperators(ST,Mat,Mat);
60
EXTERN PetscErrorCode STGetOperators(ST,Mat*,Mat*);
61
EXTERN PetscErrorCode STSetUp(ST);
62
EXTERN PetscErrorCode STSetFromOptions(ST);
63
EXTERN PetscErrorCode STView(ST,PetscViewer);
6 dsic.upv.es!jroman 64
 
476 dsic.upv.es!antodo 65
EXTERN PetscErrorCode STApply(ST,Vec,Vec);
1358 slepc 66
EXTERN PetscErrorCode STGetBilinearForm(ST,Mat*);
780 dsic.upv.es!jroman 67
EXTERN PetscErrorCode STApplyTranspose(ST,Vec,Vec);
677 dsic.upv.es!antodo 68
EXTERN PetscErrorCode STComputeExplicitOperator(ST,Mat*);
1029 slepc 69
EXTERN PetscErrorCode STPostSolve(ST);
6 dsic.upv.es!jroman 70
 
842 dsic.upv.es!antodo 71
EXTERN PetscErrorCode STInitializePackage(char*);
6 dsic.upv.es!jroman 72
 
476 dsic.upv.es!antodo 73
EXTERN PetscErrorCode STSetKSP(ST,KSP);
74
EXTERN PetscErrorCode STGetKSP(ST,KSP*);
75
EXTERN PetscErrorCode STSetShift(ST,PetscScalar);
76
EXTERN PetscErrorCode STGetShift(ST,PetscScalar*);
6 dsic.upv.es!jroman 77
 
1248 slepc 78
EXTERN PetscErrorCode STSetOptionsPrefix(ST,const char*);
79
EXTERN PetscErrorCode STAppendOptionsPrefix(ST,const char*);
812 dsic.upv.es!antodo 80
EXTERN PetscErrorCode STGetOptionsPrefix(ST,const char*[]);
6 dsic.upv.es!jroman 81
 
476 dsic.upv.es!antodo 82
EXTERN PetscErrorCode STBackTransform(ST,PetscScalar*,PetscScalar*);
6 dsic.upv.es!jroman 83
 
1508 slepc 84
EXTERN PetscErrorCode STCheckNullSpace(ST,PetscInt,const Vec[]);
310 dsic.upv.es!antodo 85
 
1508 slepc 86
EXTERN PetscErrorCode STGetOperationCounters(ST,PetscInt*,PetscInt*);
1209 slepc 87
EXTERN PetscErrorCode STResetOperationCounters(ST);
163 dsic.upv.es!antodo 88
 
1364 slepc 89
/*E
90
    STMatMode - determines how to handle the coefficient matrix associated
91
    to the spectral transformation
92
 
93
    Level: intermediate
94
 
95
.seealso: STSetMatMode(), STGetMatMode()
96
E*/
344 dsic.upv.es!antodo 97
typedef enum { STMATMODE_COPY, STMATMODE_INPLACE,
98
               STMATMODE_SHELL } STMatMode;
476 dsic.upv.es!antodo 99
EXTERN PetscErrorCode STSetMatMode(ST,STMatMode);
100
EXTERN PetscErrorCode STGetMatMode(ST,STMatMode*);
101
EXTERN PetscErrorCode STSetMatStructure(ST,MatStructure);
6 dsic.upv.es!jroman 102
 
1508 slepc 103
EXTERN PetscErrorCode STRegister(const char*,const char*,const char*,PetscErrorCode(*)(ST));
1389 slepc 104
#if defined(PETSC_USE_DYNAMIC_LIBRARIES)
105
#define STRegisterDynamic(a,b,c,d) STRegister(a,b,c,0)
106
#else
107
#define STRegisterDynamic(a,b,c,d) STRegister(a,b,c,d)
108
#endif
109
EXTERN PetscErrorCode STRegisterDestroy(void);
110
 
386 dsic.upv.es!jroman 111
/* --------- options specific to particular spectral transformations-------- */
112
 
1024 slepc 113
EXTERN PetscErrorCode STShellGetContext(ST st,void **ctx);
114
EXTERN PetscErrorCode STShellSetContext(ST st,void *ctx);
115
EXTERN PetscErrorCode STShellSetApply(ST st,PetscErrorCode (*apply)(void*,Vec,Vec));
116
EXTERN PetscErrorCode STShellSetApplyTranspose(ST st,PetscErrorCode (*applytrans)(void*,Vec,Vec));
117
EXTERN PetscErrorCode STShellSetBackTransform(ST st,PetscErrorCode (*backtr)(void*,PetscScalar*,PetscScalar*));
118
EXTERN PetscErrorCode STShellSetName(ST,const char[]);
119
EXTERN PetscErrorCode STShellGetName(ST,char*[]);
6 dsic.upv.es!jroman 120
 
476 dsic.upv.es!antodo 121
EXTERN PetscErrorCode STCayleySetAntishift(ST,PetscScalar);
344 dsic.upv.es!antodo 122
 
792 dsic.upv.es!antodo 123
EXTERN PetscErrorCode STFoldSetLeftSide(ST st,PetscTruth left);
124
 
476 dsic.upv.es!antodo 125
PETSC_EXTERN_CXX_END
6 dsic.upv.es!jroman 126
#endif
127