Skip to content
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

[Mass] Fix rigid uniform mass #4939

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

bakpaul
Copy link
Contributor

@bakpaul bakpaul commented Aug 26, 2024

Based on #4935

Try to fix the rotation of the inertia matrix

The only relevant commit is e53483c

Some regression tests might break because until now the inertia was wrongly taken into account for rigid with an inertia matrix which is not a homothety.


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

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@bakpaul bakpaul added pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request labels Aug 26, 2024
@bakpaul
Copy link
Contributor Author

bakpaul commented Aug 26, 2024

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

@bakpaul bakpaul marked this pull request as ready for review August 26, 2024 15:21
@bakpaul bakpaul added the pr: based on previous PR PR based on a previous PR, therefore to be merged ONLY subsequently label Aug 26, 2024
@bakpaul
Copy link
Contributor Author

bakpaul commented Sep 3, 2024

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

@@ -408,7 +409,13 @@ void UniformMass<DataTypes>::addMDx ( const core::MechanicalParams*,
m *= typename DataTypes::Real(factor);

for (const auto i : indices)
res[i] += dx[i] * m;
{
if constexpr (std::is_same<defaulttype::Rigid3Types, DataTypes>::value)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add test using trait isRigid

@hugtalbot
Copy link
Contributor

This PR should fix #4936 and #4281, correct @bakpaul ?

@bakpaul
Copy link
Contributor Author

bakpaul commented Sep 30, 2024

Yes !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: based on previous PR PR based on a previous PR, therefore to be merged ONLY subsequently pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants