NAG Library Routine Document
f08pxf
(zhsein)
1
Purpose
f08pxf (zhsein) computes selected left and/or right eigenvectors of a complex upper Hessenberg matrix corresponding to specified eigenvalues, by inverse iteration.
2
Specification
Fortran Interface
Subroutine f08pxf ( |
job,
eigsrc,
initv,
select,
n,
h,
ldh,
w,
vl,
ldvl,
vr,
ldvr,
mm,
m,
work,
rwork,
ifaill,
ifailr,
info) |
Integer, Intent (In) | :: |
n,
ldh,
ldvl,
ldvr,
mm | Integer, Intent (Inout) | :: |
ifaill(*),
ifailr(*) | Integer, Intent (Out) | :: |
m,
info | Real (Kind=nag_wp), Intent (Out) | :: |
rwork(n) | Complex (Kind=nag_wp), Intent (In) | :: |
h(ldh,*) | Complex (Kind=nag_wp), Intent (Inout) | :: |
w(*),
vl(ldvl,*),
vr(ldvr,*) | Complex (Kind=nag_wp), Intent (Out) | :: |
work(n*n) | Logical, Intent (In) | :: |
select(*) | Character (1), Intent (In) | :: |
job,
eigsrc,
initv |
|
C Header Interface
#include nagmk26.h
void |
f08pxf_ (
const char *job,
const char *eigsrc,
const char *initv,
const logical sel[],
const Integer *n,
const Complex h[],
const Integer *ldh,
Complex w[],
Complex vl[],
const Integer *ldvl,
Complex vr[],
const Integer *ldvr,
const Integer *mm,
Integer *m,
Complex work[],
double rwork[],
Integer ifaill[],
Integer ifailr[],
Integer *info,
const Charlen length_job,
const Charlen length_eigsrc,
const Charlen length_initv) |
|
The routine may be called by its
LAPACK
name zhsein.
3
Description
f08pxf (zhsein) computes left and/or right eigenvectors of a complex upper Hessenberg matrix , corresponding to selected eigenvalues.
The right eigenvector
, and the left eigenvector
, corresponding to an eigenvalue
, are defined by:
The eigenvectors are computed by inverse iteration. They are scaled so that
.
If
has been formed by reduction of a complex general matrix
to upper Hessenberg form, then the eigenvectors of
may be transformed to eigenvectors of
by a call to
f08nuf (zunmhr).
4
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5
Arguments
- 1: – Character(1)Input
-
On entry: indicates whether left and/or right eigenvectors are to be computed.
- Only right eigenvectors are computed.
- Only left eigenvectors are computed.
- Both left and right eigenvectors are computed.
Constraint:
, or .
- 2: – Character(1)Input
-
On entry: indicates whether the eigenvalues of
(stored in
w) were found using
f08psf (zhseqr).
- The eigenvalues of were found using f08psf (zhseqr); thus if has any zero subdiagonal elements (and so is block triangular), then the th eigenvalue can be assumed to be an eigenvalue of the block containing the th row/column. This property allows the routine to perform inverse iteration on just one diagonal block.
- No such assumption is made and the routine performs inverse iteration using the whole matrix.
Constraint:
or .
- 3: – Character(1)Input
-
On entry: indicates whether you are supplying initial estimates for the selected eigenvectors.
- No initial estimates are supplied.
- Initial estimates are supplied in vl and/or vr.
Constraint:
or .
- 4: – Logical arrayInput
-
Note: the dimension of the array
select
must be at least
.
On entry: specifies which eigenvectors are to be computed. To select the eigenvector corresponding to the eigenvalue , must be set to .TRUE..
- 5: – IntegerInput
-
On entry: , the order of the matrix .
Constraint:
.
- 6: – Complex (Kind=nag_wp) arrayInput
-
Note: the second dimension of the array
h
must be at least
.
On entry: the
by
upper Hessenberg matrix
. If a NaN is detected in
h, the routine will return with
.
Constraint:
No element of
h is equal to NaN.
- 7: – IntegerInput
-
On entry: the first dimension of the array
h as declared in the (sub)program from which
f08pxf (zhsein) is called.
Constraint:
.
- 8: – Complex (Kind=nag_wp) arrayInput/Output
-
Note: the dimension of the array
w
must be at least
.
On entry: the eigenvalues of the matrix
. If
, the array
must be exactly as returned by
f08psf (zhseqr).
On exit: the real parts of some elements of
w may be modified, as close eigenvalues are perturbed slightly in searching for independent eigenvectors.
- 9: – Complex (Kind=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
vl
must be at least
if
or
and at least
if
.
On entry: if
and
or
,
vl must contain starting vectors for inverse iteration for the left eigenvectors. Each starting vector must be stored in the same column as will be used to store the corresponding eigenvector (see below).
If
,
vl need not be set.
On exit: if
or
,
vl contains the computed left eigenvectors (as specified by
select). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues.
If
,
vl is not referenced.
- 10: – IntegerInput
-
On entry: the first dimension of the array
vl as declared in the (sub)program from which
f08pxf (zhsein) is called.
Constraints:
- if or , ;
- if , .
- 11: – Complex (Kind=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
vr
must be at least
if
or
and at least
if
.
On entry: if
and
or
,
vr must contain starting vectors for inverse iteration for the right eigenvectors. Each starting vector must be stored in the same column as will be used to store the corresponding eigenvector (see below).
If
,
vr need not be set.
On exit: if
or
,
vr contains the computed right eigenvectors (as specified by
select). The eigenvectors are stored consecutively in the columns of the array, in the same order as their eigenvalues.
If
,
vr is not referenced.
- 12: – IntegerInput
-
On entry: the first dimension of the array
vr as declared in the (sub)program from which
f08pxf (zhsein) is called.
Constraints:
- if or , ;
- if , .
- 13: – IntegerInput
-
On entry: the number of columns in the arrays
vl and/or
vr . This must be an upper bound on the actual number of columns required, that is, the number of elements of
select, in the first
n, that are set to .TRUE..
Constraint:
.
- 14: – IntegerOutput
-
On exit: , the number of selected eigenvectors.
- 15: – Complex (Kind=nag_wp) arrayWorkspace
-
- 16: – Real (Kind=nag_wp) arrayWorkspace
-
- 17: – Integer arrayOutput
-
Note: the dimension of the array
ifaill
must be at least
if
or
and at least
if
.
On exit: if
or
, then
if the selected left eigenvector converged and
if the eigenvector stored in the
th row or column of
vl (corresponding to the
th eigenvalue) failed to converge.
If
,
ifaill is not referenced.
- 18: – Integer arrayOutput
-
Note: the dimension of the array
ifailr
must be at least
if
or
and at least
if
.
On exit: if
or
, then
if the selected right eigenvector converged and
if the eigenvector stored in the
th column of
vr (corresponding to the
th eigenvalue) failed to converge.
If
,
ifailr is not referenced.
- 19: – IntegerOutput
On exit:
unless the routine detects an error (see
Section 6).
6
Error Indicators and Warnings
-
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
-
If
, then
eigenvectors (as indicated by the arguments
ifaill and/or
ifailr above) failed to converge. The corresponding columns of
vl and/or
vr contain no useful information.
7
Accuracy
Each computed right eigenvector
is the exact eigenvector of a nearby matrix
, such that
. Hence the residual is small:
However, eigenvectors corresponding to close or coincident eigenvalues may not accurately span the relevant subspaces.
Similar remarks apply to computed left eigenvectors.
8
Parallelism and Performance
f08pxf (zhsein) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08pxf (zhsein) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The real analogue of this routine is
f08pkf (dhsein).
10
Example
See
Section 10 in
f08nuf (zunmhr).