>  Docs Center  >  IDL Reference  >  Advanced Math and Stats  >  IMSL_SP_BDFAC

IMSL_SP_BDFAC

IMSL_SP_BDFAC

The IMSL_SP_BDSOL procedure computes the LU factorization of a matrix stored in band storage mode.

This routine requires an IDL Advanced Math and Stats license. For more information, contact your sales or technical support representative.

The IMSL_SP_BDFAC function computes the LU factorization of A with based on the blocked LU factorization algorithm given in Du Croz, et al, (1990). Level-3 BLAS invocations were replaced by in-line loops. The blocking factor BLK_FACTOR has the default value of 1, but can be reset to any positive value not exceeding 32.

An estimate of the L1 condition number of A is computed using Higham’s modifications to Hager’s method, as given in Higham (1988). If the estimated condition number is greater than 1/ε (where ε is the machine precision), a warning message is issued. This indicates that very small changes in A may produce large changes in the solution x.

Example


Consider the 1000 x 1000 banded matrix below:

This example computes the solution to Ax1 = b1 and Ax2 = b2, where b1 and b2 are random vectors. The factorization is computed just once, using IMSL_SP_BDFAC, and the solutions are computed using IMSL_SP_BDSOL.

 

n_rows = 1000L
nlca = 1L
nuca = 1L
a = DBLARR(n_rows*(nlca+nuca+1))
a(1:n_rows-1) = 4
a(n_rows:2*n_rows-1) = -1
a(2*n_rows:*) = 4
; Fill A with the values of the bands.
seed = 123L
b1 = RANDOMU(seed, n_rows)
b2 = RANDOMU(seed, n_rows)
; Fill random vectors
IMSL_SP_BDFAC, nlca, nuca, n_rows, a, pivot, factor
; Compute the factorization using IMSL_SP_BDFAC.
x1 = IMSL_SP_BDSOL(b1, nlca, nuca, Factor = factor, Pivot = pivot)
; Compute solution of Ax1 = b1 above, and output residual below.
PM, TOTAL(ABS(IMSL_SP_MVMUL(n_rows, n_rows, nlca, nuca, $
  a, x1)-b1))
   
  1.2367884e-13
 
x2 = IMSL_SP_BDSOL(b2, nlca, nuca, Factor = factor, Pivot = pivot)
; Compute the solution of Ax2 = b2 above, and output residual.
PM, TOTAL(ABS(IMSL_SP_MVMUL(n_rows, n_rows, nlca, nuca, $
  a, x2)-b2))
   
  9.1537888e-14

Syntax


IMSL_SP_BDFAC, Nlca, Nuca, N_rows, A, Pivot, Factor [, BLK_FACTOR=value] [, CONDITION=variable] [, /DOUBLE]

Return Value


None

Arguments


A

Array of size (Nlca + Nuca + 1) x n containing the n x n banded coefficient matrix in band storage mode A(i, j). See “Band Storage Format” for a description of band storage mode.

Factor

A named variable that will contain an array of size (2*nlca + nuca + 1) x n_rows containing the LU factorization of A with column pivoting. The keywords FACTOR and CONDITION cannot be used together.

Nlca

Number of lower codiagonals in a.

Nuca

Number of upper codiagonals in a.

N_rows

Number of rows in a.

Pivot

A named variable that will contain a one-dimensional array containing the pivot sequence. The keywords PIVOT and CONDITION cannot be used together.

Keywords


BLK_FACTOR (optional)

The blocking factor. This keyword must be set no larger than 32. Default: BLK_FACTOR = 1.

CONDITION (optional)

Named variable into which an estimate of the L1 condition number is stored. This keyword cannot be used with PIVOT and FACTOR.

DOUBLE (optional)

If present and nonzero, double precision is used.

Version History


6.4

Introduced

See Also


IMSL_SP_BDPDFAC, IMSL_SP_BDPDSOL, IMSL_SP_BDSOL, IMSL_SP_CG, IMSL_SP_GMRES, IMSL_SP_LUFAC, IMSL_SP_LUSOL, IMSL_SP_MVMUL, IMSL_SP_PDFAC, IMSL_SP_PDSOL



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us