csullivan/Numerics — pull request #1 by EldritchCheese (2014-01-16 15:23:47+00:00)
Title: Separated out a reusable RungeKutta class.

I separated out the RungeKutta algorithm into a separate class. Also, at the moment, first the velocity was iterated, then the position was, then repeat. It was a bit of a mix between RK4 and Euler's method. I reimplemented it with vectors, since that was the easiest way to pass around two values at the same time. Also, it now works in arbitrarily many dimensions. For 1-d, 1st-order systems, the two implementations are the same, but the differences come when working in more dimensions.

The main.cc now contains usage of both implementations, showing the difference between each method and the exact solution.