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
934 stars 312 forks source link

[Constraint.Lagrangian] Add augmented lagrangians #5003

Open bakpaul opened 2 months ago

bakpaul commented 2 months ago

This PR adds a first implementation of the augmented lagrangian collision (see A Surface-to-Surface Finite Element Algorithm for Large Deformation Frictional Contact).

To do so, because it is very close to the classical Unilateral constraint, I've tried to factorize code by adding a virtualization layer for both the constraints and the associated contact responses (see added class BaseContactLagrangianConstraint and BaseUnilateralContactResponse). It rely on a contact param template which is the only thing that differs in term of data and of course the type of ConstraintResolution used.

An example scene is introduced in the Demo folder, simply copying the falling beam example and replacing the response by the augmented lagrangian one.

There are still one todo for the future, even if this PR is already working on its own : adding the per-contact-point penalty modulation. This should be done by going back to the collision element using the DetectionOutput.elem attribute. This allows to go back to the topology. The only unknown is how to compute the element volume when the colliding topology is mapped to the simulated one.

[ci-depends-on https://github.com/SofaDefrost/ModelOrderReduction/pull/142]


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

bakpaul commented 2 months ago

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

bakpaul commented 2 months ago

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

sofabot commented 2 months ago

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

To unlock the merge button, you must

bakpaul commented 2 months ago

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

sofabot commented 2 months ago

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

To unlock the merge button, you must

sofabot commented 2 months ago

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

To unlock the merge button, you must

sofabot commented 2 months ago

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

To unlock the merge button, you must

bakpaul commented 2 months ago

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

sofabot commented 2 months ago

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

To unlock the merge button, you must

hugtalbot commented 2 months ago

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

sofabot commented 2 months ago

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

To unlock the merge button, you must

sofabot commented 2 months ago

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

To unlock the merge button, you must

sofabot commented 2 months ago

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

To unlock the merge button, you must

sofabot commented 2 weeks ago

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

To unlock the merge button, you must

bakpaul commented 2 weeks ago

Ready to be reviewed !