LSLCB
Solves a complex system of linear equations in band storage mode without iterative refinement.
Required Arguments
A — Complex NLCA + NUCA + 1 by N array containing the N by N banded coefficient matrix in band storage mode. (Input)
NLCA — Number of lower codiagonals of A. (Input)
NUCA — Number of upper 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)
If B is not needed, then B and X may share the same storage locations)
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).
IPATH — Path indicator. (Input)
IPATH = 1 means the system AX = B is solved.
IPATH = 2 means the system AHX = B is solved.
Default: IPATH = 1.
FORTRAN 90 Interface
Generic: CALL LSLCB (A, NLCA, NUCA, B, X [, …])
Specific: The specific interface names are S_LSLCB and D_LSLCB.
FORTRAN 77 Interface
Single: CALL LSLCB (N, A, LDA, NLCA, NUCA, B, IPATH, X)
Double: The double precision name is DLSLCB.
Description
Routine LSLCB solves a system of linear algebraic equations having a complex banded coefficient matrix. It first uses the routine LFCCB to compute an LU factorization of the coefficient matrix and to estimate the condition number of the matrix. The solution of the linear system is then found using LFSCB.
LSLCB fails if U, the upper triangular part of the factorization, has a zero diagonal element. This occurs only if A is singular or very close to a singular matrix.
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. If the coefficient matrix is ill-conditioned or poorly scaled, it is recommended that LSACB be used.
Comments
1. Workspace may be explicitly provided, if desired, by use of L2LCB/DL2LCB The reference is:
CALL L2LCB (N, A, LDA, NLCA, NUCA, B, IPATH, X, FACT, IPVT, WK)
The additional arguments are as follows:
FACT — (2 * NLCA + NUCA + 1) × N complex work array containing the LU factorization of A on output. If A is not needed, A can share the first (NLCA + NUCA + 1) * N locations with FACT.
IPVT — Integer work vector of length N containing the pivoting information for the LU factorization of A 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.
4
2
The input matrix is singular.
3. Integer Options with Chapter 11 Options Manager
16 This option uses four values to solve memory bank conflict (access inefficiency) problems. In routine L2LCB 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 LSLCB. Additional memory allocation for FACT and option value restoration are done automatically in LSLCB. Users directly calling L2LCB 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 LSLCB or L2LCB. 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 LSLCB temporarily replaces IVAL(2) by IVAL(1). The routine L2CCB computes the condition number if IVAL(2) = 2. Otherwise L2CCB skips this computation. LSLCB restores the option. Default values for the option are IVAL(*) = 1,2.
Example
A system of four linear equations is solved. The coefficient matrix has complex banded form with one upper and one lower codiagonal. The right-hand-side vector b has four elements.
 
USE LSLCB_INT
USE WRCRN_INT
! Declare variables
INTEGER LDA, N, NLCA, NUCA
PARAMETER (LDA=3, N=4, NLCA=1, NUCA=1)
COMPLEX A(LDA,N), B(N), X(N)
!
! Set values for A in band form, and B
!
! A = ( 0.0+0.0i 4.0+0.0i -2.0+2.0i -4.0-1.0i )
! ( -2.0-3.0i -0.5+3.0i 3.0-3.0i 1.0-1.0i )
! ( 6.0+1.0i 1.0+1.0i 0.0+2.0i 0.0+0.0i )
!
! B = ( -10.0-5.0i 9.5+5.5i 12.0-12.0i 0.0+8.0i )
!
DATA A/(0.0,0.0), (-2.0,-3.0), (6.0,1.0), (4.0,0.0), (-0.5,3.0),&
(1.0,1.0), (-2.0,2.0), (3.0,-3.0), (0.0,2.0), (-4.0,-1.0),&
(1.0,-1.0), (0.0,0.0)/
DATA B/(-10.0,-5.0), (9.5,5.5), (12.0,-12.0), (0.0,8.0)/
! Solve A*X = B
CALL LSLCB (A, NLCA, NUCA, B, X)
! Print results
CALL WRCRN (’X’, X, 1, N, 1)
!
END
Output
 
X
1 2 3 4
( 3.000, 0.000) (-1.000, 1.000) ( 3.000, 0.000) (-1.000, 1.000)
Published date: 03/19/2020
Last modified date: 03/19/2020