Skip to content

Commit

Permalink
fixed files form Math #44
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 24aac8b commit a4f6ab5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ protected double acceptStep(final AbstractStepInterpolator interpolator,

double previousT = interpolator.getGlobalPreviousTime();
final double currentT = interpolator.getGlobalCurrentTime();
resetOccurred = false;

// initialize the events states if needed
if (! statesInitialized) {
Expand Down Expand Up @@ -331,6 +330,9 @@ public int compare(EventState es0, EventState es1) {
if (isLastStep) {
// the event asked to stop integration
System.arraycopy(eventY, 0, y, 0, y.length);
for (final EventState remaining : occuringEvents) {
remaining.stepAccepted(eventT, eventY);
}
return eventT;
}

Expand All @@ -340,6 +342,9 @@ public int compare(EventState es0, EventState es1) {
System.arraycopy(eventY, 0, y, 0, y.length);
computeDerivatives(eventT, y, yDot);
resetOccurred = true;
for (final EventState remaining : occuringEvents) {
remaining.stepAccepted(eventT, eventY);
}
return eventT;
}

Expand Down

0 comments on commit a4f6ab5

Please sign in to comment.