| 1521 |
slepc |
1 |
/*
|
|
|
2 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 1672 |
slepc |
3 |
SLEPc - Scalable Library for Eigenvalue Problem Computations
|
| 2575 |
eromero |
4 |
Copyright (c) 2002-2011, Universitat 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 |
|
| 2333 |
jroman |
25 |
#include <slepcst.h>
|
| 1521 |
slepc |
26 |
|
| 2333 |
jroman |
27 |
extern PetscLogEvent ST_SetUp,ST_Apply,ST_ApplyB,ST_ApplyTranspose;
|
| 1521 |
slepc |
28 |
extern PetscFList STList;
|
|
|
29 |
|
|
|
30 |
typedef struct _STOps *STOps;
|
|
|
31 |
|
|
|
32 |
struct _STOps {
|
| 2333 |
jroman |
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);
|
|
|
40 |
PetscErrorCode (*backtr)(ST,PetscInt,PetscScalar*,PetscScalar*);
|
|
|
41 |
PetscErrorCode (*destroy)(ST);
|
| 2348 |
jroman |
42 |
PetscErrorCode (*reset)(ST);
|
| 2333 |
jroman |
43 |
PetscErrorCode (*view)(ST,PetscViewer);
|
|
|
44 |
PetscErrorCode (*checknullspace)(ST,PetscInt,const Vec[]);
|
| 1521 |
slepc |
45 |
};
|
|
|
46 |
|
|
|
47 |
struct _p_ST {
|
|
|
48 |
PETSCHEADER(struct _STOps);
|
|
|
49 |
/*------------------------- User parameters --------------------------*/
|
| 2333 |
jroman |
50 |
Mat A,B; /* Matrices which define the eigensystem */
|
|
|
51 |
PetscScalar sigma; /* Value of the shift */
|
|
|
52 |
PetscBool sigma_set; /* whether the user provided the shift or not */
|
|
|
53 |
PetscScalar defsigma; /* Default value of the shift */
|
|
|
54 |
STMatMode shift_matrix;
|
|
|
55 |
MatStructure str; /* whether matrices have the same pattern or not */
|
|
|
56 |
Mat mat;
|
| 1521 |
slepc |
57 |
|
|
|
58 |
/*------------------------- Misc data --------------------------*/
|
| 2333 |
jroman |
59 |
KSP ksp;
|
|
|
60 |
Vec w;
|
|
|
61 |
Vec D; /* diagonal matrix for balancing */
|
|
|
62 |
Vec wb; /* balancing requires an extra work vector */
|
|
|
63 |
void *data;
|
|
|
64 |
PetscInt setupcalled;
|
|
|
65 |
PetscInt lineariterations;
|
|
|
66 |
PetscInt applys;
|
| 1521 |
slepc |
67 |
};
|
|
|
68 |
|
| 2240 |
jroman |
69 |
extern PetscErrorCode STGetBilinearForm_Default(ST,Mat*);
|
|
|
70 |
extern PetscErrorCode STAssociatedKSPSolve(ST,Vec,Vec);
|
|
|
71 |
extern PetscErrorCode STAssociatedKSPSolveTranspose(ST,Vec,Vec);
|
|
|
72 |
extern PetscErrorCode STCheckNullSpace_Default(ST,PetscInt,const Vec[]);
|
|
|
73 |
extern PetscErrorCode STMatShellCreate(ST st,Mat *mat);
|
| 1521 |
slepc |
74 |
|
|
|
75 |
#endif
|
|
|
76 |
|