view liboctave/UMFPACK/UMFPACK/OCTAVE/umfpack_demo.m.out @ 5164:57077d0ddc8e

[project @ 2005-02-25 19:55:24 by jwe]
author jwe
date Fri, 25 Feb 2005 19:55:28 +0000
parents
children
line wrap: on
line source

>> umfpack_demo

Enter the printing level for UMFPACK's output statistics:
0: none, 1: errors only, 2: statistics, 4: print some of outputs
5: print all output [default is 1]: 

--------------------------------------------------------------
Factor and solve a small system, Ax=b, using default parameters
Solving Ax=b via UMFPACK:
Solving Ax=b via MATLAB:
Difference between UMFPACK and MATLAB solution: 1.24345e-14

--------------------------------------------------------------

Factorizing [L, U, P, Q, R] = umfpack (A)

P * (R\A) * Q - L*U should be zero:
norm (P*(R\A)*Q - L*U, 1) = 4.2068e-16 (exact) 3.74627e-16 (estimated)

Solution to Ax=b via UMFPACK factorization:
x = Q * (U \ (L \ (P * (R \ b))))

UMFPACK flop count: 2362

Factorizing [L, U, P] = lu (A (:, q))
If you are using a version of MATLAB prior to V6.0, then the
following statement (q = colamd (A)) may fail.  Either download
colamd from http://www.cise.ufl.edu/research/sparse, upgrade to
MATLAB V6.0 or later, or replace the statement with
q = colmmd (A) ;

Solution to Ax=b via MATLAB factorization:
x = U \ (L \ (P * b)) ; x (q) = x ;
Difference between UMFPACK and MATLAB solution: 1.37668e-14

MATLAB LU flop count: 3164

--------------------------------------------------------------
Solve A'x=b:
Solving A'x=b via UMFPACK:
Solving A'x=b via MATLAB:
Difference between UMFPACK and MATLAB solution: 3.10862e-15

--------------------------------------------------------------
Compute C = A', and compute the LU factorization of C.
Factorizing A' can sometimes be better than factorizing A itself
(less work and memory usage).  Solve C'x=b; the solution is the
same as the solution to Ax=b for the original A.

P * (R\C) * Q - L*U should be zero:
norm (P*(R\C)*Q - L*U, 1) = 1.31839e-16 (exact) 6.41848e-17 (estimated)

Solution to Ax=b via UMFPACK, using the factors of C:
x = R \ (P' * (L' \ (U' \ (Q' * b)))) ;
Solution to Ax=b via MATLAB:
Difference between UMFPACK and MATLAB solution: 1.77636e-14

--------------------------------------------------------------

Solve AX=B, where B is n-by-10, and sparse
Difference between UMFPACK and MATLAB solution: 2.88198e-14

--------------------------------------------------------------

Solve AX=B, where B is n-by-10, and sparse, using umfpack_btf
Difference between UMFPACK and MATLAB solution: 9.79736e-14

--------------------------------------------------------------

Solve A'X=B, where B is n-by-10, and sparse
Difference between UMFPACK and MATLAB solution: 1.05244e-13
>> diary off