Actual source code: krylovschur.h
1: /*
2: Private header for Krylov-Schur.
4: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
5: SLEPc - Scalable Library for Eigenvalue Problem Computations
6: Copyright (c) 2002-2013, Universitat Politecnica de Valencia, Spain
8: This file is part of SLEPc.
10: SLEPc is free software: you can redistribute it and/or modify it under the
11: terms of version 3 of the GNU Lesser General Public License as published by
12: the Free Software Foundation.
14: SLEPc is distributed in the hope that it will be useful, but WITHOUT ANY
15: WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16: FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
17: more details.
19: You should have received a copy of the GNU Lesser General Public License
20: along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
21: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
22: */
27: PETSC_INTERN PetscErrorCode EPSSolve_KrylovSchur_Default(EPS);
28: PETSC_INTERN PetscErrorCode EPSSolve_KrylovSchur_Symm(EPS);
29: PETSC_INTERN PetscErrorCode EPSSolve_KrylovSchur_Slice(EPS);
30: PETSC_INTERN PetscErrorCode EPSSolve_KrylovSchur_Indefinite(EPS);
31: PETSC_INTERN PetscErrorCode EPSGetArbitraryValues(EPS,PetscScalar*,PetscScalar*);
33: /* Structure characterizing a shift in spectrum slicing */
34: typedef struct _n_shift *shift;
35: struct _n_shift {
36: PetscReal value;
37: PetscInt inertia;
38: PetscBool comp[2]; /* Shows completion of subintervals (left and right) */
39: shift neighb[2]; /* Adjacent shifts */
40: PetscInt index; /* Index in eig where found values are stored */
41: PetscInt neigs; /* Number of values found */
42: PetscReal ext[2]; /* Limits for accepted values */
43: PetscInt nsch[2]; /* Number of missing values for each subinterval */
44: PetscInt nconv[2]; /* Converged on each side (accepted or not) */
45: };
47: /* Structure for storing the state of spectrum slicing */
48: struct _n_SR {
49: PetscReal int0,int1; /* Extremes of the interval */
50: PetscInt dir; /* Determines the order of values in eig (+1 incr, -1 decr) */
51: PetscBool hasEnd; /* Tells whether the interval has an end */
52: PetscInt inertia0,inertia1;
53: Vec *V;
54: PetscScalar *eig,*eigi,*monit,*back;
55: PetscReal *errest;
56: PetscInt *perm; /* Permutation for keeping the eigenvalues in order */
57: PetscInt numEigs; /* Number of eigenvalues in the interval */
58: PetscInt indexEig;
59: shift sPres; /* Present shift */
60: shift *pending; /* Pending shifts array */
61: PetscInt nPend; /* Number of pending shifts */
62: PetscInt maxPend; /* Size of "pending" array */
63: Vec *VDef; /* Vector for deflation */
64: PetscInt *idxDef; /* For deflation */
65: PetscInt nMAXCompl;
66: PetscInt iterCompl;
67: PetscInt itsKs; /* Krylovschur restarts */
68: PetscInt nleap;
69: shift s0; /* Initial shift */
70: PetscScalar *S; /* Matrix for projected problem */
71: PetscInt nS;
72: PetscReal beta;
73: shift sPrev;
74: };
75: typedef struct _n_SR *SR;
77: typedef struct {
78: PetscReal keep;
79: SR sr;
80: } EPS_KRYLOVSCHUR;
82: #endif