Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
  • Loading branch information
bakpaul and hugtalbot authored Dec 13, 2024
1 parent 16f36a5 commit d5f426a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class AugmentedLagrangianResponse : public BaseUnilateralContactResponse<TCollis
typedef core::behavior::MechanicalState<DataTypes1> MechanicalState1;
typedef core::behavior::MechanicalState<DataTypes2> MechanicalState2;

Data<double> d_mu; ///< friction parameter
Data<double> d_epsilon; ///< Penalty parameter
Data<SReal> d_mu; ///< friction parameter
Data<SReal> d_epsilon; ///< Penalty parameter

AugmentedLagrangianResponse();
AugmentedLagrangianResponse(CollisionModel1* model1, CollisionModel2* model2, Intersection* intersectionMethod);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ AugmentedLagrangianResponse<TCollisionModel1,TCollisionModel2,ResponseDataTypes>
template < class TCollisionModel1, class TCollisionModel2, class ResponseDataTypes >
AugmentedLagrangianResponse<TCollisionModel1,TCollisionModel2,ResponseDataTypes>::AugmentedLagrangianResponse(CollisionModel1* model1, CollisionModel2* model2, Intersection* intersectionMethod)
: BaseUnilateralContactResponse<TCollisionModel1, TCollisionModel2, constraint::lagrangian::model::AugmentedLagrangianContactParameters, ResponseDataTypes>(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."))
{

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ FrictionContact<TCollisionModel1,TCollisionModel2,ResponseDataTypes>::FrictionCo
template < class TCollisionModel1, class TCollisionModel2, class ResponseDataTypes >
FrictionContact<TCollisionModel1,TCollisionModel2,ResponseDataTypes>::FrictionContact(CollisionModel1* model1, CollisionModel2* model2, Intersection* intersectionMethod)
: BaseUnilateralContactResponse<TCollisionModel1, TCollisionModel2, constraint::lagrangian::model::UnilateralLagrangianContactParameters, ResponseDataTypes>(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)"))
{

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void AugmentedLagrangianConstraint<DataTypes>::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
Expand Down

0 comments on commit d5f426a

Please sign in to comment.