| 1521 |
slepc |
1 |
/*
|
|
|
2 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 1672 |
slepc |
3 |
SLEPc - Scalable Library for Eigenvalue Problem Computations
|
| 2116 |
eromero |
4 |
Copyright (c) 2002-2010, Universidad Politecnica de Valencia, Spain
|
| 1521 |
slepc |
5 |
|
| 1672 |
slepc |
6 |
This file is part of SLEPc.
|
|
|
7 |
|
|
|
8 |
SLEPc is free software: you can redistribute it and/or modify it under the
|
|
|
9 |
terms of version 3 of the GNU Lesser General Public License as published by
|
|
|
10 |
the Free Software Foundation.
|
|
|
11 |
|
|
|
12 |
SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
13 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
14 |
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
|
|
|
15 |
more details.
|
|
|
16 |
|
|
|
17 |
You should have received a copy of the GNU Lesser General Public License
|
|
|
18 |
along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
|
| 1521 |
slepc |
19 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
20 |
*/
|
|
|
21 |
|
|
|
22 |
#ifndef _STIMPL
|
|
|
23 |
#define _STIMPL
|
|
|
24 |
|
|
|
25 |
#include "slepceps.h"
|
|
|
26 |
|
|
|
27 |
extern PetscLogEvent ST_SetUp, ST_Apply, ST_ApplyB, ST_ApplyTranspose;
|
|
|
28 |
extern PetscFList STList;
|
|
|
29 |
|
|
|
30 |
typedef struct _STOps *STOps;
|
|
|
31 |
|
|
|
32 |
struct _STOps {
|
|
|
33 |
PetscErrorCode (*setup)(ST);
|
|
|
34 |
PetscErrorCode (*apply)(ST,Vec,Vec);
|
|
|
35 |
PetscErrorCode (*getbilinearform)(ST,Mat*);
|
|
|
36 |
PetscErrorCode (*applytrans)(ST,Vec,Vec);
|
|
|
37 |
PetscErrorCode (*setshift)(ST,PetscScalar);
|
|
|
38 |
PetscErrorCode (*setfromoptions)(ST);
|
|
|
39 |
PetscErrorCode (*postsolve)(ST);
|
| 1779 |
antodo |
40 |
PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*);
|
| 1521 |
slepc |
41 |
PetscErrorCode (*destroy)(ST);
|
|
|
42 |
PetscErrorCode (*view)(ST,PetscViewer);
|
|
|
43 |
};
|
|
|
44 |
|
|
|
45 |
struct _p_ST {
|
|
|
46 |
PETSCHEADER(struct _STOps);
|
|
|
47 |
/*------------------------- User parameters --------------------------*/
|
|
|
48 |
Mat A,B; /* Matrices which define the eigensystem */
|
|
|
49 |
PetscScalar sigma; /* Value of the shift */
|
| 2074 |
jroman |
50 |
PetscTruth sigma_set; /* whether the user provided the shift or not */
|
|
|
51 |
PetscScalar defsigma; /* Default value of the shift */
|
| 1521 |
slepc |
52 |
STMatMode shift_matrix;
|
|
|
53 |
MatStructure str; /* whether matrices have the same pattern or not */
|
|
|
54 |
Mat mat;
|
|
|
55 |
|
|
|
56 |
/*------------------------- Misc data --------------------------*/
|
|
|
57 |
KSP ksp;
|
|
|
58 |
Vec w;
|
| 1804 |
jroman |
59 |
Vec D; /* diagonal matrix for balancing */
|
|
|
60 |
Vec wb; /* balancing requires an extra work vector */
|
| 1521 |
slepc |
61 |
void *data;
|
|
|
62 |
PetscInt setupcalled;
|
|
|
63 |
PetscInt lineariterations;
|
|
|
64 |
PetscInt applys;
|
|
|
65 |
PetscErrorCode (*checknullspace)(ST,PetscInt,const Vec[]);
|
|
|
66 |
|
|
|
67 |
};
|
|
|
68 |
|
|
|
69 |
EXTERN PetscErrorCode STRegisterAll(char*);
|
| 1853 |
antodo |
70 |
EXTERN PetscErrorCode STInitializePackage(char*);
|
|
|
71 |
EXTERN PetscErrorCode STFinalizePackage(void);
|
| 1521 |
slepc |
72 |
|
|
|
73 |
EXTERN PetscErrorCode STGetBilinearForm_Default(ST,Mat*);
|
|
|
74 |
EXTERN PetscErrorCode STView_Default(ST,PetscViewer);
|
|
|
75 |
EXTERN PetscErrorCode STAssociatedKSPSolve(ST,Vec,Vec);
|
|
|
76 |
EXTERN PetscErrorCode STAssociatedKSPSolveTranspose(ST,Vec,Vec);
|
|
|
77 |
EXTERN PetscErrorCode STCheckNullSpace_Default(ST,PetscInt,const Vec[]);
|
|
|
78 |
EXTERN PetscErrorCode STMatShellCreate(ST st,Mat *mat);
|
|
|
79 |
|
|
|
80 |
#endif
|
|
|
81 |
|