|
|
| |
| # lines: |
112 | | # code: |
112 | | # comment: | 0 | |
# blank: | 0 |
| # Variables: | 7 |
| # Callers: | 0 |
| # Callings: | 0 |
| # Words: | 44 |
| # Keywords: | 34 |
|
|
|
|
|
..
.. Array Arguments ..
..
Purpose
=======
CDTTRF computes an LU factorization of a complex tridiagonal matrix A
using elimination without partial pivoting.
The factorization has the form
A = L * U
where L is a product of unit lower bidiagonal
matrices and U is upper triangular with nonzeros in only the main
diagonal and first superdiagonal.
Arguments
=========
N (input) INTEGER
The order of the matrix A. N >= 0.
DL (input/output) COMPLEX array, dimension (N-1)
On entry, DL must contain the (n-1) subdiagonal elements of
A.
On exit, DL is overwritten by the (n-1) multipliers that
define the matrix L from the LU factorization of A.
D (input/output) COMPLEX array, dimension (N)
On entry, D must contain the diagonal elements of A.
On exit, D is overwritten by the n diagonal elements of the
upper triangular matrix U from the LU factorization of A.
DU (input/output) COMPLEX array, dimension (N-1)
On entry, DU must contain the (n-1) superdiagonal elements
of A.
On exit, DU is overwritten by the (n-1) elements of the first
superdiagonal of U.
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, U(i,i) is exactly zero. The factorization
has been completed, but the factor U is exactly
singular, and division by zero will occur if it is used
to solve a system of equations.
=====================================================================
.. Local Scalars ..
|
|
|
|
01 SUBROUTINE CDTTRF( N , DL , D , DU , INFO )
02
03 * Written by Andrew J. Cleary , November 1996.
04 * Modified from CGTTRF :
05 * -- LAPACK routine(preliminary version) --
06 * Univ. of Tennessee , Univ. of California Berkeley , NAG Ltd. ,
07 * Courant Institute , Argonne National Lab , and Rice University
08
09 * .. Scalar Arguments ..
10 INTEGER INFO , N
11 INTEGER I
12 COMPLEX FACT
13 * ..
14 * .. Intrinsic Functions ..
15 INTRINSIC ABS
16 * ..
17 * .. External Subroutines ..
18 EXTERNAL XERBLA
19 * ..
20 * .. Parameters ..
21 COMPLEX CZERO
22 PARAMETER( CZERO =( 0.0E + 0 , 0.0E + 0 ) )
23 * ..
24 * .. Executable Statements ..
25
26 INFO = 0
27 IF( N.LT.0 ) THEN
27
28 INFO = - 1
29 CALL XERBLA( 'CDTTRF' , - INFO )
30 RETURN
31 END IF
32
33 * Quick return if possible
34
35 IF( N.EQ.0 )
35
36 $ RETURN
37
38 DO 20 I = 1 , N - 1
38
39 IF( DL( I ).EQ.CZERO ) THEN
40
41 * Subdiagonal is zero , no elimination is required.
42
42
43 IF( D( I ).EQ.CZERO .AND. INFO.EQ.0 )
43
44 $ INFO = I
45 ELSE
46
46
47 FACT = DL( I ) / D( I )
48 DL( I ) = FACT
49 D( I + 1 ) = D( I + 1 ) - FACT*DU( I )
50 END IF
51 20 CONTINUE
51
52 IF( D( N ).EQ.CZERO .AND. INFO.EQ.0 ) THEN
52
53 INFO = N
54 RETURN
55 END IF
56
57 RETURN
58
59 * End of CDTTRF
60
61 END12
8
|
|
Variables in Routine CDTTRF()
| Summary Report |
| Data Type | Quantity | Size(byte) |
| COMPLEX | 2 | 8 |
| INTEGER | 3 | 12 |
| REAL | 2 | 8 |
| TOTAL | 7 | 28 |
List of Variables
COMPLEX
INTEGER
REAL
Variables Dependence Graph Put the mouse over a right hand side variable to display the corresponding line of the dependence | | - | | - | - | | D | <--- | DD( I+1 ) = D( I+1 ) - FACT*DU( I ), FACTD( I+1 ) = D( I+1 ) - FACT*DU( I ), ID( I+1 ) = D( I+1 ) - FACT*DU( I ) |
| DL | <--- | FACTDL( I ) = FACT |
| FACT | <--- | DFACT = DL( I ) / D( I ), DLFACT = DL( I ) / D( I ), IFACT = DL( I ) / D( I ) |
| I | <--- | NDO 20 I = 1, N - 1 |
| INFO | <--- | NINFO = N |
|
|
Analysis elements of the routine CDTTRF() Put the mouse over each element to display detailed matching information
Assigned variables |
| | | CZERO , FACT , I , INFO |
|
Active variables |
| | | CZERO , D , DL , DU , FACT , I , INFO , N |
|
Accessed arrays [ array name : associated index ] |
| | D | : I , I , I+1 , N |
| | DL | : I , I , I |
| | DU | : I |
|
Conditional statements [ statement : associated predicate ] |
| | do | : ( 20 I = 1 , N - 1 ) |
| | if | : ( N.LT.0 ) , ( possible ) , ( N.EQ.0 ) , ( (DL( I ).EQ.CZERO ) ) , ( (D( I ).EQ.CZERO .AND. INFO.EQ.0 ) ) , ( (D( N ).EQ.CZERO .AND. INFO.EQ.0 ) ) |
|
| List of variables | CZERO D DL FACT I INFO N | | close
| |
CZERO
D
DL
FACT
I
INFO
N
| |