| 2757 |
jroman |
1 |
/*
|
|
|
2 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
3 |
SLEPc - Scalable Library for Eigenvalue Problem Computations
|
|
|
4 |
Copyright (c) 2002-2011, Universitat Politecnica de Valencia, Spain
|
|
|
5 |
|
|
|
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/>.
|
|
|
19 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
20 |
*/
|
|
|
21 |
|
|
|
22 |
#ifndef _PSIMPL
|
|
|
23 |
#define _PSIMPL
|
|
|
24 |
|
|
|
25 |
#include <slepcps.h>
|
|
|
26 |
|
| 2807 |
jroman |
27 |
extern PetscLogEvent PS_Solve,PS_Sort,PS_Vectors,PS_Other;
|
| 2777 |
jroman |
28 |
extern const char *PSMatName[];
|
| 2757 |
jroman |
29 |
|
|
|
30 |
typedef struct _PSOps *PSOps;
|
|
|
31 |
|
|
|
32 |
struct _PSOps {
|
|
|
33 |
PetscErrorCode (*allocate)(PS,PetscInt);
|
| 2777 |
jroman |
34 |
PetscErrorCode (*view)(PS,PetscViewer);
|
| 2807 |
jroman |
35 |
PetscErrorCode (*vectors)(PS,PSMatType,PetscInt*,PetscReal*);
|
| 2832 |
jroman |
36 |
PetscErrorCode (*solve[PS_MAX_SOLVE])(PS,PetscScalar*,PetscScalar*);
|
| 2763 |
jroman |
37 |
PetscErrorCode (*sort)(PS,PetscScalar*,PetscScalar*,PetscErrorCode(*)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*);
|
| 2766 |
jroman |
38 |
PetscErrorCode (*cond)(PS,PetscReal*);
|
| 2814 |
jroman |
39 |
PetscErrorCode (*transharm)(PS,PetscScalar,PetscReal,PetscBool,PetscScalar*,PetscReal*);
|
|
|
40 |
PetscErrorCode (*transrks)(PS,PetscScalar);
|
| 2757 |
jroman |
41 |
};
|
|
|
42 |
|
|
|
43 |
struct _p_PS {
|
|
|
44 |
PETSCHEADER(struct _PSOps);
|
| 2793 |
jroman |
45 |
PetscInt method; /* identifies the variant to be used */
|
| 2794 |
jroman |
46 |
PetscBool compact; /* whether the matrices are stored in compact form */
|
| 2815 |
jroman |
47 |
PetscBool refined; /* get refined vectors instead of regular vectors */
|
| 2766 |
jroman |
48 |
PetscInt ld; /* leading dimension */
|
|
|
49 |
PetscInt l; /* number of locked (inactive) leading columns */
|
|
|
50 |
PetscInt n; /* current dimension */
|
|
|
51 |
PetscInt k; /* intermediate dimension (e.g. position of arrow) */
|
|
|
52 |
PSStateType state; /* the current state */
|
|
|
53 |
PetscScalar *mat[PS_NUM_MAT]; /* the matrices */
|
|
|
54 |
PetscReal *rmat[PS_NUM_MAT]; /* the matrices (real) */
|
|
|
55 |
PetscScalar *work;
|
|
|
56 |
PetscReal *rwork;
|
|
|
57 |
PetscBLASInt *iwork;
|
| 2770 |
jroman |
58 |
PetscInt lwork,lrwork,liwork;
|
| 2757 |
jroman |
59 |
};
|
|
|
60 |
|
| 2758 |
jroman |
61 |
extern PetscErrorCode PSAllocateMat_Private(PS,PSMatType);
|
| 2775 |
jroman |
62 |
extern PetscErrorCode PSAllocateMatReal_Private(PS,PSMatType);
|
| 2770 |
jroman |
63 |
extern PetscErrorCode PSAllocateWork_Private(PS,PetscInt,PetscInt,PetscInt);
|
| 2777 |
jroman |
64 |
extern PetscErrorCode PSViewMat_Private(PS,PetscViewer,PSMatType);
|
| 2818 |
jroman |
65 |
extern PetscErrorCode PSSortEigenvaluesReal_Private(PS,PetscInt,PetscInt,PetscReal*,PetscInt*,PetscErrorCode (*)(PetscScalar,PetscScalar,PetscScalar,PetscScalar,PetscInt*,void*),void*);
|
|
|
66 |
extern PetscErrorCode PSPermuteColumns_Private(PS,PetscInt,PetscInt,PSMatType,PetscInt*);
|
| 2821 |
jroman |
67 |
extern PetscErrorCode PSCopyMatrix_Private(PS,PSMatType,PSMatType);
|
| 2758 |
jroman |
68 |
|
| 2757 |
jroman |
69 |
#endif
|