Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 18008 invoked from network); 2 Apr 2009 15:30:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Apr 2009 15:30:08 -0000 Received: (qmail 66158 invoked by uid 500); 2 Apr 2009 15:30:07 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 66078 invoked by uid 500); 2 Apr 2009 15:30:07 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 66069 invoked by uid 99); 2 Apr 2009 15:30:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2009 15:30:07 +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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2009 15:30:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 15FDE2388A04; Thu, 2 Apr 2009 15:29:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r761323 - in /commons/proper/math/trunk/src/java/org/apache/commons/math/ode: ./ nonstiff/ sampling/ Date: Thu, 02 Apr 2009 15:29:45 -0000 To: commits@commons.apache.org From: luc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090402152946.15FDE2388A04@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: luc Date: Thu Apr 2 15:29:45 2009 New Revision: 761323 URL: http://svn.apache.org/viewvc?rev=761323&view=rev Log: moved multistep integrator and step interpolator base classes to their corresponding generic package Added: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/MultistepIntegrator.java (contents, props changed) - copied, changed from r761212, commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepIntegrator.java commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java (contents, props changed) - copied, changed from r761212, commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepStepInterpolator.java Removed: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepIntegrator.java commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepStepInterpolator.java Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthStepInterpolator.java commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonStepInterpolator.java Copied: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/MultistepIntegrator.java (from r761212, commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepIntegrator.java) URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/MultistepIntegrator.java?p2=commons/proper/math/trunk/src/java/org/apache/commons/math/ode/MultistepIntegrator.java&p1=commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepIntegrator.java&r1=761212&r2=761323&rev=761323&view=diff ============================================================================== --- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepIntegrator.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/MultistepIntegrator.java Thu Apr 2 15:29:45 2009 @@ -15,21 +15,19 @@ * limitations under the License. */ -package org.apache.commons.math.ode.nonstiff; +package org.apache.commons.math.ode; import java.util.Arrays; -import org.apache.commons.math.ode.AbstractIntegrator; -import org.apache.commons.math.ode.DerivativeException; -import org.apache.commons.math.ode.FirstOrderDifferentialEquations; -import org.apache.commons.math.ode.FirstOrderIntegrator; -import org.apache.commons.math.ode.IntegratorException; -import org.apache.commons.math.ode.ODEIntegrator; import org.apache.commons.math.ode.events.CombinedEventsManager; import org.apache.commons.math.ode.events.EventException; import org.apache.commons.math.ode.events.EventHandler; import org.apache.commons.math.ode.events.EventState; +import org.apache.commons.math.ode.nonstiff.AdamsBashforthIntegrator; +import org.apache.commons.math.ode.nonstiff.AdamsMoultonIntegrator; +import org.apache.commons.math.ode.nonstiff.DormandPrince853Integrator; import org.apache.commons.math.ode.sampling.FixedStepHandler; +import org.apache.commons.math.ode.sampling.MultistepStepInterpolator; import org.apache.commons.math.ode.sampling.StepHandler; import org.apache.commons.math.ode.sampling.StepInterpolator; import org.apache.commons.math.ode.sampling.StepNormalizer; @@ -110,7 +108,7 @@ * registered events handlers before this start phase is completed. As * an example, consider integrating a differential equation from t=0 * to t=100 with a 4 steps method and step size equal to 0.2. If an event - * resets the state at t=0.5, the start phase will not end at t=0.7 with + * resets the state at t=0.5, the start phase will not end at t=0.6 with * steps at [0.0, 0.2, 0.4, 0.6] but instead will end at t=1.1 with steps * at [0.5, 0.7, 0.9, 1.1].

*

