1DSPGVX(1) LAPACK driver routine (version 3.2) DSPGVX(1)
2
3
4
6 DSPGVX - computes selected eigenvalues, and optionally, eigenvectors of
7 a real generalized symmetric-definite eigenproblem, of the form
8 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x
9
11 SUBROUTINE DSPGVX( ITYPE, JOBZ, RANGE, UPLO, N, AP, BP, VL, VU, IL, IU,
12 ABSTOL, M, W, Z, LDZ, WORK, IWORK, IFAIL, INFO )
13
14 CHARACTER JOBZ, RANGE, UPLO
15
16 INTEGER IL, INFO, ITYPE, IU, LDZ, M, N
17
18 DOUBLE PRECISION ABSTOL, VL, VU
19
20 INTEGER IFAIL( * ), IWORK( * )
21
22 DOUBLE PRECISION AP( * ), BP( * ), W( * ), WORK( * ), Z(
23 LDZ, * )
24
26 DSPGVX computes selected eigenvalues, and optionally, eigenvectors of a
27 real generalized symmetric-definite eigenproblem, of the form
28 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B
29 are assumed to be symmetric, stored in packed storage, and B is also
30 positive definite. Eigenvalues and eigenvectors can be selected by
31 specifying either a range of values or a range of indices for the
32 desired eigenvalues.
33
35 ITYPE (input) INTEGER
36 Specifies the problem type to be solved:
37 = 1: A*x = (lambda)*B*x
38 = 2: A*B*x = (lambda)*x
39 = 3: B*A*x = (lambda)*x
40
41 JOBZ (input) CHARACTER*1
42 = 'N': Compute eigenvalues only;
43 = 'V': Compute eigenvalues and eigenvectors.
44
45 RANGE (input) CHARACTER*1
46 = 'A': all eigenvalues will be found.
47 = 'V': all eigenvalues in the half-open interval (VL,VU] will
48 be found. = 'I': the IL-th through IU-th eigenvalues will be
49 found.
50
51 UPLO (input) CHARACTER*1
52 = 'U': Upper triangle of A and B are stored;
53 = 'L': Lower triangle of A and B are stored.
54
55 N (input) INTEGER
56 The order of the matrix pencil (A,B). N >= 0.
57
58 AP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
59 On entry, the upper or lower triangle of the symmetric matrix
60 A, packed columnwise in a linear array. The j-th column of A
61 is stored in the array AP as follows: if UPLO = 'U', AP(i +
62 (j-1)*j/2) = A(i,j) for 1<=i<=j; if UPLO = 'L', AP(i +
63 (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n. On exit, the contents
64 of AP are destroyed.
65
66 BP (input/output) DOUBLE PRECISION array, dimension (N*(N+1)/2)
67 On entry, the upper or lower triangle of the symmetric matrix
68 B, packed columnwise in a linear array. The j-th column of B
69 is stored in the array BP as follows: if UPLO = 'U', BP(i +
70 (j-1)*j/2) = B(i,j) for 1<=i<=j; if UPLO = 'L', BP(i +
71 (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n. On exit, the triangular
72 factor U or L from the Cholesky factorization B = U**T*U or B =
73 L*L**T, in the same storage format as B.
74
75 VL (input) DOUBLE PRECISION
76 VU (input) DOUBLE PRECISION If RANGE='V', the lower and
77 upper bounds of the interval to be searched for eigenvalues. VL
78 < VU. Not referenced if RANGE = 'A' or 'I'.
79
80 IL (input) INTEGER
81 IU (input) INTEGER If RANGE='I', the indices (in ascending
82 order) of the smallest and largest eigenvalues to be returned.
83 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not
84 referenced if RANGE = 'A' or 'V'.
85
86 ABSTOL (input) DOUBLE PRECISION
87 The absolute error tolerance for the eigenvalues. An approxi‐
88 mate eigenvalue is accepted as converged when it is determined
89 to lie in an interval [a,b] of width less than or equal to
90 ABSTOL + EPS * max( |a|,|b| ) , where EPS is the machine pre‐
91 cision. If ABSTOL is less than or equal to zero, then EPS*|T|
92 will be used in its place, where |T| is the 1-norm of the
93 tridiagonal matrix obtained by reducing A to tridiagonal form.
94 Eigenvalues will be computed most accurately when ABSTOL is set
95 to twice the underflow threshold 2*DLAMCH('S'), not zero. If
96 this routine returns with INFO>0, indicating that some eigen‐
97 vectors did not converge, try setting ABSTOL to 2*DLAMCH('S').
98
99 M (output) INTEGER
100 The total number of eigenvalues found. 0 <= M <= N. If RANGE
101 = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
102
103 W (output) DOUBLE PRECISION array, dimension (N)
104 On normal exit, the first M elements contain the selected ei‐
105 genvalues in ascending order.
106
107 Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M))
108 If JOBZ = 'N', then Z is not referenced. If JOBZ = 'V', then
109 if INFO = 0, the first M columns of Z contain the orthonormal
110 eigenvectors of the matrix A corresponding to the selected ei‐
111 genvalues, with the i-th column of Z holding the eigenvector
112 associated with W(i). The eigenvectors are normalized as fol‐
113 lows: if ITYPE = 1 or 2, Z**T*B*Z = I; if ITYPE = 3,
114 Z**T*inv(B)*Z = I. If an eigenvector fails to converge, then
115 that column of Z contains the latest approximation to the
116 eigenvector, and the index of the eigenvector is returned in
117 IFAIL. Note: the user must ensure that at least max(1,M) col‐
118 umns are supplied in the array Z; if RANGE = 'V', the exact
119 value of M is not known in advance and an upper bound must be
120 used.
121
122 LDZ (input) INTEGER
123 The leading dimension of the array Z. LDZ >= 1, and if JOBZ =
124 'V', LDZ >= max(1,N).
125
126 WORK (workspace) DOUBLE PRECISION array, dimension (8*N)
127
128 IWORK (workspace) INTEGER array, dimension (5*N)
129
130 IFAIL (output) INTEGER array, dimension (N)
131 If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL
132 are zero. If INFO > 0, then IFAIL contains the indices of the
133 eigenvectors that failed to converge. If JOBZ = 'N', then
134 IFAIL is not referenced.
135
136 INFO (output) INTEGER
137 = 0: successful exit
138 < 0: if INFO = -i, the i-th argument had an illegal value
139 > 0: DPPTRF or DSPEVX returned an error code:
140 <= N: if INFO = i, DSPEVX failed to converge; i eigenvectors
141 failed to converge. Their indices are stored in array IFAIL.
142 > N: if INFO = N + i, for 1 <= i <= N, then the leading minor
143 of order i of B is not positive definite. The factorization of
144 B could not be completed and no eigenvalues or eigenvectors
145 were computed.
146
148 Based on contributions by
149 Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
150
151
152
153 LAPACK driver routine (version 3.N2o)vember 2008 DSPGVX(1)