From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3037 invoked by alias); 6 Oct 2010 15:52:23 -0000 Received: (qmail 3026 invoked by uid 22791); 6 Oct 2010 15:52:22 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from filtteri6.pp.htv.fi (HELO filtteri6.pp.htv.fi) (213.243.153.189) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Oct 2010 15:52:17 +0000 Received: from localhost (localhost [127.0.0.1]) by filtteri6.pp.htv.fi (Postfix) with ESMTP id 4A3E156E249; Wed, 6 Oct 2010 18:52:14 +0300 (EEST) Received: from smtp4.welho.com ([213.243.153.38]) by localhost (filtteri6.pp.htv.fi [213.243.153.189]) (amavisd-new, port 10024) with ESMTP id nROYXUgdWaT0; Wed, 6 Oct 2010 18:52:14 +0300 (EEST) Received: from [192.168.0.103] (cs27093091.pp.htv.fi [89.27.93.91]) by smtp4.welho.com (Postfix) with ESMTP id D82295BC010; Wed, 6 Oct 2010 18:52:13 +0300 (EEST) Message-ID: <4CAC9B2D.90003@iki.fi> Date: Wed, 06 Oct 2010 15:52:00 -0000 From: Tuomo Keskitalo User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: Taneli Kalvas CC: bug-gsl@gnu.org, GSL Discuss Mailing List Subject: Re: [Bug-gsl] Error in manual: forcing ode minimum step size References: <4CA9D064.7040502@jyu.fi> In-Reply-To: <4CA9D064.7040502@jyu.fi> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2010-q4/txt/msg00000.txt.bz2 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