LFTQH

Computes the RH R factorization of a complex Hermitian positive definite matrix in band Hermitian storage mode.

Required Arguments

A — Complex NCODA + 1 by N array containing the N by N positive definite band Hermitian matrix to be factored in band Hermitian storage mode. (Input)

NCODA — Number of upper or lower codiagonals of A. (Input)

FACT — Complex NCODA + 1 by N array containing the RH R factorization of the matrix A. (Output)
If A is 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 LFTQH (A, NCODA, FACT [, ])

Specific: The specific interface names are S_LFTQH and D_LFTQH.

FORTRAN 77 Interface

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

Double: The double precision name is DLFTQH.

Description

Routine LFTQH computes an RHR Cholesky factorization of a complex Hermitian positive definite band coefficient matrix. R is an upper triangular band matrix.

LFTQH fails if any submatrix of R is not positive definite or if R has a zero diagonal element. These errors occur only if A either is very close to a singular matrix or is a matrix which is not positive definite.

The RH R factors are returned in a form that is compatible with routines LFIQH, LFSQH and LFDQH. To solve systems of equations with multiple right-hand-side vectors, use LFTQH followed by either LFIQH or LFSQH called once for each right-hand side. The routine LFDQH can be called to compute the determinant of the coefficient matrix after LFTQH has performed the factorization.

LFTQH is based on the LINPACK routine SPBFA; see Dongarra et al. (1979).

Comments

Informational errors

 

Type

Code

Description

3

4

The input matrix is not Hermitian. It has a diagonal entry with a small imaginary part.

4

2

The input matrix is not positive definite.

4

4

The input matrix is not Hermitian. It has a diagonal entry with an imaginary part.

Example

The inverse of a 5 × 5 band Hermitian matrix with one codiagonal is computed. LFTQH is called to factor the matrix and to check for nonpositive definiteness. LFSQH is called to determine the columns of the inverse.

 

USE LFTQH_INT

USE LFSQH_INT

USE WRCRN_INT

! Declare variables

INTEGER LDA, LDFACT, N, NCODA

PARAMETER (LDA=2, LDFACT=2, N=5, NCODA=1)

COMPLEX A(LDA,N), AINV(N,N), FACT(LDFACT,N), RJ(N)

!

! Set values for A in band Hermitian form

!

! A = ( 0.0+0.0i -1.0+1.0i 1.0+2.0i 0.0+4.0i 1.0+1.0i )

! ( 2.0+0.0i 4.0+0.0i 10.0+0.0i 6.0+0.0i 9.0+0.0i )

!

DATA A/(0.0,0.0), (2.0,0.0), (-1.0,1.0), (4.0, 0.0), (1.0,2.0),&

(10.0,0.0), (0.0,4.0), (6.0,0.0), (1.0,1.0), (9.0,0.0)/

! Factor the matrix A

CALL LFTQH (A, NCODA, FACT)

! Set up the columns of the identity

! matrix one at a time in RJ

RJ = (0.0E0,0.0E0)

DO 10 J=1, N

RJ(J) = (1.0E0,0.0E0)

! RJ is the J-th column of the identity

! matrix so the following LFSQH

! reference places the J-th column of

! the inverse of A in the J-th column

! of AINV

CALL LFSQH (FACT, NCODA, RJ, AINV(:,J))

RJ(J) = (0.0E0,0.0E0)

10 CONTINUE

! Print the results

CALL WRCRN (’AINV’, AINV)

!

END

Output

 

AINV

1 2 3 4

1 ( 0.7166, 0.0000) ( 0.2166,-0.2166) (-0.0899,-0.0300) (-0.0207, 0.0622)

2 ( 0.2166, 0.2166) ( 0.4332, 0.0000) (-0.0599,-0.1198) (-0.0829, 0.0415)

3 (-0.0899, 0.0300) (-0.0599, 0.1198) ( 0.1797, 0.0000) ( 0.0000,-0.1244)

4 (-0.0207,-0.0622) (-0.0829,-0.0415) ( 0.0000, 0.1244) ( 0.2592, 0.0000)

5 ( 0.0092, 0.0046) ( 0.0138,-0.0046) (-0.0138,-0.0138) (-0.0288, 0.0288)

5

1 ( 0.0092,-0.0046)

2 ( 0.0138, 0.0046)

3 (-0.0138, 0.0138)

4 (-0.0288,-0.0288)

5 ( 0.1175, 0.0000)