Class SuperLUEx1

java.lang.Object
com.imsl.test.example.math.SuperLUEx1

public class SuperLUEx1 extends Object

SuperLU Example 1: Computes the LU factorization of a sparse matrix.

The LU Factorization of the sparse \(6 \times 6\) matrix $$ A=\begin{pmatrix} 10.0 & 0.0 & 0.0 & 0.0 & 0.0 & 0.0 \\ 0.0 & 10.0 & -3.0 & -1.0 & 0.0 & 0.0 \\ 0.0 & 0.0 & 15.0 & 0.0 & 0.0 & 0.0 \\ -2.0 & 0.0 & 0.0 & 10.0 & -1.0 & 0.0 \\ -1.0 & 0.0 & 0.0 & -5.0 & 1.0 & -3.0 \\ -1.0 & -2.0 & 0.0 & 0.0 & 0.0 & 6.0 \end{pmatrix} $$

is computed. The sparse coordinate form for \(A\) is given by a series of row, column, and value triplets:

rowcolumnvalue
\(0\)\(0\)\(10.0\)
\(1\)\(1\)\(10.0\)
\(1\)\(2\)\(-3.0\)
\(1\)\(3\)\(-1.0\)
\(2\)\(2\)\(15.0\)
\(3\)\(0\)\(-2.0\)
\(3\)\(3\)\(10.0\)
\(3\)\(4\)\(-1.0\)
\(4\)\(0\)\(-1.0\)
\(4\)\(3\)\(-5.0\)
\(4\)\(4\)\(1.0\)
\(4\)\(5\)\(-3.0\)
\(5\)\(0\)\(-1.0\)
\(5\)\(1\)\(-2.0\)
\(5\)\(5\)\(6.0\)

Let \(y^T = (1.0, 2.0, 3.0, 4.0, 5.0, 6.0)\). Then we have \(b_1 := Ay = {(10.0, 7.0, 45.0, 33.0, -34.0, 31.0)}^T\) and \(b_2 := A^Ty = {(-9.0,8.0,39.0, 13.0,1.0, 21.0)}^T \).

In the example, the The LU factorization of \(A\) is used to solve the sparse linear system $$\begin{array}{cc} Ax &=& b_1 \\ A^Tx &=& b_2 \end{array}$$

with iterative refinement. The reciprocal pivot growth factor and the reciprocal condition number are also computed. Note that by construction \(x=y\) is the solution to this system.

See Also:
  • Constructor Details

    • SuperLUEx1

      public SuperLUEx1()
  • Method Details