Skip to content

[Spring] SpringForceField now handles configuration singularity - #5822

Open
remibessard wants to merge 5 commits into
sofa-framework:masterfrom
remibessard:springForceField-singularity-master
Open

remibessard wants to merge 5 commits into
sofa-framework:masterfrom
remibessard:springForceField-singularity-master

Conversation

@remibessard

@remibessard remibessard commented Dec 11, 2025 •

Copy link
Copy Markdown
Contributor

Update SpringForceField so that it handles configuration singularity in simulation by adding regularization term (so that matrix can be inverted).


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).

…in simulation by adding regularisation term (so that matrix can be inverted)
@fredroy fredroy added pr: enhancement About a possible enhancement pr: status to review To notify reviewers to review this pull-request labels Dec 11, 2025
@hugtalbot hugtalbot changed the title [Spring] UPDATE SpringForceField so that it handles configuration singularity … [Spring] SpringForceField now handles configuration singularity Dec 11, 2025
@hugtalbot

Copy link
Copy Markdown
Contributor

Very nice to see your contributions @remibessard 👍 👍 👍 👍

@hugtalbot hugtalbot added this to the v26.06 milestone Dec 12, 2025
// dF = k_s.U.U^T.dX + f/l.(I-U.U^T).dX = ((k_s-f/l).U.U^T + f/l.I).dX
auto& m = springForce->dForce_dX;
Real tgt = forceIntensity * inverseLength;
Real tol = 1e-8;

@hugtalbot hugtalbot Dec 18, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we not use std::limit ?

I agree that a user-defined data would not be appropriate, but I do not like hard-coded value. Not sure there is an ideal solution..

@hugtalbot
hugtalbot requested a review from alxbilger January 27, 2026 14:40
@hugtalbot

Copy link
Copy Markdown
Contributor

Create test case reproducing the singular configuration.
Investigate the role of regParams.
Remove magic numbers and make it as data

@hugtalbot hugtalbot added 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 30, 2026
@hugtalbot hugtalbot modified the milestones: v26.06, v26.12 Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement About a possible enhancement pr: status wip Development in the pull-request is still in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants