octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sparse/bicg.b,sparse/cgs.patch and sparse/bicgstab.patch


From: Jaroslav Hajek
Subject: Re: sparse/bicg.b,sparse/cgs.patch and sparse/bicgstab.patch
Date: Thu, 28 May 2009 07:43:45 +0200

On Thu, May 28, 2009 at 7:03 AM, Jaroslav Hajek <address@hidden> wrote:
> On Wed, May 27, 2009 at 5:27 PM, R! <address@hidden> wrote:
>>
>> Of course,
>> I didnt find any information which is the right way how to do it so I write
>> it here:
>>
>> Changelog
>> sparse/bicgstab.m
>> - new output when calling without arguments
>> - time optimization: removed certain checks linked to preconditioner which
>> are unacceptably  slow
>>
>> sparse/cgs.m
>> - new output when calling without arguments
>> - time optimization: removed certain checks linked to preconditioner which
>> are unacceptably  slow
>> - certain internal variable was renamed, it has the same names in bicgstab
>> and bicg now
>>
>>
>>
>>
>
> OK, I applied the bicgstab and cgs patches, with a couple of style
> changes. Bicg will be kept for 3.2.1.
>
> cheers
>

Looking closer at the code, I discovered a minor bug in the preconditioning:
`precon = @(x) M1 * (M2 * x)' was not correct because the
preconditioning matrices are specified as inverses.
Also, I don't think that it's a good idea to explicitly invert the
preconditioner. Preconditioners are usually sparse and triangular; the
inverse remains triangular but is often much less sparse, and also
usually has more widely varying elements.
Note that Octave's matrix division operator is smart enough to
recognize triangular matrices (in the sparse case, also permuted
triangular), and will even cache this information to be reused in
subsequent divisions, hence there are no dramatic losses of
performance to be expected here.

I applied the following patch to alleviate these problems:
http://hg.savannah.gnu.org/hgweb/octave/rev/1673a0dc019f

of course, if you want to discuss this further, you're welcome.

cheers

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]