* Re: [Bug-gsl] Error in manual: forcing ode minimum step size
[not found] <4CA9D064.7040502@jyu.fi>
@ 2010-10-06 15:52 ` Tuomo Keskitalo
2010-10-16 11:20 ` Tuomo Keskitalo
0 siblings, 1 reply; 2+ messages in thread
From: Tuomo Keskitalo @ 2010-10-06 15:52 UTC (permalink / raw)
To: Taneli Kalvas; +Cc: bug-gsl, GSL Discuss Mailing List
Hello,
On 10/04/2010 04:02 PM, Taneli Kalvas wrote:
> The manual has the following comment and suggestion for ODE evolve:
>
> Evolving the system directly through a discontinuity with a strict
> tolerance may result in extremely small steps being taken at the edge of
> the discontinuity (e.g. down to the limit of machine precision). In this
> case it may be necessary to impose a minimum step size hmin suitable for
> the problem:
>
> while (t < t1)
> {
> gsl_odeiv_evolve_apply (e, c, s, &sys, &t, t1, &h, y);
> if (h < hmin) { h = hmin; } ;
> }
>
> The value of h returned by gsl_odeiv_evolve_apply is always a suggested
> value and can be modified whenever needed.
Generally speaking:
In my opinion, that part should not be in the manual in the first place.
It describes a potentially harmful numerical tweak. If step size
decreases due approaching of a singluarity, then forcing a large step
over it might introduce a very large error that makes your results
garbage. On the other hand, if the user knows what is really happening
in the system, it can be OK. It depends on the case.
> Still... it would be nice to have a possibility for forcing a minimum
> step size.
Currently this is possible by using the step_apply routine directly.
This way you can choose to ignore the error estimate of the step, at
your own risk.
You are the second person to ask for it, so I think I'll write a
separate evolve_apply routine that forces evolution of a system with a
user specified step size.
BR,
Tuomo
--
Tuomo.Keskitalo@iki.fi
http://iki.fi/tuomo.keskitalo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Bug-gsl] Error in manual: forcing ode minimum step size
2010-10-06 15:52 ` [Bug-gsl] Error in manual: forcing ode minimum step size Tuomo Keskitalo
@ 2010-10-16 11:20 ` Tuomo Keskitalo
0 siblings, 0 replies; 2+ messages in thread
From: Tuomo Keskitalo @ 2010-10-16 11:20 UTC (permalink / raw)
To: GSL Discuss Mailing List; +Cc: Taneli Kalvas, bug-gsl
Hi,
On 10/06/2010 06:52 PM, Tuomo Keskitalo wrote:
>> Still... it would be nice to have a possibility for forcing a minimum
>> step size.
>
> You are the second person to ask for it, so I think I'll write a
> separate evolve_apply routine that forces evolution of a system with a
> user specified step size.
I've now added functions gsl_odeiv2_evolve_apply_fixed_step and
gsl_odeiv2_driver_apply_fixed_step for this purpose, available at Bazaar
(bzr) development branch ode-initval2 at savannah.
Download and compile with commands:
bzr checkout http://bzr.savannah.gnu.org/r/gsl/ode-initval2/
cd ode-initval2
autoreconf -i -f; ./configure --enable-maintainer-mode ; make
--
Tuomo.Keskitalo@iki.fi
http://iki.fi/tuomo.keskitalo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-16 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <4CA9D064.7040502@jyu.fi>
2010-10-06 15:52 ` [Bug-gsl] Error in manual: forcing ode minimum step size Tuomo Keskitalo
2010-10-16 11:20 ` Tuomo Keskitalo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).