You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2013/04/02 21:02:55 UTC
svn commit: r1463680 - in /commons/proper/math/trunk/src: changes/changes.xml
main/java/org/apache/commons/math3/ode/ExpandableStatefulODE.java
Author: luc
Date: Tue Apr 2 19:02:55 2013
New Revision: 1463680
URL: http://svn.apache.org/r1463680
Log:
Fixed missing side effects of secondary equations.
When secondary equations have a side effect on main state in Ordinary
Differential Equations integration, it is now preoerly taken into
account.
JIRA: MATH-960
Modified:
commons/proper/math/trunk/src/changes/changes.xml
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ode/ExpandableStatefulODE.java
Modified: commons/proper/math/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/changes/changes.xml?rev=1463680&r1=1463679&r2=1463680&view=diff
==============================================================================
--- commons/proper/math/trunk/src/changes/changes.xml (original)
+++ commons/proper/math/trunk/src/changes/changes.xml Tue Apr 2 19:02:55 2013
@@ -78,6 +78,10 @@ Users are encouraged to upgrade to this
2. A few methods in the FastMath class are in fact slower that their
counterpart in either Math or StrictMath (cf. MATH-740 and MATH-901).
">
+ <action dev="luc" type="fix" issue="MATH-960" >
+ Fixed missing side effects of secondary equations on main state in
+ Ordinary Differential Equations integration.
+ </action>
<action dev="luc" type="fix" issue="MATH-957" due-to="Evan Ward">
Fixed inverse cumulative probability for uniform distribution.
</action>
Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ode/ExpandableStatefulODE.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ode/ExpandableStatefulODE.java?rev=1463680&r1=1463679&r2=1463680&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ode/ExpandableStatefulODE.java (original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/ode/ExpandableStatefulODE.java Tue Apr 2 19:02:55 2013
@@ -117,7 +117,6 @@ public class ExpandableStatefulODE {
// compute derivatives of the primary equations
primaryMapper.extractEquationData(y, primaryState);
primary.computeDerivatives(t, primaryState, primaryStateDot);
- primaryMapper.insertEquationData(primaryStateDot, yDot);
// Add contribution for secondary equations
for (final SecondaryComponent component : components) {
@@ -127,6 +126,8 @@ public class ExpandableStatefulODE {
component.mapper.insertEquationData(component.stateDot, yDot);
}
+ primaryMapper.insertEquationData(primaryStateDot, yDot);
+
}
/** Add a set of secondary equations to be integrated along with the primary set.