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
867 stars 296 forks source link

[Constraint.Lagrangian] Add fixed lagrangian constraint #4646

Open bakpaul opened 3 weeks ago

bakpaul commented 3 weeks ago

Add a lagrangian constraint working the same way as FixedProjectiveConstraint. Added Vec3 and Rigid3 specialization.


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

alxbilger commented 3 weeks ago

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

bakpaul commented 1 week ago

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

bakpaul commented 5 days ago

The difference lies in the fact that the UniformLagrangianConstraint is applied to all the model points. This assumption is important because thank's to this, it is able to use a block optimization when the data iterative is set to false. Here, it wouldn't be possible because we don't have the guaranty that the points ids will be contiguous.

As for the other specialization, what I did was to replicate the two specialization already available for the BilateralLagrangianConstraint. Actually I made sure to factorize as much as possible so that it would be easier for new specialization to pbe implemented. I could add them, but given that they didn't exist for the BilateralLagrangianConstraint, I don't know if they are really useful for anyone.