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
#ifndef _STIMPL
3
#define _STIMPL
4
 
5
#include "slepceps.h"
6
 
842 dsic.upv.es!antodo 7
extern PetscEvent ST_SetUp, ST_Apply, ST_ApplyB, ST_ApplyNoB, ST_ApplyTranspose, ST_InnerProduct;
8
extern PetscFList STList;
9
 
6 dsic.upv.es!jroman 10
typedef struct _STOps *STOps;
11
 
12
struct _STOps {
13
  int          (*setup)(ST);
14
  int          (*apply)(ST,Vec,Vec);
15
  int          (*applyB)(ST,Vec,Vec);
16
  int          (*applynoB)(ST,Vec,Vec);
780 dsic.upv.es!jroman 17
  int          (*applytrans)(ST,Vec,Vec);
6 dsic.upv.es!jroman 18
  int          (*setshift)(ST,PetscScalar);
19
  int          (*setfromoptions)(ST);
20
  int          (*presolve)(ST);  
21
  int          (*postsolve)(ST);  
22
  int          (*backtr)(ST,PetscScalar*,PetscScalar*);  
23
  int          (*destroy)(ST);
24
  int          (*view)(ST,PetscViewer);
25
};
26
 
27
struct _p_ST {
784 dsic.upv.es!antodo 28
  PETSCHEADER(struct _STOps);
6 dsic.upv.es!jroman 29
  /*------------------------- User parameters --------------------------*/
382 dsic.upv.es!antodo 30
  Mat            A,B;              /* Matrices which define the eigensystem */
31
  PetscScalar    sigma;            /* Value of the shift */
32
  STMatMode      shift_matrix;
33
  STBilinearForm bilinear_form;
34
  MatStructure   str;          /* whether matrices have the same pattern or not */
35
  Mat            mat;
6 dsic.upv.es!jroman 36
 
37
  /*------------------------- Misc data --------------------------*/
20 dsic.upv.es!jroman 38
  KSP          ksp;
344 dsic.upv.es!antodo 39
  Vec          w;
6 dsic.upv.es!jroman 40
  void         *data;
41
  int          setupcalled;
163 dsic.upv.es!antodo 42
  int          lineariterations;
310 dsic.upv.es!antodo 43
  int          (*checknullspace)(ST,int,Vec*);
413 dsic.upv.es!antodo 44
 
45
  /*------------------------- Cache Bx product -------------------*/
982 slepc 46
  PetscInt       xid;
47
  PetscInt       xstate;
48
  Vec            Bx;
6 dsic.upv.es!jroman 49
};
50
 
842 dsic.upv.es!antodo 51
EXTERN PetscErrorCode STRegisterAll(char*);
52
EXTERN PetscErrorCode STRegister(char*,char*,char*,int(*)(ST));
53
#if defined(PETSC_USE_DYNAMIC_LIBRARIES)
54
#define STRegisterDynamic(a,b,c,d) STRegister(a,b,c,0)
55
#else
56
#define STRegisterDynamic(a,b,c,d) STRegister(a,b,c,d)
57
#endif
58
 
476 dsic.upv.es!antodo 59
EXTERN PetscErrorCode STApplyB_Default(ST,Vec,Vec);
60
EXTERN PetscErrorCode STView_Default(ST,PetscViewer);
61
EXTERN PetscErrorCode STAssociatedKSPSolve(ST,Vec,Vec);
780 dsic.upv.es!jroman 62
EXTERN PetscErrorCode STAssociatedKSPSolveTranspose(ST,Vec,Vec);
476 dsic.upv.es!antodo 63
EXTERN PetscErrorCode STCheckNullSpace_Default(ST,int,Vec*);
64
EXTERN PetscErrorCode STMatShellCreate(ST st,Mat *mat);
6 dsic.upv.es!jroman 65
 
66
#endif
67