Skip to content

Commit

Permalink
Bugfix: DDASRT sometimes jumps to a root at t > tout when INFO(3) = 1.
Browse files Browse the repository at this point in the history
Affects cases where outputSteps < 0.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4897 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Reino Ruusu committed Feb 2, 2010
1 parent ffda0c5 commit a5def2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions c_runtime/ddasrt.c
Expand Up @@ -2357,9 +2357,9 @@ static doublereal c_b588 = 1.;

L300:
/* SET T1 TO TN OR TOUT, WHICHEVER COMES FIRST, AND GET G AT T1. -------- */
if (*info3 == 1) {
/* if (*info3 == 1) {
goto L310;
}
}*/
if ((*tout - *tn) * h__ >= 0.) {
goto L310;
}
Expand Down
2 changes: 1 addition & 1 deletion c_runtime/fortran/ddasrt.f
Expand Up @@ -1717,7 +1717,7 @@ SUBROUTINE DRCHEK (JOB, G, NG, NEQ, TN, TOUT, Y, YP, PHI, PSI,
C
300 CONTINUE
C SET T1 TO TN OR TOUT, WHICHEVER COMES FIRST, AND GET G AT T1. --------
IF (INFO3 .EQ. 1) GO TO 310
C IF (INFO3 .EQ. 1) GO TO 310
IF ((TOUT - TN)*H .GE. 0.0D0) GO TO 310
T1 = TOUT
IF ((T1 - RWORK(LT0))*H .LE. 0.0D0) GO TO 390
Expand Down

0 comments on commit a5def2c

Please sign in to comment.