LSAQH
Solves a complex Hermitian positive definite system of linear equations in band Hermitian storage mode with iterative refinement.
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)
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)
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).
FORTRAN 90 Interface
Generic: CALL LSAQH (A, NCODA, B, X [])
Specific: The specific interface names are S_LSAQH and D_LSAQH.
FORTRAN 77 Interface
Single: CALL LSAQH (N, A, LDA, NCODA, B, X)
Double: The double precision name is DLSAQH.
Description
Routine LSAQH solves a system of linear algebraic equations having a complex Hermitian positive definite band coefficient matrix. It first uses the IMSL routine LFCQH to compute an RH R Cholesky factorization of the coefficient matrix and to estimate the condition number of the matrix. R is an upper triangular band matrix. The solution of the linear system is then found using the iterative refinement IMSL routine LFIQH.
LSAQH fails if any submatrix of R is not positive definite, if R has a zero diagonal element, or if the iterative refinement agorithm fails to converge. These errors occur only if the matrix A either is very close to a singular matrix or is a matrix that is not positive definite.
If the estimated condition number is greater than 1/ɛ (where ɛ is machine precision), a warning error is issued. This indicates that very small changes in A can cause very large changes in the solution x. Iterative refinement can sometimes find the solution to such a system. LSAQH solves the problem that is represented in the computer; however, this problem may differ from the problem whose solution is desired.
Comments
1. Workspace may be explicitly provided, if desired, by use of L2AQH/DL2AQH The reference is:
CALL L2AQH (N, A, LDA, NCODA, B, X, FACT, WK)
The additional arguments are as follows:
FACT — Complex work vector of length (NCODA + 1) * N containing the RH R factorization of A in band Hermitian storage form on output.
WK — Complex work vector of length N.
2. Informational errors
Type
Code
Description
3
3
The input matrix is too ill-conditioned. The solution might not be accurate.
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.
3. Integer Options with Chapter 11 Options Manager
16 This option uses four values to solve memory bank conflict (access inefficiency) problems. In routine L2AQH the leading dimension of FACT is increased by IVAL(3) when N is a multiple of IVAL(4). The values IVAL(3) and IVAL(4) are temporarily replaced by IVAL(1) and IVAL(2), respectively, in LSAQH. Additional memory allocation for FACT and option value restoration are done automatically in LSAQH. Users directly calling L2AQH can allocate additional space for FACT and set IVAL(3) and IVAL(4) so that memory bank conflicts no longer cause inefficiencies. There is no requirement that users change existing applications that use LSAQH or L2AQH. Default values for the option are IVAL(*) = 1, 16, 0, 1.
17 This option has two values that determine if the L1 condition number is to be computed. Routine LSAQH temporarily replaces IVAL(2) by IVAL(1). The routine L2CQH computes the condition number if IVAL(2) = 2. Otherwise L2CQH skips this computation. LSAQH restores the option. Default values for the option are IVAL(*) = 1, 2.
Example
A system of five linear equations is solved. The coefficient matrix has complex Hermitian positive definite band form with one codiagonal and the right-hand-side vector b has five elements.
 
USE LSAQH_INT
USE WRCRN_INT
! Declare variables
INTEGER LDA, N, NCODA
PARAMETER (LDA=2, N=5, NCODA=1)
COMPLEX A(LDA,N), B(N), X(N)
!
! 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 = ( 1.0+5.0i 12.0-6.0i 1.0-16.0i -3.0-3.0i 25.0+16.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/(1.0,5.0), (12.0,-6.0), (1.0,-16.0), (-3.0,-3.0),&
(25.0,16.0)/
! Solve A*X = B
CALL LSAQH (A, NCODA, B, X)
! Print results
CALL WRCRN (’X’, X, 1, N, 1)
!
END
Output
 
X
1 2 3 4
( 2.000, 1.000) ( 3.000, 0.000) (-1.000,-1.000) ( 0.000,-2.000)
5
( 3.000, 2.000)
Published date: 03/19/2020
Last modified date: 03/19/2020