LFTQS

Computes the RTR Cholesky factorization of a real symmetric positive definite matrix in band symmetric storage mode.

Required Arguments

ANCODA + 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)

FACTNCODA + 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.

Optional Arguments

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).

FORTRAN 90 Interface

Generic: CALL LFTQS (A, NCODA, FACT [, …])

Specific: The specific interface names are S_LFTQS and D_LFTQS.

FORTRAN 77 Interface

Single: CALL LFTQS (N, A, LDA, NCODA, FACT, LDFACT)

Double: The double precision name is DLFTQS.

Description

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).

Comments

Informational error

 

Type

Code

Description

4

2

The input matrix is not positive definite.

Example

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

Output

 

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