No I don’t have benchmarks yet, but would like to add them at some point. Comparing against the RK methods in the Julia one would be great, the main thing would be match the step size selection algorithm since I have various options you can set for that (See here). The Julia code is so complicated and split amongst so many different files and repos that it’s hard for me to tell at a glance where that calculation is being done.
Might this be of help? https://downloads.hindawi.com/journals/sv/1994/583969.pdf
Thanks for the paper. That seems similar to the method of manufactured solutions.
The test problem in Hugo Vale’s rk_test_order.F90, which revealed the typographical errors in the RKLib code as we saw in this thread, is a rather special problem, in that the R.H.S. function g(t,x) of the ODE \dot x = g(t,x) is just a power of t, that is, g is independent of x. Errors in the b-ij
coefficients are not detected by that test. To compensate for this limitation, I adapted rk_test_order.F90 to create rk_decay.F90, which takes g(t,x) = -x, x(0) = 1, with the analytical solution x = e^{-t}. The file is attached. I am pleased to note that all the tests passed with the exception of plain old Euler, which gave poor accuracy as expected for a step size of 0.01.
rk_decay.F90 (2.9 KB)
Sorry for a layman question.
Are there some examples, showing that for some ODEs, the Julia ODE solvers are noticeably faster than the Fortran ODE solvers?
You will have to sharpen your question if you want useful answers. Faster for the same step size? For the same accuracy? The same number of function evaluations? …
This narrative from the author of the Julia DE package may be worth reading. Some Julia benchmark results: SciMLBenchmarksOutput .
@mecej4 Nice! May I add this as a unit test in the repository? (or if you would like, you can add it and send me a pull request and I’ll merge it in).
Please use the rk_decay.F90 test in any way that you wish.
Another suggestion, not related to testing, is to make the table of RK-scheme attributes (that you included in your post #13 on October 10 in this thread) available in your Github repository for RKLib.
It’s already there (see the README).