Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 31432 invoked from network); 3 Apr 2010 03:55:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Apr 2010 03:55:52 -0000 Received: (qmail 85851 invoked by uid 500); 3 Apr 2010 03:55:52 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 85386 invoked by uid 500); 3 Apr 2010 03:55:51 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 85295 invoked by uid 99); 3 Apr 2010 03:55:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Apr 2010 03:55:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Apr 2010 03:55:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 49DEB234C4C6 for ; Sat, 3 Apr 2010 03:55:27 +0000 (UTC) Message-ID: <918906150.671461270266927301.JavaMail.jira@brutus.apache.org> Date: Sat, 3 Apr 2010 03:55:27 +0000 (UTC) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Subject: [jira] Closed: (MATH-338) Wrong parameter for first step size guess for Embedded Runge Kutta methods In-Reply-To: <1978449993.103111264676374702.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MATH-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz closed MATH-338. ---------------------------- > Wrong parameter for first step size guess for Embedded Runge Kutta methods > -------------------------------------------------------------------------- > > Key: MATH-338 > URL: https://issues.apache.org/jira/browse/MATH-338 > Project: Commons Math > Issue Type: Bug > Affects Versions: 2.0 > Environment: Eclipse sous Red Hat 5 > Reporter: Morand Vincent > Fix For: 2.1 > > > In a space application using DOP853 i detected what seems to be a bad parameter in the call to the method initializeStep of class AdaptiveStepsizeIntegrator. > Here, DormandPrince853Integrator is a subclass for EmbeddedRungeKuttaIntegrator which perform the call to initializeStep at the beginning of its method integrate(...) > The problem comes from the array "scale" that is used as a parameter in the call off initializeStep(..) > Following the theory described by Hairer in his book "Solving Ordinary Differential Equations 1 : Nonstiff Problems", the scaling should be : > sci = Atol i + |y0i| * Rtoli > Whereas EmbeddedRungeKuttaIntegrator uses : sci = Atoli > Note that the Gragg-Bulirsch-Stoer integrator uses the good implementation "sci = Atol i + |y0i| * Rtoli " when he performs the call to the same method initializeStep(..) > In the method initializeStep, the error leads to a wrong step size h used to perform an Euler step. Most of the time it is unvisible for the user. > But in my space application the Euler step with this wrong step size h (much bigger than it should be) makes an exception occur (my satellite hits the ground...) > To fix the bug, one should use the same algorithm as in the rescale method in GraggBulirschStoerIntegrator > For exemple : > final double[] scale= new double[y0.length];; > > if (vecAbsoluteTolerance == null) { > for (int i = 0; i < scale.length; ++i) { > final double yi = Math.max(Math.abs(y0[i]), Math.abs(y0[i])); > scale[i] = scalAbsoluteTolerance + scalRelativeTolerance * yi; > } > } else { > for (int i = 0; i < scale.length; ++i) { > final double yi = Math.max(Math.abs(y0[i]), Math.abs(y0[i])); > scale[i] = vecAbsoluteTolerance[i] + vecRelativeTolerance[i] * yi; > } > } > > hNew = initializeStep(equations, forward, getOrder(), scale, > stepStart, y, yDotK[0], yTmp, yDotK[1]); > Sorry for the length of this message, looking forward to hearing from you soon > Vincent Morand -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.