Computes the RTR Cholesky factorization of a real symmetric positive definite matrix in band symmetric storage mode.
A — NCODA + 1 by N array containing the N by N positive definite band coefficient matrix in band symmetric storage mode to be factored. (Input)
NCODA — Number of upper codiagonals of A. (Input)
FACT — NCODA + 1 by N array containing the
RT
R factorization of the matrix A.
(Output)
If A s not needed, A and FACT can share the
same storage locations.
N — Order of the matrix.
(Input)
Default: N = size (A,2).
LDA — Leading dimension of A exactly as specified
in the dimension statement of the calling program.
(Input)
Default: LDA = size (A,1).
LDFACT — Leading dimension of FACT exactly as
specified in the dimension statement of the calling program.
(Input)
Default: LDFACT = size (FACT,1).
Generic: CALL LFTQS (A, NCODA, FACT [,…])
Specific: The specific interface names are S_LFTQS and D_LFTQS.
Single: CALL LFTQS (N, A, LDA, NCODA, FACT, LDFACT)
Double: The double precision name is DLFTQS.
Routine LFTQS computes an RT R Cholesky factorization of a real symmetric positive definite band coefficient matrix. R is an upper triangular band matrix.
LFTQS fails if any submatrix of R is not positive definite or if R has a zero diagonal element. These errors occur only if A is very close to a singular matrix or to a matrix which is not positive definite.
The RT R factors are returned in a form that is compatible with routines LFIQS, LFSQS and LFDQS. To solve systems of equations with multiple right hand-side vectors, use LFTQS followed by either LFIQS or LFSQS called once for each right-hand side. The routine LFDQS can be called to compute the determinant of the coefficient matrix after LFTQS has performed the factorization.
LFTQS is based on the LINPACK routine CPBFA; see Dongarra et al. (1979).
Informational error
Type Code
4 2 The input matrix is not positive definite.
The inverse of a 3 × 3 matrix is computed. LFTQS is called to factor the matrix and to check for nonpositive definiteness. LFSQS is called to determine the columns of the inverse.
USE
LFTQS_INT
USE
WRRRN_INT
USE
LFSQS_INT
!
Declare variables
INTEGER LDA, LDFACT, N, NCODA
PARAMETER (LDA=2, LDFACT=2, N=4, NCODA=1)
REAL A(LDA,N), AINV(N,N), FACT(LDFACT,N), RJ(N)
!
! Set values for A in band symmetric form
!
! A = ( 0.0 1.0 1.0 1.0 )
! ( 2.0 2.5 2.5 2.0 )
!
DATA A/0.0, 2.0, 1.0, 2.5, 1.0, 2.5, 1.0, 2.0/
! Factor the matrix A
CALL LFTQS (A, NCODA, FACT)
! Set up the columns of the identity
! matrix one at a time in RJ
RJ = 0.0E0
DO 10 J=1, N
RJ(J) = 1.0E0
! RJ is the J-th column of the identity
! matrix so the following LFSQS
! reference places the J-th column of
! the inverse of A in the J-th column
! of AINV
CALL LFSQS (FACT, NCODA, RJ, AINV(:,J))
RJ(J) = 0.0E0
10 CONTINUE
! Print the results
CALL WRRRN ('AINV', AINV, ITRING=1)
END
AINV
1
2
3 4
1 0.6667
-0.3333 0.1667
-0.0833
2
0.6667 -0.3333
0.1667
3
0.6667
-0.3333
4
0.6667
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |