1DPTSVX(1) LAPACK routine (version 3.2) DPTSVX(1)
2
3
4
6 DPTSVX - uses the factorization A = L*D*L**T to compute the solution to
7 a real system of linear equations A*X = B, where A is an N-by-N symmet‐
8 ric positive definite tridiagonal matrix and X and B are N-by-NRHS
9 matrices
10
12 SUBROUTINE DPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX, RCOND,
13 FERR, BERR, WORK, INFO )
14
15 CHARACTER FACT
16
17 INTEGER INFO, LDB, LDX, N, NRHS
18
19 DOUBLE PRECISION RCOND
20
21 DOUBLE PRECISION B( LDB, * ), BERR( * ), D( * ), DF( * ),
22 E( * ), EF( * ), FERR( * ), WORK( * ), X( LDX, * )
23
25 DPTSVX uses the factorization A = L*D*L**T to compute the solution to a
26 real system of linear equations A*X = B, where A is an N-by-N symmetric
27 positive definite tridiagonal matrix and X and B are N-by-NRHS matri‐
28 ces. Error bounds on the solution and a condition estimate are also
29 provided.
30
32 The following steps are performed:
33 1. If FACT = 'N', the matrix A is factored as A = L*D*L**T, where L
34 is a unit lower bidiagonal matrix and D is diagonal. The
35 factorization can also be regarded as having the form
36 A = U**T*D*U.
37 2. If the leading i-by-i principal minor is not positive definite,
38 then the routine returns with INFO = i. Otherwise, the factored
39 form of A is used to estimate the condition number of the matrix
40 A. If the reciprocal of the condition number is less than machine
41 precision, INFO = N+1 is returned as a warning, but the routine
42 still goes on to solve for X and compute error bounds as
43 described below.
44 3. The system of equations is solved for X using the factored form
45 of A.
46 4. Iterative refinement is applied to improve the computed solution
47 matrix and calculate error bounds and backward error estimates
48 for it.
49
51 FACT (input) CHARACTER*1
52 Specifies whether or not the factored form of A has been sup‐
53 plied on entry. = 'F': On entry, DF and EF contain the fac‐
54 tored form of A. D, E, DF, and EF will not be modified. =
55 'N': The matrix A will be copied to DF and EF and factored.
56
57 N (input) INTEGER
58 The order of the matrix A. N >= 0.
59
60 NRHS (input) INTEGER
61 The number of right hand sides, i.e., the number of columns of
62 the matrices B and X. NRHS >= 0.
63
64 D (input) DOUBLE PRECISION array, dimension (N)
65 The n diagonal elements of the tridiagonal matrix A.
66
67 E (input) DOUBLE PRECISION array, dimension (N-1)
68 The (n-1) subdiagonal elements of the tridiagonal matrix A.
69
70 DF (input or output) DOUBLE PRECISION array, dimension (N)
71 If FACT = 'F', then DF is an input argument and on entry con‐
72 tains the n diagonal elements of the diagonal matrix D from the
73 L*D*L**T factorization of A. If FACT = 'N', then DF is an out‐
74 put argument and on exit contains the n diagonal elements of
75 the diagonal matrix D from the L*D*L**T factorization of A.
76
77 EF (input or output) DOUBLE PRECISION array, dimension (N-1)
78 If FACT = 'F', then EF is an input argument and on entry con‐
79 tains the (n-1) subdiagonal elements of the unit bidiagonal
80 factor L from the L*D*L**T factorization of A. If FACT = 'N',
81 then EF is an output argument and on exit contains the (n-1)
82 subdiagonal elements of the unit bidiagonal factor L from the
83 L*D*L**T factorization of A.
84
85 B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
86 The N-by-NRHS right hand side matrix B.
87
88 LDB (input) INTEGER
89 The leading dimension of the array B. LDB >= max(1,N).
90
91 X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)
92 If INFO = 0 of INFO = N+1, the N-by-NRHS solution matrix X.
93
94 LDX (input) INTEGER
95 The leading dimension of the array X. LDX >= max(1,N).
96
97 RCOND (output) DOUBLE PRECISION
98 The reciprocal condition number of the matrix A. If RCOND is
99 less than the machine precision (in particular, if RCOND = 0),
100 the matrix is singular to working precision. This condition is
101 indicated by a return code of INFO > 0.
102
103 FERR (output) DOUBLE PRECISION array, dimension (NRHS)
104 The forward error bound for each solution vector X(j) (the j-th
105 column of the solution matrix X). If XTRUE is the true solu‐
106 tion corresponding to X(j), FERR(j) is an estimated upper bound
107 for the magnitude of the largest element in (X(j) - XTRUE)
108 divided by the magnitude of the largest element in X(j).
109
110 BERR (output) DOUBLE PRECISION array, dimension (NRHS)
111 The componentwise relative backward error of each solution vec‐
112 tor X(j) (i.e., the smallest relative change in any element of
113 A or B that makes X(j) an exact solution).
114
115 WORK (workspace) DOUBLE PRECISION array, dimension (2*N)
116
117 INFO (output) INTEGER
118 = 0: successful exit
119 < 0: if INFO = -i, the i-th argument had an illegal value
120 > 0: if INFO = i, and i is
121 <= N: the leading minor of order i of A is not positive defi‐
122 nite, so the factorization could not be completed, and the
123 solution has not been computed. RCOND = 0 is returned. = N+1:
124 U is nonsingular, but RCOND is less than machine precision,
125 meaning that the matrix is singular to working precision. Nev‐
126 ertheless, the solution and error bounds are computed because
127 there are a number of situations where the computed solution
128 can be more accurate than the value of RCOND would suggest.
129
130
131
132 LAPACK routine (version 3.2) November 2008 DPTSVX(1)