Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xfong committed Nov 18, 2020
1 parent 1b1eaee commit f41d857
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion engine/rk23.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (rk *RK23) Step() {
rlerr = float64(cuda.MaxAbs(errnorm))
fail = 1
}
if fail == 0 || RelErr < 0.0 || rlerr < RelErr || Dt_si <= MinDt || FixDt != 0 { // mindt check to avoid infinite loop
if fail == 0 || RelErr <= 0.0 || rlerr < RelErr || Dt_si <= MinDt || FixDt != 0 { // mindt check to avoid infinite loop
// step OK
setLastErr(err)
setMaxTorque(k4)
Expand Down
2 changes: 1 addition & 1 deletion engine/rk45dp.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (rk *RK45DP) Step() {
rlerr = float64(cuda.MaxAbs(errnorm))
fail = 1
}
if fail == 0 || RelErr < 0.0 || rlerr < RelErr || Dt_si <= MinDt || FixDt != 0 { // mindt check to avoid infinite loop
if fail == 0 || RelErr <= 0.0 || rlerr < RelErr || Dt_si <= MinDt || FixDt != 0 { // mindt check to avoid infinite loop
// step OK
setLastErr(err)
setMaxTorque(k7)
Expand Down
2 changes: 1 addition & 1 deletion engine/rk56.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (rk *RK56) Step() {
rlerr = float64(cuda.MaxAbs(errnorm))
fail = 1
}
if fail == 0 || RelErr < 0.0 || rlerr < RelErr || Dt_si <= MinDt || FixDt != 0 { // mindt check to avoid infinite loop
if fail == 0 || RelErr <= 0.0 || rlerr < RelErr || Dt_si <= MinDt || FixDt != 0 { // mindt check to avoid infinite loop
// step OK
setLastErr(err)
setMaxTorque(k2)
Expand Down

0 comments on commit f41d857

Please sign in to comment.