[ODE] Faster ODE
Niko Nevatie
nnevatie at welho.com
Thu Nov 21 12:00:02 2002
I tried out the code in 'fastldlt_henri.c'. It works as expected. There was
a small typo somewhere in the beginning of one function, but it caused no
probs. I cannot say anything about the speed of the code, as I haven't
benchmarked anything yet. But hey, if you say it's faster than the original,
I'll take your word on it :)
----- Original Message -----
From: Henri Hakl
To: ode@q12.org
Sent: Thursday, November 21, 2002 11:49 AM
Subject: [ODE] Faster ODE
Hi ODE :)
Please can somebody look at this and experiment with the file?
LDLT decomposition is one of the primary computational activities in ODE's
physics engine. LDLT = Lower Diagonal Lower Transposed, meaning a constraint
matrix A (that describes the physics of a world) can be decomposed into two
matrices (L and D, where L is a lower triangular matrix (all entries above
the diagonal are zero) and D is a diagonal matrix (all entries except the
diagonal are zero)). Now A = L D L' (A equals the lower matrix times the
diagonal matrix times the transposed lower matrix.) The A matrix varies in
size and is typically between 10x10 and 500x500 for ODE (depending on
how many constraints/collisions/etc need to be solved for a given simulation
step).
This LDLT decomposition needs to be solved with every step and is quite
computationally intensive. I've looked at the stldlt.c file that is part of
the ODE source and it looks to me like it could be improved upon.
Unforetunately I use Delphi, so I cannot test my suggested modifications
directly (though the Delphi version seems fine and considerably faster then
the original).
The file http://www.cs.sun.ac.za/~henri/fastldlt_henri.c is a replacement
for fastldlt.c and should (barring errors) work flawlessly and faster then
the original.
Let me know if it works, thanks :)
Henri