From d5f426a404486f74a15877b33292c1267240b89b Mon Sep 17 00:00:00 2001 From: Paul Baksic <30337881+bakpaul@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:56:55 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Hugo --- .../collision/response/contact/AugmentedLagrangianResponse.h | 4 ++-- .../response/contact/AugmentedLagrangianResponse.inl | 4 ++-- .../component/collision/response/contact/FrictionContact.inl | 2 +- .../lagrangian/model/AugmentedLagrangianConstraint.inl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/AugmentedLagrangianResponse.h b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/AugmentedLagrangianResponse.h index 052c4d1133f..b52276d55f0 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/AugmentedLagrangianResponse.h +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/AugmentedLagrangianResponse.h @@ -49,8 +49,8 @@ class AugmentedLagrangianResponse : public BaseUnilateralContactResponse MechanicalState1; typedef core::behavior::MechanicalState MechanicalState2; - Data d_mu; ///< friction parameter - Data d_epsilon; ///< Penalty parameter + Data d_mu; ///< friction parameter + Data d_epsilon; ///< Penalty parameter AugmentedLagrangianResponse(); AugmentedLagrangianResponse(CollisionModel1* model1, CollisionModel2* model2, Intersection* intersectionMethod); diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/AugmentedLagrangianResponse.inl b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/AugmentedLagrangianResponse.inl index 131335e65c0..f49fedf5602 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/AugmentedLagrangianResponse.inl +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/AugmentedLagrangianResponse.inl @@ -42,8 +42,8 @@ AugmentedLagrangianResponse template < class TCollisionModel1, class TCollisionModel2, class ResponseDataTypes > AugmentedLagrangianResponse::AugmentedLagrangianResponse(CollisionModel1* model1, CollisionModel2* model2, Intersection* intersectionMethod) : BaseUnilateralContactResponse(model1,model2,intersectionMethod) - , d_mu (initData(&d_mu, 0.0, "mu", "friction coefficient (0 for frictionless contacts)")) - , d_epsilon (initData(&d_epsilon, 0.0, "epsilon", "Penalty parameter. It can be think of as a proportional controller, the lagrange multiplier is augmented by the violation multiplied by this factor at each solving iteration.")) + , d_mu (initData(&d_mu, 0.0, "mu", "Friction coefficient (0 for frictionless contacts)")) + , d_epsilon (initData(&d_epsilon, 0.0, "epsilon", "Penalty parameter. It can be think of as a proportional controller, the Lagrange multiplier is augmented by the violation multiplied by this factor at each solving iteration.")) { } diff --git a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/FrictionContact.inl b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/FrictionContact.inl index 6ee9fe777ed..0d2d1b43cb0 100644 --- a/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/FrictionContact.inl +++ b/Sofa/Component/Collision/Response/Contact/src/sofa/component/collision/response/contact/FrictionContact.inl @@ -42,7 +42,7 @@ FrictionContact::FrictionCo template < class TCollisionModel1, class TCollisionModel2, class ResponseDataTypes > FrictionContact::FrictionContact(CollisionModel1* model1, CollisionModel2* model2, Intersection* intersectionMethod) : BaseUnilateralContactResponse(model1,model2,intersectionMethod) - , d_mu (initData(&d_mu, 0.8, "mu", "friction coefficient (0 for frictionless contacts)")) + , d_mu (initData(&d_mu, 0.8, "mu", "Friction coefficient (0 for frictionless contacts)")) { } diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/AugmentedLagrangianConstraint.inl b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/AugmentedLagrangianConstraint.inl index 77f5c19913a..914c64f6a3a 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/AugmentedLagrangianConstraint.inl +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/AugmentedLagrangianConstraint.inl @@ -59,7 +59,7 @@ void AugmentedLagrangianConstraint::getConstraintResolution(const cor ucrwf->setTolerance(this->customTolerance); resTab[offset] = ucrwf; - // TODO : cette méthode de stockage des forces peu mal fonctionner avec 2 threads quand on utilise l'haptique + // NOTE: this method of storing forces may not work well with 2 threads when using haptics offset += 3; } else