help-octave
[Top][All Lists]
Advanced

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

Re: ODE system solving


From: Geraint Paul Bevan
Subject: Re: ODE system solving
Date: Fri, 07 Jan 2005 16:37:45 +0000
User-agent: Mozilla Thunderbird 0.7.1 (X11/20040715)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Using Octave 2.1.64, the system fails as you say with the default
tolerances:

octave> Y0=[57 1 520]; z=linspace(0,1000,2000)';
octave> y = lsode('f',Y0,z)
~ LSODE--  WARNING..INTERNAL T (=R1) AND H (=R2) ARE
~       SUCH THAT IN THE MACHINE, T + H = T ON THE NEXT STEP
~       (H = STEP SIZE). SOLVER WILL CONTINUE ANYWAY
~      In above,  R1 =  0.1482460872335E-04   R2 =  0.3721403226893E-24

~ ... cut similar warnings ...

~ LSODE--  WARNING..INTERNAL T (=R1) AND H (=R2) ARE
~       SUCH THAT IN THE MACHINE, T + H = T ON THE NEXT STEP
~       (H = STEP SIZE). SOLVER WILL CONTINUE ANYWAY
~      In above,  R1 =  0.1482460872335E-04   R2 =  0.3077833776166E-24
~ LSODE--  ABOVE WARNING HAS BEEN ISSUED I1 TIMES.
~       IT WILL NOT BE ISSUED AGAIN FOR THIS PROBLEM
~      In above message,  I1 =        10
warning: in /tmp/ode/f.m near line 21, column 3:
warning: division by zero
warning: division by zero

... cut similar warnings ...

warning: division by zero
warning: division by zero
warning: division by zero
~ LSODE--  AT T (=R1) AND STEP SIZE H (=R2), THE
~       CORRECTOR CONVERGENCE FAILED REPEATEDLY
~       OR WITH ABS(H) = HMIN
~      In above,  R1 =  0.1482460872335E-04   R2 =  0.2347843847895-169
error: lsode: repeated convergence failures (t = 1.48246e-05perhaps bad
jacobian supplied or wrong choice of integration method or tolerances)
error: evaluating assignment expression near line 6, column 3




If you relax the tolerances, the integration succeeds. However, you will
have to decide whether the answers are good enough. Note the warning
about imaginary parts! If the results are not sufficiently accurate, you
can try making the tolerances smaller, try changing the integration
method, try supplying a jacobian function, or constraining the
integration step size.

Type 'help -i lsode_options' at the Octave prompt for more details about
these options.


octave> lsode_options ( 'absolute tolerance', 1.0 );
octave> lsode_options ( 'relative tolerance', 1.0 );
octave> y = lsode('f',Y0,z)
warning: lsode: ignoring imaginary part returned from user-supplied function
y =

~    5.7000e+01    1.0000e+00    5.2000e+02
~    5.7178e+01    6.7520e-01    5.1964e+02
~    5.7278e+01    1.3776e-01    5.1928e+02

... results cut ...

~   -1.3817e+02   -1.4425e-01    3.1129e+02
~   -1.3826e+02   -1.4430e-01    3.1128e+02
~   -1.3836e+02   -1.4435e-01    3.1127e+02



- --
Geraint Bevan
http://www.mech.gla.ac.uk/~gbevan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iEYEARECAAYFAkHeutgACgkQcXV3N50QmNN98QCfavUDmXAxn/CalWBABMozqNjf
t74An1C94cG545BmMpAd4uX5iL0fvuBK
=DQKV
-----END PGP SIGNATURE-----



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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