1DTGEX2(1)           LAPACK auxiliary routine (version 3.2)           DTGEX2(1)
2
3
4

NAME

6       DTGEX2  -  swaps  adjacent diagonal blocks (A11, B11) and (A22, B22) of
7       size 1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair (A, B)
8       by an orthogonal equivalence transformation
9

SYNOPSIS

11       SUBROUTINE DTGEX2( WANTQ, WANTZ, N, A, LDA, B, LDB, Q, LDQ, Z, LDZ, J1,
12                          N1, N2, WORK, LWORK, INFO )
13
14           LOGICAL        WANTQ, WANTZ
15
16           INTEGER        INFO, J1, LDA, LDB, LDQ, LDZ, LWORK, N, N1, N2
17
18           DOUBLE         PRECISION A( LDA, * ), B( LDB, * ),  Q(  LDQ,  *  ),
19                          WORK( * ), Z( LDZ, * )
20

PURPOSE

22       DTGEX2 swaps adjacent diagonal blocks (A11, B11) and (A22, B22) of size
23       1-by-1 or 2-by-2 in an upper (quasi) triangular matrix pair (A,  B)  by
24       an  orthogonal  equivalence transformation.  (A, B) must be in general‐
25       ized real Schur canonical form (as returned by DGGES), i.e. A is  block
26       upper  triangular  with  1-by-1  and 2-by-2 diagonal blocks. B is upper
27       triangular.
28       Optionally, the matrices Q and  Z  of  generalized  Schur  vectors  are
29       updated.
30              Q(in) * A(in) * Z(in)' = Q(out) * A(out) * Z(out)'
31              Q(in) * B(in) * Z(in)' = Q(out) * B(out) * Z(out)'
32

ARGUMENTS

34       WANTQ    (input) LOGICAL .TRUE. : update the left transformation matrix
35       Q;
36
37       WANTZ   (input) LOGICAL
38
39       N       (input) INTEGER
40               The order of the matrices A and B. N >= 0.
41
42       A      (input/output) DOUBLE PRECISION arrays, dimensions (LDA,N)
43              On entry, the matrix A in the pair (A, B).  On exit, the updated
44              matrix A.
45
46       LDA     (input)  INTEGER
47               The leading dimension of the array A. LDA >= max(1,N).
48
49       B      (input/output) DOUBLE PRECISION arrays, dimensions (LDB,N)
50              On entry, the matrix B in the pair (A, B).  On exit, the updated
51              matrix B.
52
53       LDB     (input)  INTEGER
54               The leading dimension of the array B. LDB >= max(1,N).
55
56       Q       (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
57               On entry, if WANTQ = .TRUE., the orthogonal matrix Q.  On exit,
58               the updated matrix Q.  Not referenced if WANTQ = .FALSE..
59
60       LDQ     (input) INTEGER
61               The  leading  dimension  of  the array Q. LDQ >= 1.  If WANTQ =
62               .TRUE., LDQ >= N.
63
64       Z       (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
65               On entry, if WANTZ =.TRUE., the orthogonal matrix Z.  On  exit,
66               the updated matrix Z.  Not referenced if WANTZ = .FALSE..
67
68       LDZ     (input) INTEGER
69               The  leading  dimension  of  the array Z. LDZ >= 1.  If WANTZ =
70               .TRUE., LDZ >= N.
71
72       J1      (input) INTEGER
73               The index to the first block (A11, B11). 1 <= J1 <= N.
74
75       N1      (input) INTEGER
76               The order of the first block (A11, B11). N1 = 0, 1 or 2.
77
78       N2      (input) INTEGER
79               The order of the second block (A22, B22). N2 = 0, 1 or 2.
80
81       WORK    (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK)).
82
83       LWORK   (input) INTEGER
84               The dimension of the array WORK.  LWORK >=  MAX( 1,  N*(N2+N1),
85               (N2+N1)*(N2+N1)*2 )
86
87       INFO    (output) INTEGER
88               =0: Successful exit
89               >0: If INFO = 1, the transformed matrix (A, B) would be too far
90               from generalized Schur form; the blocks are not swapped and (A,
91               B)  and  (Q,  Z) are unchanged.  The problem of swapping is too
92               ill-conditioned.  <0: If INFO = -16: LWORK is too small. Appro‐
93               priate value for LWORK is returned in WORK(1).
94

FURTHER DETAILS

96       Based on contributions by
97          Bo Kagstrom and Peter Poromaa, Department of Computing Science,
98          Umea University, S-901 87 Umea, Sweden.
99       In the current code both weak and strong stability tests are performed.
100       The user can omit the strong stability test by  changing  the  internal
101       logical parameter WANDS to .FALSE.. See ref. [2] for details.
102       [1] B. Kagstrom; A Direct Method for Reordering Eigenvalues in the
103           Generalized Real Schur Form of a Regular Matrix Pair (A, B), in
104           M.S. Moonen et al (eds), Linear Algebra for Large Scale and
105           Real-Time  Applications,  Kluwer  Academic  Publ. 1993, pp 195-218.
106       [2] B. Kagstrom and P. Poromaa; Computing Eigenspaces with Specified
107           Eigenvalues of a Regular Matrix Pair (A, B) and Condition
108           Estimation: Theory, Algorithms and Software,
109           Report UMINF - 94.04, Department of Computing Science, Umea
110           University, S-901 87 Umea, Sweden, 1994. Also as LAPACK Working
111           Note 87. To appear in Numerical Algorithms, 1996.
112
113
114
115 LAPACK auxiliary routine (versionNo3v.e2m)ber 2008                       DTGEX2(1)
Impressum