No BSD License  

Highlights from
Fast Sparse LU substitution

3.5

3.5 | 2 ratings Rate this file 4 Downloads (last 30 days) File Size: 3.82 KB File ID: #10546

Fast Sparse LU substitution

by Darren Engwirda

 

28 Mar 2006 (Updated 03 Apr 2006)

A dedicated mex-file for use with UMFPACK to complete the forward and back substitution quickly

| Watch this File

File Information
Description

This is a dedicated mex-file for use with UMFPACK to efficiently complete the permuted forward/back substitution to solve linear systems, A*x = b when A is sparse and b is a dense vector.

UMFPACK is used when the MATLAB function "lu" is called with 4 outputs:

[L,U,P,Q] = lu(A, tol);

The mex-file provides the solution:

x = LUsubs(L,U,P,Q,b);

and generally results in a CPU time saving of a factor of 3-4 (On my machine).

Type "LUdemo" and "help LUsubs" for more information.

A pre-compiled version is included. If you have the MATLAB compiler you can re-compile the file via:

mex -O LUsubs.c

You will need either windows or the compiler to use this function.

See Tim Davis's website (UMFPACK's author) for some great linear algebra routines:

http://www.cise.ufl.edu/~davis/

P.S This sort of thing is important when solving PDE's numerically.

NOTE: The zip file should now work (03/04/2006), but I have removed the demo...

See also my fast sparse-matrix-vector-product function:

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=10556&objectType=file

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
28 Jul 2006 Shelley Lee

It's really faster. Unfortunately, it does
not support complex matrices.

06 Aug 2008 Donghua Xu

It appears to work in the x32 but not the x64 version of Matlab. In the latter, it is actually slower than the built-in method, particularly for large sparse matrices. I recommend the cs_lu or klu methods by TA Davis which are very efficient in the x64 version.

Please login to add a comment or rating.
Updates
30 Mar 2006

Brief error checking

03 Apr 2006

zip file corrupted

Tag Activity for this File
Tag Applied By Date/Time
linear algebra Darren Engwirda 22 Oct 2008 08:20:38
sparse lu substitution Darren Engwirda 22 Oct 2008 08:20:38
umfpack Darren Engwirda 22 Oct 2008 08:20:38
mathematics Darren Engwirda 22 Oct 2008 08:20:38

Contact us at files@mathworks.com