LFIQH
Uses iterative refinement to improve the solution of a complex Hermitian positive definite system of linear equations in band Hermitian storage mode.
Required Arguments
A — Complex NCODA + 1 by N array containing the N by N positive definite band Hermitian coefficient matrix 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 as output from routine LFCQH/DLFCQH or LFTQH/DLFTQH. (Input)
B — Complex vector of length N containing the right-hand side of the linear system. (Input)
X — Complex vector of length N containing the solution to the linear system. (Output)
RES — Complex vector of length N containing the residual vector at the improved solution. (Output)
Optional Arguments
N — Number of equations. (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 LFIQH (A, NCODA, FACT, B, X, RES [, ])
Specific: The specific interface names are S_LFIQH and D_LFIQH.
FORTRAN 77 Interface
Single: CALL LFIQH (N, A, LDA, NCODA, FACT, LDFACT, B, X, RES)
Double: The double precision name is DLFIQH.
Description
Routine LFIQH computes the solution for a system of linear algebraic equations having a complex Hermitian positive definite band coefficient matrix. To compute the solution, the coefficient matrix must first undergo an RH R factorization. This may be done by calling either IMSL routine LFCQH or LFTQH. R is an upper triangular band matrix.
The solution to Ax = b is found by solving the triangular systems RH y = b and Rx = y.
LFSQH and LFIQH both solve a linear system given its RH R factorization. LFIQH generally takes more time and produces a more accurate answer than LFSQH. Each iteration of the iterative refinement algorithm used by LFIQH calls LFSQH.
Comments
Informational error
Type
Code
Description
4
1
The factored matrix has a diagonal element close to zero.
Example
A set of linear systems is solved successively. The right-hand side vector is perturbed after solving the system each of the fisrt two times by adding (1 + i)/2 to the second element.
 
USE IMSL_LIBRARIES
! Declare variables
INTEGER LDA, LDFACT, N, NCODA
PARAMETER (LDA=2, LDFACT=2, N=5, NCODA=1)
REAL RCOND
COMPLEX A(LDA,N), B(N), FACT(LDFACT,N), RES(N,3), X(N,3)
!
! Set values for A in band Hermitian form, and B
!
! 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 )
!
! B = ( 3.0+3.0i 5.0-5.0i 5.0+4.0i 9.0+7.0i -22.0+1.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)/
DATA B/(3.0,3.0), (5.0,-5.0), (5.0,4.0), (9.0,7.0), (-22.0,1.0)/
! Factor the matrix A
CALL LFCQH (A, NCODA, FACT, RCOND=RCOND)
! Print the estimated condition number
CALL UMACH (2, NOUT)
WRITE (NOUT, 99999) RCOND, 1.0E0/RCOND
! Compute the solutions
DO 10 I=1, 3
CALL LFIQH (A, NCODA, FACT, B, X(:,I), RES(:,I))
B(2) = B(2) + (0.5E0, 0.5E0)
10 CONTINUE
! Print solutions
CALL WRCRN ('X', X)
CALL WRCRN ('RES', RES)
99999 FORMAT (' RCOND = ', F5.3, /, ' L1 Condition number = ', F6.3)
END
Output
 
X
1 2 3
1 ( 1.00, 0.00) ( 3.00, -1.00) ( 11.00, -1.00)
2 ( 1.00, -2.00) ( 2.00, 0.00) ( -7.00, 0.00)
3 ( 2.00, 0.00) ( -1.00, -6.00) ( -2.00, -3.00)
4 ( 2.00, 3.00) ( 2.00, 1.00) ( -2.00, -3.00)
5 ( -3.00, 0.00) ( 0.00, 0.00) ( -2.00, -3.00)