[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ff3d-users] Re: Problem with For loop and seperate execution
From: |
Stephane Del Pino |
Subject: |
[ff3d-users] Re: Problem with For loop and seperate execution |
Date: |
Sun, 25 Jan 2004 14:30:16 +0100 |
User-agent: |
KMail/1.5.4 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dear Robert.
This one was tricky ;-)
As you have noticed, if results are not the same, they are very close. But at
first sight you may think that they *should* be exactly the same! It is not
true. The reason is that when you write:
solve(u) ...
if u had no previous value, it is set to 0 as initial guess for conjugate
gradient. If it had one it is kept. So when you perfrom the loop initial
guesses are not the same for 2: and 3:, and so convergence criterion is not
achived for the same candidates. If you want the same results you have to had
a 'u=0;' after saving your data. I am not sure it is better than keeping
previous solution...
Regards,
Stephane.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAE8TobZyhKhZwdc0RAudcAJ0TgI5Wv+yEat5uV0oAeXDP3tj6KwCfdrTH
mi+5439S7xDD/go107E3di0=
=ALb6
-----END PGP SIGNATURE-----