[SciPy-user] linsolve.factorized was: Re: Using umfpack to calculate a incomplete LU factorisation (ILU)

Robert Cimrman cimrman3@ntc.zcu...
Thu Mar 22 09:46:07 CDT 2007


Neilen Marais wrote:
>> Robert Cimrman wrote:
>> Well, I did it since I am going to need this, too :-)
>>
>> In [3]:scipy.linsolve.factorized?
>> ...
>> Definition:     scipy.linsolve.factorized(A)
>> Docstring:
>>     Return a fuction for solving a linear system, with A pre-factorized.
>>
>>     Example:
>>       solve = factorized( A ) # Makes LU decomposition.
>>       x1 = solve( rhs1 ) # Uses the LU factors.
>>       x2 = solve( rhs2 ) # Uses again the LU factors.
>>
>> This uses UMFPACK if available.
> 
> This is a useful improvement, thanks. But why not just extend
> linsolve.splu to use umfpack so we can present a consistent interface? The
> essential difference between factorized and splu is that you get to
> explicity control the storage of the LU factorisation and get some
> additional info (i.e. the number of nonzeros), whereas factorised only
> gives you a solve function. The actual library used to do the sparse LU is
> just an implementation detail that should abstracted wherever possible, no?
> 
> If nobody complains about the idea I'm willing to implement it.

Sure, splu is an exception, every effort making it consistent is
welcome. But note that umfpack always gives you complete LU factors,
there is no ILU (drop-off) support - how would you tackle this?

Maybe change its name to get_superlu_obj or something like that, use
use_solver( useUmfpack = False ) at its beginning, and restore the
use_solver setting at the end?

r.


More information about the SciPy-user mailing list