Actual source code: stimpl.h
2: #ifndef _STIMPL
3: #define _STIMPL
5: #include slepceps.h
7: typedef struct _STOps *STOps;
9: struct _STOps {
10: int (*setup)(ST);
11: int (*apply)(ST,Vec,Vec);
12: int (*applyB)(ST,Vec,Vec);
13: int (*applynoB)(ST,Vec,Vec);
14: int (*setshift)(ST,PetscScalar);
15: int (*setfromoptions)(ST);
16: int (*presolve)(ST);
17: int (*postsolve)(ST);
18: int (*backtr)(ST,PetscScalar*,PetscScalar*);
19: int (*destroy)(ST);
20: int (*view)(ST,PetscViewer);
21: };
23: struct _p_ST {
24: PETSCHEADER(struct _STOps)
25: /*------------------------- User parameters --------------------------*/
26: Mat A,B; /* Matrices which define the eigensystem */
27: PetscScalar sigma; /* Value of the shift */
28: STMatMode shift_matrix;
29: STBilinearForm bilinear_form;
30: MatStructure str; /* whether matrices have the same pattern or not */
31: Mat mat;
33: /*------------------------- Misc data --------------------------*/
34: KSP ksp;
35: Vec w;
36: void *data;
37: int setupcalled;
38: int lineariterations;
39: int (*checknullspace)(ST,int,Vec*);
40:
41: /*------------------------- Cache Bx product -------------------*/
42: Vec x;
43: int xstate;
44: Vec Bx;
45: };
47: EXTERN PetscErrorCode STApplyB_Default(ST,Vec,Vec);
48: EXTERN PetscErrorCode STView_Default(ST,PetscViewer);
49: EXTERN PetscErrorCode STAssociatedKSPSolve(ST,Vec,Vec);
50: EXTERN PetscErrorCode STCheckNullSpace_Default(ST,int,Vec*);
51: EXTERN PetscErrorCode STMatShellCreate(ST st,Mat *mat);
53: #endif