SV: [ODE] Iterative solution
Martin C. Martin
martin at metahuman.org
Tue Mar 18 06:34:02 2003
Russ Smith wrote:
>
> your algorithm seems like a form of block-jacobi iteration for solving
> the system matrix. i'm curious if this could be improved by converting
> it to block-gauss-siedel or block-SOR.
I'd vote for the block-gauss-siedel too. (In fact, I think I've suggested
that here already.) Although how much of a difference that makes depends
on what order you're enforcing the constraints. If successive constraints
are on bodies that connected together, so that the changes will propagate,
then I'd expect an encouraging speedup. If the constraints are in
arbitrary order, then I doubt it'll make much difference. Given that
bodies form a graph rather than a tree means getting the optimal order is
probably tricky (or impossible to do the first time). I'm not sure how
well a greedy algorithm would work.
As for successive overrelaxation, here's what Numerical Recipes has to say
(section 19.5):
"How do we choose omega [the amount of overrelaxation] for a problem for
which the answer is not known analytically? That is just the weak point
of SOR! The advantages of SOR obtain only in a fairly narrow window
around the correct value of omega."
Maybe you could do something adaptive, e.g. figure out what omega you
*should* have used last timestep, and use that next timestep.
Just my two cents,
Martin