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 2015/12/09 17:17:16 UTC
[36/50] [abbrv] [math] Fixed state copying after event detection.
Fixed state copying after event detection.
Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/d671edef
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/d671edef
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/d671edef
Branch: refs/heads/MATH_3_X
Commit: d671edefb64cfccfb51fc957b5a94cc26fe57059
Parents: de965cb
Author: Luc Maisonobe <lu...@apache.org>
Authored: Tue Dec 8 18:08:31 2015 +0100
Committer: Luc Maisonobe <lu...@apache.org>
Committed: Tue Dec 8 18:08:31 2015 +0100
----------------------------------------------------------------------
.../math3/ode/nonstiff/EmbeddedRungeKuttaFieldIntegrator.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-math/blob/d671edef/src/main/java/org/apache/commons/math3/ode/nonstiff/EmbeddedRungeKuttaFieldIntegrator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math3/ode/nonstiff/EmbeddedRungeKuttaFieldIntegrator.java b/src/main/java/org/apache/commons/math3/ode/nonstiff/EmbeddedRungeKuttaFieldIntegrator.java
index 5f648f8..39a89e1 100644
--- a/src/main/java/org/apache/commons/math3/ode/nonstiff/EmbeddedRungeKuttaFieldIntegrator.java
+++ b/src/main/java/org/apache/commons/math3/ode/nonstiff/EmbeddedRungeKuttaFieldIntegrator.java
@@ -260,7 +260,8 @@ public abstract class EmbeddedRungeKuttaFieldIntegrator<T extends RealFieldEleme
while (error.subtract(1.0).getReal() >= 0) {
// first stage
- yDotK[0] = stepStart.getDerivative();
+ y = equations.getMapper().mapState(stepStart);
+ yDotK[0] = equations.getMapper().mapDerivative(stepStart);
if (firstTime) {
final T[] scale = MathArrays.buildArray(getField(), mainSetDimension);
@@ -331,7 +332,6 @@ public abstract class EmbeddedRungeKuttaFieldIntegrator<T extends RealFieldEleme
interpolator.storeState(stateTmp);
System.arraycopy(yTmp, 0, y, 0, y0.length);
stepStart = acceptStep(interpolator, finalTime);
- System.arraycopy(y, 0, yTmp, 0, y.length);
if (!isLastStep) {