From: Tuomo Keskitalo <Tuomo.Keskitalo@iki.fi>
To: Taneli Kalvas <taneli.v.m.kalvas@jyu.fi>
Cc: bug-gsl@gnu.org, GSL Discuss Mailing List <gsl-discuss@sourceware.org>
Subject: Re: [Bug-gsl] Error in manual: forcing ode minimum step size
Date: Wed, 06 Oct 2010 15:52:00 -0000 [thread overview]
Message-ID: <4CAC9B2D.90003@iki.fi> (raw)
In-Reply-To: <4CA9D064.7040502@jyu.fi>
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
next parent reply other threads:[~2010-10-06 15:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4CA9D064.7040502@jyu.fi>
2010-10-06 15:52 ` Tuomo Keskitalo [this message]
2010-10-16 11:20 ` Tuomo Keskitalo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CAC9B2D.90003@iki.fi \
--to=tuomo.keskitalo@iki.fi \
--cc=bug-gsl@gnu.org \
--cc=gsl-discuss@sourceware.org \
--cc=taneli.v.m.kalvas@jyu.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).