[Fwd: Re: [ODE] Euler vs. Runge-Kutta and adaptive step sizes]

Martin C. Martin martin at metahuman.org
Wed May 1 21:17:02 2002


Oops, sorry for sending these out of order.

- Martin

-------- Original Message --------
From: "Martin C. Martin" <martin@metahuman.org>
Subject: Re: [ODE] Euler vs. Runge-Kutta and adaptive step sizes
To: Russ Smith <russ@q12.org>

Hey Russ,

I'm interested in higher order integrators mostly in the hope that it
will allow larger time steps, at least when the set of constraints isn't
changing.  Perhaps that's misguided on my part?

> > Is there much point in doing [step doubling] with Euler integration?
> 
> errrm ... not sure ... what part of 'numerical recipes' describes this?

In the second edition it's section 16.2, "Adaptive Stepsize Control for
Runge-Kutta," in the chapter "Integration of Ordinary Differential
Equations."  The idea seems rather simple and general.  All I would need
is, given the error at a given step size, how to choose a better step
size.

One problem I'm having is when things interpenetrate.  One thought I'm
having is to stick with a fixed step size, but at the end of a step, if
a new constraint is introduced, redo the step with the new constraint. 
In other words, all constraints would be introduced a step earlier,
which would help reduce/eliminate the initial interpenetration and the
problems it causes, like bouncing.  Of course, I'm assuming that I can
"match up" constraints between time steps.  I suppose, in the worst
case, I could simply keep track of whether two bodies are colliding. 
Only if there are two bodies that weren't colliding at the beginning of
the step, but are colliding at the end, do we rewind and add the
constraint.

Does this make any sense?

Thanks,
Martin