sofa icon indicating copy to clipboard operation
sofa copied to clipboard

[Mass,MechanicalLoad] Use enumeration to clarify the code

Open hugtalbot opened this issue 1 year ago • 3 comments

Based on #3927 Needs https://github.com/sofa-framework/sofa/pull/4917 to make all tests pass successfully.

This PR aims at :

  • Use enumeration to clarify the code for initialization methods in ConstantForceField and UniformMass
  • some code cleanings : starting init as Valid, avoid calling isComponentValid while init(), check isComponentValid prior to run-time functions

Diff : https://github.com/hugtalbot/sofa/compare/b7c7293e7e5bd89700f3cf5171678a0b37b2c36c...hugtalbot:9371ffc1731840b2d100eb7deaa754775c98c6c7


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

hugtalbot avatar Aug 13 '24 10:08 hugtalbot

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

fredroy avatar Aug 13 '24 13:08 fredroy

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

hugtalbot avatar Aug 14 '24 18:08 hugtalbot

This change makes all tests using the ConstantForceField fail due to a bug in SingleStateAccessor solved in #4917 . To solve the tests, merge #4917 first and rebase. Then, the PR should be fine

#4917 has been integrated (not rebased due to anterior conflicts) and there are still errors because of No input force has been set. Please define one of both Data: forces or totalForce 🥲

I guess there is an error of logics (if, else, etc) somewhere

fredroy avatar Aug 19 '24 23:08 fredroy