adaptive integrators

Hi all,
Does anyone know a good c++ open source code for adaptive higher order integration of ODEs (runge-kutta family) ? Or perhaps any good references so I can write my own ?
I seem to remember messing with it in an old 3D project, but I can't remember which...

In any case, I can't give you any better than googling "c++ runge kutta". Sorry. :-|
No problem :)
Heres one i found with embedded techniques, the ones i was looking for.

http://mymathlib.webtrellis.net/

It is in C. i would have preferred to have some formal proofs of the error orders though. I never took numerical ODEs and regret it now :(
ODE= ordinary differential equations, it's not 3D.

If you know the algorithm (which probably is the case, since it has a non-popular name and you know it), it's best to program it yourself.
closed account (EzwRko23)
"it's best to program it yourself."

It depends very much on the complexity of the equations you have to solve and how important is this module for you. If the core logic of the program is not the ODE solver, I would recommed using a library. Beware that most methods learned at school don't work as expected for most complex problems (stability problems, round-off errors, lack of convergence in non-linear ODEs). Dealing with this correctly requires lots of expertise and effort.

What do you need it for?
Last edited on
// Well as for the "it's best to program it yourself" thing, I would have to agree to that for a simple yet important reason... learning and experience! Unless there is some higher priority reason that surpasses the importance of experience and understanding, which I find hard to believe unless it's for some deadline on something needed out of your control. Otherwise, if you had plenty of time to do it, I don't see a reason not to gain what you can from it!

// These are just ideas from a quite inexperienced beginner.
Last edited on
tition wrote:
ODE= ordinary differential equations, it's not 3D.

You do know what kinds of things differential equations are useful for, right? This stuff is very useful in three-dimensional analysis and modelling -- particularly in simulations (like cloth and hair).

Which reminds me what I was using it for... I was writing my own cloth simulation for a popular 3D package. Someone else beat me to the punch though, so I never finished it.
@xorebxebx

My primary concern is error control. The basic runge-kutta can be easily picked out from wikipedia. I did some more searching and managed to find couple of books in the library. Intend to spend some time learning the theory. Also, intend to have a look at the matlab source and see how they have implemented it.
Topic archived. No new replies allowed.