@jacobwilliams: This is a commendable body of work, and I hope that the code package will be adopted widely. Being applied by many users will help with giving the package a good workout and correcting errors.
An instance where your integrator package can be used is the CAMB cosmology package, where they still use, in essence the old Netlib DVERK code, with about 50 GOTO statements in about 500 lines of code. Since I had recently looked at the CAMB software, after a user had posted a problem to the Intel Fortran site, I tried out the DVERK in your package, and found an error!
Line 1561 of file rklib_variable_steps.f90 now contains
call me%f(t+h, x,f1)
and should instead be
call me%f(t, x, f1)
Unfortunately, this sort of error can go unnoticed because the only consequence may be more integration steps used and small changes in the results ā changes that do not shout āerror here!ā unless one has at hand independently obtained reference results. Moreover, this error will have no effect if the ODEs being solved are autonomous.
For the test case that I used, which involved three coupled ODEs, with the error left uncorrected, I obtained:
tf = 12.906594
xf = 1.5631650764E-01 8.1839336759E-01 6.2787801657E-01
used 1712 function evaluations
and with the error corrected, I obtained:
tf = 12.906594
xf = 1.5656410324E-01 8.1904586941E-01 6.2743142363E-01
used 568 function evaluations
Searching for the same error pattern in the file revealed more instances. I do not know enough about the numerous R-K schemes to declare these as errors without looking up published references in each case, so users should take the following list as a hint for further checking:
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)