A side effect of the need for smoothness is that an ODE triggering @@ -168,7 +166,7 @@ do { resetTime = Double.NaN; store.restart(); - // we overshoot by 1/10000 step the end to make sure we get don't miss the last point + // we overshoot by 1/10000 step the end to make sure we don't miss the last point stopTime = starter.integrate(equations, t, y, t + (n - 0.9999) * h, y); if (!Double.isNaN(resetTime)) { // there was an intermediate reset, we restart Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/MultistepIntegrator.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/MultistepIntegrator.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/MultistepIntegrator.java ------------------------------------------------------------------------------ svn:mergeinfo = Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java?rev=761323&r1=761322&r2=761323&view=diff ============================================================================== --- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthIntegrator.java Thu Apr 2 15:29:45 2009 @@ -21,6 +21,7 @@ import org.apache.commons.math.ode.DerivativeException; import org.apache.commons.math.ode.FirstOrderDifferentialEquations; import org.apache.commons.math.ode.IntegratorException; +import org.apache.commons.math.ode.MultistepIntegrator; import org.apache.commons.math.ode.events.CombinedEventsManager; import org.apache.commons.math.ode.sampling.StepHandler; @@ -225,7 +226,7 @@ /** Compute the backward differences coefficients array. *

This is quite similar to the Pascal triangle containing the - * binomial coefficiens, except for an additional (-1)i sign. + * binomial coefficients, except for an additional (-1)i sign. * We use a straightforward approach here, since we don't expect this to * be run too many times with too high k. It is based on the recurrence * relations:

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthStepInterpolator.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthStepInterpolator.java?rev=761323&r1=761322&r2=761323&view=diff ============================================================================== --- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthStepInterpolator.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsBashforthStepInterpolator.java Thu Apr 2 15:29:45 2009 @@ -24,6 +24,7 @@ import org.apache.commons.math.fraction.Fraction; import org.apache.commons.math.ode.DerivativeException; import org.apache.commons.math.ode.sampling.AbstractStepInterpolator; +import org.apache.commons.math.ode.sampling.MultistepStepInterpolator; import org.apache.commons.math.ode.sampling.StepInterpolator; /** Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java?rev=761323&r1=761322&r2=761323&view=diff ============================================================================== --- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonIntegrator.java Thu Apr 2 15:29:45 2009 @@ -21,6 +21,7 @@ import org.apache.commons.math.ode.DerivativeException; import org.apache.commons.math.ode.FirstOrderDifferentialEquations; import org.apache.commons.math.ode.IntegratorException; +import org.apache.commons.math.ode.MultistepIntegrator; import org.apache.commons.math.ode.events.CombinedEventsManager; import org.apache.commons.math.ode.sampling.StepHandler; Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonStepInterpolator.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonStepInterpolator.java?rev=761323&r1=761322&r2=761323&view=diff ============================================================================== --- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonStepInterpolator.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/AdamsMoultonStepInterpolator.java Thu Apr 2 15:29:45 2009 @@ -24,6 +24,7 @@ import org.apache.commons.math.fraction.Fraction; import org.apache.commons.math.ode.DerivativeException; import org.apache.commons.math.ode.sampling.AbstractStepInterpolator; +import org.apache.commons.math.ode.sampling.MultistepStepInterpolator; import org.apache.commons.math.ode.sampling.StepInterpolator; /** Copied: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java (from r761212, commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepStepInterpolator.java) URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java?p2=commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java&p1=commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepStepInterpolator.java&r1=761212&r2=761323&rev=761323&view=diff ============================================================================== --- commons/proper/math/trunk/src/java/org/apache/commons/math/ode/nonstiff/MultistepStepInterpolator.java (original) +++ commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java Thu Apr 2 15:29:45 2009 @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.commons.math.ode.nonstiff; +package org.apache.commons.math.ode.sampling; import java.io.IOException; import java.io.ObjectInput; @@ -23,7 +23,7 @@ import org.apache.commons.math.MathRuntimeException; import org.apache.commons.math.ode.DerivativeException; -import org.apache.commons.math.ode.sampling.AbstractStepInterpolator; +import org.apache.commons.math.ode.MultistepIntegrator; /** This class represents an interpolator over the last step during an * ODE integration for multistep integrators. @@ -34,7 +34,7 @@ * @since 2.0 */ -abstract class MultistepStepInterpolator +public abstract class MultistepStepInterpolator extends AbstractStepInterpolator { /** Previous steps times. */ Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Propchange: commons/proper/math/trunk/src/java/org/apache/commons/math/ode/sampling/MultistepStepInterpolator.java ------------------------------------------------------------------------------ svn:mergeinfo =