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

[Simulation.Core] Remove usage of ill-used nodeData in MechanicalGetNonDiagonalMassesCountVisitor and MechanicalVDotVisitor #4328

Merged

Conversation

fredroy
Copy link
Contributor

@fredroy fredroy commented Dec 1, 2023

First task of removing(deprecating) the usage of nodeData (noticed in #4327)

Those two visitors are using the pointer nodeData for local computations so It was changed to local (weak) stored pointers.
Not fan of pointers but it does not break API. (a SReal to count is weird btw)


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).

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code labels Dec 1, 2023
@fredroy
Copy link
Contributor Author

fredroy commented Dec 1, 2023

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

@fredroy fredroy force-pushed the remove_usage_nodedata_visitors branch from 09d03e9 to b882c41 Compare December 1, 2023 05:54
Copy link
Contributor

@alxbilger alxbilger left a comment

Choose a reason for hiding this comment

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

I think the counter is SReal only because of the use of nodeData. If you don't use it, I don't see any reason to switch to an integer.

@fredroy
Copy link
Contributor Author

fredroy commented Dec 4, 2023

I think the counter is SReal only because of the use of nodeData. If you don't use it, I don't see any reason to switch to an integer.

To keep the API "non-breaking" 🙊 but I can make it an integer if we dont care ✌️

@alxbilger alxbilger added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Dec 6, 2023
@alxbilger
Copy link
Contributor

Since this visitor is rather recent, and used at only one place. We can consider convert the SReal to an integer even if it's breaking

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Dec 7, 2023
@fredroy fredroy force-pushed the remove_usage_nodedata_visitors branch 3 times, most recently from bb55ac1 to 64634c7 Compare December 12, 2023 05:40
@hugtalbot hugtalbot added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Dec 13, 2023
@fredroy fredroy force-pushed the remove_usage_nodedata_visitors branch from 64634c7 to f046295 Compare December 13, 2023 09:07
@hugtalbot hugtalbot merged commit 9792d3d into sofa-framework:master Dec 13, 2023
10 checks passed
@hugtalbot hugtalbot deleted the remove_usage_nodedata_visitors branch December 13, 2023 14:05
@hugtalbot hugtalbot added pr: backport todo This PR will be backported into the release preceeding its milestone. and removed pr: backport todo This PR will be backported into the release preceeding its milestone. labels Jan 10, 2024
@hugtalbot hugtalbot added this to the v24.06 milestone Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: clean Cleaning the code pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants