Skip to content

Conversation

@fredroy
Copy link
Contributor

@fredroy fredroy commented Jan 21, 2026

Based on

in #5871 (and more cases) it was noted that (unbuilt) LCP was always faster than UnbuiltGaussSeidelConstraintSolver (in average ~10-20 %) and usually converged in less iterations.
Even if the algorithm is rigorously the same (apparently...)

After investigations, Claude 🤖successfully found that the main difference is UnbuiltGaussSeidelConstraintSolver was always starting its GS with the forces at 0 (cold start), whereas LCP was keeping track of the previous forces.
It also provided the implementation (I could never do that by myself 💩) which... looks good to me at least 🙃

Benches (continuation of #5871)

  • 5000 steps on 3instru_collis (deformable), wire_optimization on
LCP                : 5000 iterations done in 43.9782 s ( 113.693 FPS)
UGS (w/o hotstart) : 5000 iterations done in 49.5163 s ( 100.977 FPS)
UGS (w hotstart)   : 5000 iterations done in 44.0242 s ( 113.574 FPS)
  • for the fun, wire_optimization off
LCP                : 5000 iterations done in 63.7577 s ( 78.4219 FPS)
UGS (w/o hotstart) : 5000 iterations done in 99.2367 s ( 50.3846 FPS)
UGS (w hotstart)   : 5000 iterations done in 62.5122 s ( 79.9844 FPS)

This PR could be considered a little bit... controversial (:vibe:) as Claude-code implemented lots of stuff

And a last question would be, either d_initialGuess set to True or False by default ? (false being the behavior as before)

[with-all-tests]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request pr: highlighted in next release Highlight this contribution in the notes of the upcoming release topic for next dev-meeting PR to be discussed in sofa-dev meeting pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Jan 21, 2026
@fredroy
Copy link
Contributor Author

fredroy commented Jan 21, 2026

[ci-build][with-all-tests]

@hugtalbot hugtalbot added pr: ai-generated Label notifying the reviewers that part or all of the PR has been generated with the help of an AI pr: based on previous PR PR based on a previous PR, therefore to be merged ONLY subsequently pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: ai-generated Label notifying the reviewers that part or all of the PR has been generated with the help of an AI pr: based on previous PR PR based on a previous PR, therefore to be merged ONLY subsequently pr: enhancement About a possible enhancement pr: highlighted in next release Highlight this contribution in the notes of the upcoming release pr: status to review To notify reviewers to review this pull-request topic for next dev-meeting PR to be discussed in sofa-dev meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants