|
From: | Christophe Prud'homme |
Subject: | Re: bug in fsolve() affecting convergence depending on the returned args |
Date: | Wed, 26 Apr 2006 09:53:31 +0200 |
User-agent: | KMail/1.9.1 |
[ Mercredi 26 Avril 2006 09:02 ] | So the error happens for N = 32 on the first time through the loop | over the elements of tt(2:end). Are you not checking info each time | fsolve is called? If not then you could miss a case that is bad and | only see the last call which might be OK. | | OTOH, I think that "iteration is not making good progress" does not | necessarily mean the solution is really bad. I think it just means | that convergence seems to be slow. John, I modified the script as you proposed (check info on return for the "good" case) but without success I still have the same behavior(I attached the new scripts) I now even go up the N=1024 and the "good" case is still good while the "bad" case fails at N=32 (fsolve sends an exception and the results for N> 4 are not available due to failure, so I cannot check if they are correct is really bad or not) Note also that I have tested this on Debian/GNU/Linux : stable/unstable 2.1.73 2.9.5 and on ia32 and amd64 arch. I get always the same behavior. here is the log N=2 get w and info N=2 get w and info OK N=2 get only w N=2 get only w OK N=4 get w and info N=4 get w and info OK N=4 get only w N=4 get only w OK N=8 get w and info N=8 get w and info OK N=8 get only w N=8 get only w OK N=16 get w and info N=16 get w and info OK N=16 get only w N=16 get only w OK N=32 get w and info N=32 get w and info OK N=32 get only w ans = error: fsolve: iteration is not making good progress N=32 get only w Failed N=64 get w and info N=64 get w and info OK N=64 get only w ans = error: fsolve: iteration is not making good progress N=64 get only w Failed N=128 get w and info N=128 get w and info OK N=128 get only w ans = error: fsolve: iteration is not making good progress N=128 get only w Failed N=256 get w and info N=256 get w and info OK N=256 get only w ans = error: fsolve: iteration is not making good progress N=256 get only w Failed N=512 get w and info N=512 get w and info OK N=512 get only w ans = error: fsolve: iteration is not making good progress N=512 get only w Failed N=1024 get w and info N=1024 get w and info OK N=1024 get only w ans = error: fsolve: iteration is not making good progress N=1024 get only w Failed attached you have the convergence graphics (good and bad) note also that, as expected, the convergence rate is 2 octave:7> p=log(abs(e_good(1:end-1)./e_good(2:end)))/log(2); p(1:2:end) ans = -0.98617 1.72502 1.98399 1.99901 1.99994 octave:7> p=log(abs(e_bad(1:end-1)./e_bad(2:end)))/log(2); p(1:2:end) ans = -0.98617 1.72502 -- Christophe Prud'homme EPFL SB IACS CMCS MA B2 534 (Bâtiment MA) Station 8 CH-1015 Lausanne Tel: +41 (0)21 693 25 47 Fax: +41 (0)21 693 43 03
cranknic_bad.m
Description: Text Data
cranknic_test2.m
Description: Text Data
cranknic_good.m
Description: Text Data
cranknic_bad.pdf
Description: Adobe PDF document
cranknic_good.pdf
Description: Adobe PDF document
[Prev in Thread] | Current Thread | [Next in Thread] |