NAG Library Routine Document
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 nagmk26.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) |
|
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 (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
Arguments
- 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 argument you should refer to
Section 3.4 in How to Use the NAG Library and its Documentation 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 argument, 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.9 in How to Use the NAG Library and its Documentation for further information.
Your licence key may have expired or may not have been installed correctly.
See
Section 3.8 in How to Use the NAG Library and its Documentation for further information.
Dynamic memory allocation failed.
See
Section 3.7 in How to Use the NAG Library and its Documentation 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
Program Text (f01bvfe.f90)
10.2
Program Data
Program Data (f01bvfe.d)
10.3
Program Results
Program Results (f01bvfe.r)