jacobwilliams/rklib

Error in DVERK65

Closed this issue · 2 comments

Line 1561 of file rklib_variable_steps.f90 contains
call me%f(t+h, x,f1)
The correct version is
call me%f(t, x,f1)

Further searching in the same file reveals the following lines with the same pattern, and I suspect that each of these instances ought to use t rather than t+h as the first argument.

771: call me%f(t+h, x,f1)
856: call me%f(t+h, x,f1)
951: call me%f(t+h, x,f1)
1474: call me%f(t+h, x,f1)
1561: call me%f(t+h, x,f1)
1783: call me%f(t+h, x,f1)
1907: call me%f(t+h, x,f1)
2345: call me%f(t+h, x,f1)
2702: call me%f(t+h, x,f1)
3711: call me%f(t+h, x,f1)
3839: call me%f(t+h, x,f1)
4826: call me%f(t+h, x,f1)
5631: call me%f(t+h, x,f1)
8221: call me%f(t+h, x,f1)

Corresponding errors in rklib_fixed_steps.f90:

300: call me%f(t+h, x,f1)
604: call me%f(t+h, x,f1)
663: call me%f(t+h, x,f1)
722: call me%f(t+h, x,f1)
781: call me%f(t+h, x,f1)
1637: call me%f(t+h, x,f1)
1816: call me%f(t+h, x,f1)

Changing "t+h" to "t" in these lines and running the rk_test_order.f90 tests, I found that the output "success flag" changed from F to T for rkr4, rkc5, rkl5, rklk5a, rko10 and rkh10.

@xecej4 Fixed these and some other typos. Thanks!