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

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1463680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2013-04-02 19:02:55 +00:00
parent eea1b0114a
commit 2e7d1278b1
2 changed files with 6 additions and 1 deletions

View File

@ -78,6 +78,10 @@ Users are encouraged to upgrade to this version as this release not
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>

View File

@ -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.