[ODE] bug fix in LCP solver

Russ Smith russ at q12.org
Fri Dec 14 23:22:02 2001


a few people have reported the problem that occasionally they get
the error message "LCP internal error, s <= 0", and sometimes 
the simulation goes crazy as well. i have tracked this down to a
problem in lcp.cpp - the fix has been checked in.

thanks to gildas bayard for providing code that exhibited the
problem - it was extremely useful.

the problem was quite rare and only occurred for system matrices of
a particular structure. the CVS log says it all:

  bug fix: the 'degenerate' case where w[i]==0 at the start of the
  lcp loop was not handled correctly, resulting in uninitialized
  values in L being mixed in with the other computations. this was
  fixed by adding a call to lcp.solve1() before lcp.transfer_i_to_C(),
  as required by the dLCP API. the solve1() API was changed to allow
  quicker computation in this case.

russ.

--
Russell Smith
http://www.q12.org