1ZGTSVX(1) LAPACK routine (version 3.2) ZGTSVX(1)
2
3
4
6 ZGTSVX - uses the LU factorization to compute the solution to a complex
7 system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
8
10 SUBROUTINE ZGTSVX( FACT, TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2,
11 IPIV, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
12 RWORK, INFO )
13
14 CHARACTER FACT, TRANS
15
16 INTEGER INFO, LDB, LDX, N, NRHS
17
18 DOUBLE PRECISION RCOND
19
20 INTEGER IPIV( * )
21
22 DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
23
24 COMPLEX*16 B( LDB, * ), D( * ), DF( * ), DL( * ), DLF( * ), DU(
25 * ), DU2( * ), DUF( * ), WORK( * ), X( LDX, * )
26
28 ZGTSVX uses the LU factorization to compute the solution to a complex
29 system of linear equations A * X = B, A**T * X = B, or A**H * X = B,
30 where A is a tridiagonal matrix of order N and X and B are N-by-NRHS
31 matrices.
32 Error bounds on the solution and a condition estimate are also pro‐
33 vided.
34
36 The following steps are performed:
37 1. If FACT = 'N', the LU decomposition is used to factor the matrix A
38 as A = L * U, where L is a product of permutation and unit lower
39 bidiagonal matrices and U is upper triangular with nonzeros in
40 only the main diagonal and first two superdiagonals.
41 2. If some U(i,i)=0, so that U is exactly singular, then the routine
42 returns with INFO = i. Otherwise, the factored form of A is used
43 to estimate the condition number of the matrix A. If the
44 reciprocal of the condition number is less than machine precision,
45 INFO = N+1 is returned as a warning, but the routine still goes on
46 to solve for X and compute error bounds as described below. 3. The
47 system of equations is solved for X using the factored form
48 of A.
49 4. Iterative refinement is applied to improve the computed solution
50 matrix and calculate error bounds and backward error estimates
51 for it.
52
54 FACT (input) CHARACTER*1
55 Specifies whether or not the factored form of A has been sup‐
56 plied on entry. = 'F': DLF, DF, DUF, DU2, and IPIV contain
57 the factored form of A; DL, D, DU, DLF, DF, DUF, DU2 and IPIV
58 will not be modified. = 'N': The matrix will be copied to
59 DLF, DF, and DUF and factored.
60
61 TRANS (input) CHARACTER*1
62 Specifies the form of the system of equations:
63 = 'N': A * X = B (No transpose)
64 = 'T': A**T * X = B (Transpose)
65 = 'C': A**H * X = B (Conjugate transpose)
66
67 N (input) INTEGER
68 The order of the matrix A. N >= 0.
69
70 NRHS (input) INTEGER
71 The number of right hand sides, i.e., the number of columns of
72 the matrix B. NRHS >= 0.
73
74 DL (input) COMPLEX*16 array, dimension (N-1)
75 The (n-1) subdiagonal elements of A.
76
77 D (input) COMPLEX*16 array, dimension (N)
78 The n diagonal elements of A.
79
80 DU (input) COMPLEX*16 array, dimension (N-1)
81 The (n-1) superdiagonal elements of A.
82
83 DLF (input or output) COMPLEX*16 array, dimension (N-1)
84 If FACT = 'F', then DLF is an input argument and on entry con‐
85 tains the (n-1) multipliers that define the matrix L from the
86 LU factorization of A as computed by ZGTTRF. If FACT = 'N',
87 then DLF is an output argument and on exit contains the (n-1)
88 multipliers that define the matrix L from the LU factorization
89 of A.
90
91 DF (input or output) COMPLEX*16 array, dimension (N)
92 If FACT = 'F', then DF is an input argument and on entry con‐
93 tains the n diagonal elements of the upper triangular matrix U
94 from the LU factorization of A. If FACT = 'N', then DF is an
95 output argument and on exit contains the n diagonal elements of
96 the upper triangular matrix U from the LU factorization of A.
97
98 DUF (input or output) COMPLEX*16 array, dimension (N-1)
99 If FACT = 'F', then DUF is an input argument and on entry con‐
100 tains the (n-1) elements of the first superdiagonal of U. If
101 FACT = 'N', then DUF is an output argument and on exit contains
102 the (n-1) elements of the first superdiagonal of U.
103
104 DU2 (input or output) COMPLEX*16 array, dimension (N-2)
105 If FACT = 'F', then DU2 is an input argument and on entry con‐
106 tains the (n-2) elements of the second superdiagonal of U. If
107 FACT = 'N', then DU2 is an output argument and on exit contains
108 the (n-2) elements of the second superdiagonal of U.
109
110 IPIV (input or output) INTEGER array, dimension (N)
111 If FACT = 'F', then IPIV is an input argument and on entry con‐
112 tains the pivot indices from the LU factorization of A as com‐
113 puted by ZGTTRF. If FACT = 'N', then IPIV is an output argu‐
114 ment and on exit contains the pivot indices from the LU factor‐
115 ization of A; row i of the matrix was interchanged with row
116 IPIV(i). IPIV(i) will always be either i or i+1; IPIV(i) = i
117 indicates a row interchange was not required.
118
119 B (input) COMPLEX*16 array, dimension (LDB,NRHS)
120 The N-by-NRHS right hand side matrix B.
121
122 LDB (input) INTEGER
123 The leading dimension of the array B. LDB >= max(1,N).
124
125 X (output) COMPLEX*16 array, dimension (LDX,NRHS)
126 If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
127
128 LDX (input) INTEGER
129 The leading dimension of the array X. LDX >= max(1,N).
130
131 RCOND (output) DOUBLE PRECISION
132 The estimate of the reciprocal condition number of the matrix
133 A. If RCOND is less than the machine precision (in particular,
134 if RCOND = 0), the matrix is singular to working precision.
135 This condition is indicated by a return code of INFO > 0.
136
137 FERR (output) DOUBLE PRECISION array, dimension (NRHS)
138 The estimated forward error bound for each solution vector X(j)
139 (the j-th column of the solution matrix X). If XTRUE is the
140 true solution corresponding to X(j), FERR(j) is an estimated
141 upper bound for the magnitude of the largest element in (X(j) -
142 XTRUE) divided by the magnitude of the largest element in X(j).
143 The estimate is as reliable as the estimate for RCOND, and is
144 almost always a slight overestimate of the true error.
145
146 BERR (output) DOUBLE PRECISION array, dimension (NRHS)
147 The componentwise relative backward error of each solution vec‐
148 tor X(j) (i.e., the smallest relative change in any element of
149 A or B that makes X(j) an exact solution).
150
151 WORK (workspace) COMPLEX*16 array, dimension (2*N)
152
153 RWORK (workspace) DOUBLE PRECISION array, dimension (N)
154
155 INFO (output) INTEGER
156 = 0: successful exit
157 < 0: if INFO = -i, the i-th argument had an illegal value
158 > 0: if INFO = i, and i is
159 <= N: U(i,i) is exactly zero. The factorization has not been
160 completed unless i = N, but the factor U is exactly singular,
161 so the solution and error bounds could not be computed. RCOND
162 = 0 is returned. = N+1: U is nonsingular, but RCOND is less
163 than machine precision, meaning that the matrix is singular to
164 working precision. Nevertheless, the solution and error bounds
165 are computed because there are a number of situations where the
166 computed solution can be more accurate than the value of RCOND
167 would suggest.
168
169
170
171 LAPACK routine (version 3.2) November 2008 ZGTSVX(1)