-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SofaConstraint] ADD Data to show constraint forces #840
[SofaConstraint] ADD Data to show constraint forces #840
Conversation
@@ -130,6 +130,8 @@ class SOFA_CONSTRAINT_API GenericConstraintSolver : public ConstraintSolverImpl | |||
Data<int> currentIterations; ///< OUTPUT: current number of constraint groups | |||
Data<double> currentError; ///< OUTPUT: current error | |||
Data<bool> reverseAccumulateOrder; ///< True to accumulate constraints from nodes in reversed order (can be necessary when using multi-mappings or interaction constraints not following the node hierarchy) | |||
Data<helper::vector< double >> constraintForces; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use d_
convention when defining new Data.
See [N5] in https://github.com/sofa-framework/sofa/blob/master/GUIDELINES.md#naming
Congrats for your first PR @zhongkaidefrost ! 👏 |
@zhongkaidefrost thanks for your PR. In the same idea, it would be nice if you could add an inline doxygen comment to your Data. |
The Data constraintForces is used to provide the intensities of constraint forces in the simulation. We use the constraint forces as the approximation of real contact forces. We use this Data to provide contact information for the catheter insertion. The user can easily check the constraint forces from the GenericConstraint component interface. |
…tead of Sofa_test
# Conflicts: # modules/SofaConstraint/GenericConstraintSolver.cpp
The index logic was probably overkilling.
[ci-build] (because of weird CI-failure) |
[ci-build][with-all-tests] |
@damienmarchal Do you still plan to change the variable name? |
I forgot :) EDIT: Done |
…puteConstraintForces So the two related data field matches.
@guparan ready/merge ? |
from comment:
The Data constraintForces is used to expose the intensities of constraint forces in the simulation. We use the constraint forces as the approximation of real contact forces. We use this Data to provide contact information for the catheter insertion. The user can easily check the constraint forces from the GenericConstraint component interface.
This PR:
Reviewers will merge only if all these checks are true.