Repository navigation
[HyperElastic] Fix inverted Stable Neo-Hookean scene and add regression coverage - #6377
Merged
hugtalbot merged 5 commits intoNov 5, 2026
Conversation
…on coverage Signed-off-by: yz <3318283120@qq.com>
Contributor
|
Thanks a lot for this investigation. However, in the PR where I introduced this scene, we can observe a different behavior: #4603. I think most of the changes you made make sense, except the timestep size. According to the PR, it is supposed to work... I was not able to detect the issue in the scene. I guess a git bisect would help... |
Contributor
Author
|
The issue regarding the timestep size has been resolved; please review. |
bakpaul
requested changes
Oct 29, 2026
alxbilger
requested changes
Oct 29, 2026
bakpaul
requested changes
Oct 29, 2026
Co-authored-by: Paul Baksic <30337881+bakpaul@users.noreply.github.com>
bakpaul
approved these changes
Nov 5, 2026
alxbilger
approved these changes
Nov 5, 2026
Contributor
|
Thank you for your contribution @lililii124 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6220.
The inverted Stable Neo-Hookean example develops non-finite states. This restores the uniform nodal mass used in #4603, explicitly sets totalMass="1.0", and keeps the original time step of 5e-5. It also separates the inverted grid from the rest topology and makes the force-field topology and fixed-node positions explicit.
Following the review, scene history traced the mass replacement to #4687 (d5e0fdb). On a fixed SOFA 3873f08 runtime, the scene before that change remains finite for 1,000 steps; the scene after it becomes non-finite at step 977. In the latest upstream scene, replacing only MeshMatrixMass with UniformMass changes the result from failure at step 42 to 1,000 finite steps. Historical inputs received plugin/component name migrations and an explicit totalMass="1.0" to preserve the old default. These are scene-history replays and single-component controls, not a compiled historical git bisect.
Adds four material tests for negative-J stress and tangent consistency, including an analytical reflection case. Production material formulas are unchanged.
Validation on Windows Release, double precision:
Scene validation uses a native C++ harness with SOFA's simulation engine and official WriteState/CompareState visitors. The runSofa CLI, upstream Regression_test executable and cross-platform CI were not exercised.
The scene is intentionally kept outside the state regression suite for now, as requested in review. The previously generated references remain available at sofa-framework/Regression#142 for future consideration.
AI assistance was used for implementation, tests and validation. Requested label:
pr: AI-aided.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