[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: implement a SOR like routine efficiently
From: |
Miroslaw Kwasniak |
Subject: |
Re: implement a SOR like routine efficiently |
Date: |
Tue, 16 Nov 2004 19:58:30 +0100 |
User-agent: |
Mutt/1.5.6+20040907i |
On Tue, Nov 16, 2004 at 10:40:17AM -0500, Przemek Klosowski wrote:
>
> Well, as written, the loop is not vectorizable; but the expression is
> suspiciously close to an 'averaging' kernel. I just wanted you to
> confirm that a convolution of a and [0 1 0; 1 0 1; 0 1 0] would not be
> an acceptable solution:
>
> a(2:n-1,2:n-1) = conv2(a, [0 1 0; 1 0 1; 0 1 0],'valid');
I though yesterday about this solution but Ganesh operator is strange
diagonal symmetric.
In http://www.zind.ikem.pwr.wroc.pl/arch/octave/sor/ you can see my try to
visualise Ganesh `sor' for 9x9 case:
- animated image sor99.gif
- script sor.m wich did image
Each frame represent walk trough indices i,j=1:9 of matrix SOR(i,j,9,9) of
operator coefficients.
Asumming that b=sor(a) in my representations b(i,j) = sum(sum(SOR(i,j,:,:).*a))
Mirek
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------