NAG Library Routine Document
F01BVF
1 Purpose
F01BVF transforms the generalized symmetric-definite eigenproblem
to the equivalent standard eigenproblem
, where
,
and
are symmetric band matrices and
is positive definite.
must have been decomposed by
F01BUF.
2 Specification
SUBROUTINE F01BVF ( |
N, MA1, MB1, M3, K, A, LDA, B, LDB, V, LDV, W, IFAIL) |
INTEGER |
N, MA1, MB1, M3, K, LDA, LDB, LDV, IFAIL |
REAL (KIND=nag_wp) |
A(LDA,N), B(LDB,N), V(LDV,M3), W(M3) |
|
3 Description
is a symmetric band matrix of order
and bandwidth
. The positive definite symmetric band matrix
, of order
and bandwidth
, must have been previously decomposed by
F01BUF as
. F01BVF applies
,
and
to
,
rows at a time, restoring the band form of
at each stage by plane rotations. The parameter
defines the change-over point in the decomposition of
as used by
F01BUF and is also used as a change-over point in the transformations applied by this routine. For maximum efficiency,
should be chosen to be the multiple of
nearest to
. The resulting symmetric band matrix
is overwritten on
A. The eigenvalues of
, and thus of the original problem, may be found using
F08HEF (DSBTRD) and
F08JFF (DSTERF). For selected eigenvalues, use
F08HEF (DSBTRD) and
F08JJF (DSTEBZ).
4 References
Crawford C R (1973) Reduction of a band-symmetric generalized eigenvalue problem Comm. ACM 16 41–44
5 Parameters
- 1: – INTEGERInput
-
On entry: , the order of the matrices , and .
- 2: – INTEGERInput
-
On entry: , where is the number of nonzero superdiagonals in . Normally .
- 3: – INTEGERInput
-
On entry: , where is the number of nonzero superdiagonals in .
Constraint:
.
- 4: – INTEGERInput
-
On entry: the value of .
- 5: – INTEGERInput
-
On entry:
, the change-over point in the transformations. It must be the same as the value used by
F01BUF in the decomposition of
.
Suggested value:
the optimum value is the multiple of nearest to .
Constraint:
.
- 6: – REAL (KIND=nag_wp) arrayInput/Output
-
On entry: the upper triangle of the
by
symmetric band matrix
, with the diagonal of the matrix stored in the
th row of the array, and the
superdiagonals within the band stored in the first
rows of the array. Each column of the matrix is stored in the corresponding column of the array. For example, if
and
, the storage scheme is
Elements in the top left corner of the array need not be set. The following code assigns the matrix elements within the band to the correct elements of the array:
DO 20 J = 1, N
DO 10 I = MAX(1,J-MA1+1), J
A(I-J+MA1,J) = matrix (I,J)
10 CONTINUE
20 CONTINUE
On exit: is overwritten by the corresponding elements of .
- 7: – INTEGERInput
-
On entry: the first dimension of the array
A as declared in the (sub)program from which F01BVF is called.
Constraint:
.
- 8: – REAL (KIND=nag_wp) arrayInput/Output
-
On entry: the elements of the decomposition of matrix
as returned by
F01BUF.
On exit: the elements of
B will have been permuted.
- 9: – INTEGERInput
-
On entry: the first dimension of the array
B as declared in the (sub)program from which F01BVF is called.
Constraint:
.
- 10: – REAL (KIND=nag_wp) arrayWorkspace
- 11: – INTEGERInput
-
On entry: the first dimension of the array
V as declared in the (sub)program from which F01BVF is called.
Constraint:
.
- 12: – REAL (KIND=nag_wp) arrayWorkspace
-
- 13: – INTEGERInput/Output
-
On entry:
IFAIL must be set to
,
. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
.
When the value is used it is essential to test the value of IFAIL on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
6 Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Errors or warnings detected by the routine:
-
An unexpected error has been triggered by this routine. Please
contact
NAG.
See
Section 3.8 in the Essential Introduction for further information.
Your licence key may have expired or may not have been installed correctly.
See
Section 3.7 in the Essential Introduction for further information.
Dynamic memory allocation failed.
See
Section 3.6 in the Essential Introduction for further information.
7 Accuracy
In general the computed system is exactly congruent to a problem , where and are of the order of and respectively, where is the condition number of with respect to inversion and is the machine precision. This means that when is positive definite but not well-conditioned with respect to inversion, the method, which effectively involves the inversion of , may lead to a severe loss of accuracy in well-conditioned eigenvalues.
8 Parallelism and Performance
Not applicable.
The time taken by F01BVF is approximately proportional to and the distance of from , e.g., and take longer.
When is positive definite and well-conditioned with respect to inversion, the generalized symmetric eigenproblem can be reduced to the standard symmetric problem where and , the Cholesky factorization.
When
and
are of band form, especially if the bandwidth is small compared with the order of the matrices, storage considerations may rule out the possibility of working with
since it will be a full matrix in general. However, for any factorization of the form
, the generalized symmetric problem reduces to the standard form
and there does exist a factorization such that
is still of band form (see
Crawford (1973)). Writing
the standard form is
and the bandwidth of
is the maximum bandwidth of
and
.
Each stage in the transformation consists of two phases. The first reduces a leading principal sub-matrix of to the identity matrix and this introduces nonzero elements outside the band of . In the second, further transformations are applied which leave the reduced part of unaltered and drive the extra elements upwards and off the top left corner of . Alternatively, may be reduced to the identity matrix starting at the bottom right-hand corner and the extra elements introduced in can be driven downwards.
The advantage of the decomposition of is that no extra elements have to be pushed over the whole length of . If is taken as approximately , the shifting is limited to halfway. At each stage the size of the triangular bumps produced in depends on the number of rows and columns of which are eliminated in the first phase and on the bandwidth of . The number of rows and columns over which these triangles are moved at each step in the second phase is equal to the bandwidth of .
In this routine,
A is defined as being at least as wide as
and must be filled out with zeros if necessary as it is overwritten with
. The number of rows and columns of
which are effectively eliminated at each stage is
.
10 Example
This example finds the three smallest eigenvalues of
, where
10.1 Program Text
Program Text (f01bvfe.f90)
10.2 Program Data
Program Data (f01bvfe.d)
10.3 Program Results
Program Results (f01bvfe.r)