NAG FL Interface
f01bvf (real_symm_posdef_geneig)
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
Fortran Interface
Subroutine f01bvf ( |
n, ma1, mb1, m3, k, a, lda, b, ldb, v, ldv, w, ifail) |
Integer, Intent (In) |
:: |
n, ma1, mb1, m3, k, lda, ldb, ldv |
Integer, Intent (Inout) |
:: |
ifail |
Real (Kind=nag_wp), Intent (Inout) |
:: |
a(lda,n), b(ldb,n), v(ldv,m3) |
Real (Kind=nag_wp), Intent (Out) |
:: |
w(m3) |
|
C Header Interface
#include <nag.h>
void |
f01bvf_ (const Integer *n, const Integer *ma1, const Integer *mb1, const Integer *m3, const Integer *k, double a[], const Integer *lda, double b[], const Integer *ldb, double v[], const Integer *ldv, double w[], Integer *ifail) |
|
C++ Header Interface
#include <nag.h> extern "C" {
void |
f01bvf_ (const Integer &n, const Integer &ma1, const Integer &mb1, const Integer &m3, const Integer &k, double a[], const Integer &lda, double b[], const Integer &ldb, double v[], const Integer &ldv, double w[], Integer &ifail) |
}
|
The routine may be called by the names f01bvf or nagf_matop_real_symm_posdef_geneig.
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 argument
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 and
f08jff. For selected eigenvalues, use
f08hef and
f08jjf.
4
References
Crawford C R (1973) Reduction of a band-symmetric generalized eigenvalue problem Comm. ACM 16 41–44
5
Arguments
-
1:
– Integer
Input
-
On entry: , the order of the matrices , and .
-
2:
– Integer
Input
-
On entry: , where is the number of nonzero superdiagonals in . Normally .
-
3:
– Integer
Input
-
On entry: , where is the number of nonzero superdiagonals in .
Constraint:
.
-
4:
– Integer
Input
-
On entry: the value of .
-
5:
– Integer
Input
-
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) array
Input/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 matrix elements within the band can be assigned to the correct elements of the array using the following
code:
Do j = 1, n
Do i = max(1,j-ma1+1), J
a(i-j+ma1,j) = matrix (i,j)
End Do
End Do
On exit: is overwritten by the corresponding elements of .
-
7:
– Integer
Input
-
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) array
Input/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:
– Integer
Input
-
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) array
Workspace
-
11:
– Integer
Input
-
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) array
Workspace
-
-
13:
– Integer
Input/Output
-
On entry:
ifail must be set to
,
or
to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value
or
is recommended. If message printing is undesirable, then the value
is recommended. Otherwise, the value
is recommended.
When the value or 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:
-
On entry, and .
Constraint: .
An unexpected error has been triggered by this routine. Please
contact
NAG.
See
Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See
Section 9 in the Introduction to the NAG Library FL Interface 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
f01bvf is not threaded in any implementation.
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
10.2
Program Data
10.3
Program Results