sofa-framework / sofa

Real-time multi-physics simulation with an emphasis on medical simulation.
https://www.sofa-framework.org
GNU Lesser General Public License v2.1
871 stars 297 forks source link

[Mass] Replace doUpdateInternal by callback: UniformMass #3927

Open hugtalbot opened 11 months ago

hugtalbot commented 11 months ago

In the spirit of #3900 and following #3924, this PR applies the change on the UniformMass.

To be noted, the componentState must be added to trigger the callback (done in addMDx(), addMToMatrix, accFromF and buildMassMatrix)

[ci-depends-on https://github.com/SofaDefrost/SoftRobots/pull/272] [ci-depends-on https://github.com/sofa-framework/Registration/pull/14]


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

hugtalbot commented 11 months ago

only the MeshMatrixMass to go @damienmarchal and .. soon goodbye doUpdateInternal !

hugtalbot commented 11 months ago

trackInternalData to remove

fredroy commented 11 months ago

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

alxbilger commented 1 month ago

only the MeshMatrixMass to go @damienmarchal and .. soon goodbye doUpdateInternal !

I like your definition of "soon" 😆

alxbilger commented 1 month ago

Is this->trackInternalData(d_vertexMass); still necessary? @hugtalbot

hugtalbot commented 1 month ago

Similar feature is merged for the ConstantForceField in #3924. It adds separate callbacks for each data but a hacky flag allows to avoid data cross-dependency by de-activating all inputs non-set at the initialization. It could be done here as well but a more robust implementation (Data, callback) could be found.

Add a unit test to make sure that no data cross-dependency is triggered. Manual test as well.

hugtalbot commented 1 month ago

it seems from the CI that many tests and scene examples are using UniformMass without any input mass info .. :clown_face: :japanese_goblin:

hugtalbot commented 1 month ago

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

hugtalbot commented 1 month ago

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

sofabot commented 1 month ago

[ci-depends-on] detected during build #13.

To unlock the merge button, you must

alxbilger commented 1 month ago

@hugtalbot Could you explain why this PR triggers errors when the mass does define any parameter?

sofabot commented 1 month ago

[ci-depends-on] detected during build #14.

To unlock the merge button, you must

sofabot commented 1 month ago

[ci-depends-on] detected during build #15.

To unlock the merge button, you must

sofabot commented 1 month ago

[ci-depends-on] detected during build #16.

To unlock the merge button, you must

sofabot commented 1 month ago

[ci-depends-on] detected during build #17.

To unlock the merge button, you must

sofabot commented 1 month ago

[ci-depends-on] detected during build #18.

To unlock the merge button, you must

sofabot commented 3 weeks ago

[ci-depends-on] detected during build #19.

All dependencies are merged/closed and all ExternalProject pointers are up-to-date. Congrats! :+1: