Skip to content

[SofaBaseTopology] Fix TopologySubsetData: call to creation/desctruction callback was missing#2374

Merged
epernod merged 2 commits intosofa-framework:masterfrom
epernod:inf_topo_subsetData
Oct 6, 2021
Merged

[SofaBaseTopology] Fix TopologySubsetData: call to creation/desctruction callback was missing#2374
epernod merged 2 commits intosofa-framework:masterfrom
epernod:inf_topo_subsetData

Conversation

@epernod
Copy link
Copy Markdown
Contributor

@epernod epernod commented Oct 1, 2021

Callback call in TopologySubsetData were missing:

  • desctruction callback during Data remove method
  • creation callback during Data add method

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

…on callback method was missing during add/remove process
@epernod epernod added pr: fix Fix a bug pr: status to review To notify reviewers to review this pull-request labels Oct 1, 2021
@epernod epernod added this to the v21.12 milestone Oct 1, 2021
@epernod epernod self-assigned this Oct 1, 2021
@epernod epernod added the pr: fast merge Minor change that can be merged without waiting for the 7 review days label Oct 1, 2021
@epernod
Copy link
Copy Markdown
Contributor Author

epernod commented Oct 4, 2021

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


this->m_topologyHandler->applyCreateFunction(Index(size + i), t, empty_vecint, empty_vecdouble);

if (this->p_onCreationCallback)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it could be the occasion to document (in the header file about the p_onDestructionCallback and p_onCreationCallback

@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 Oct 6, 2021
@epernod epernod merged commit bba60be into sofa-framework:master Oct 6, 2021
@epernod epernod deleted the inf_topo_subsetData branch October 6, 2021 20:20
guparan pushed a commit that referenced this pull request Oct 28, 2021
…2377)

This PR depends on #2374 #2375 and #2376 and should be rebased before review.

- Remove old method `handleTopologyChange`
- Turn d_indices into TopologySubsetIndices, this automatically fix the topological changes update. 
- Fix the use of subset indices combined with topology changes.
- Add callback on endingEvent to update the totalMass/vertexMass
- Fix the center of gravity display when using subset of indices

______________________________________________________

Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
fredroy added a commit to fredroy/sofa that referenced this pull request Nov 8, 2021
…ofa-framework#2377)

This PR depends on sofa-framework#2374 sofa-framework#2375 and sofa-framework#2376 and should be rebased before review.

- Remove old method `handleTopologyChange`
- Turn d_indices into TopologySubsetIndices, this automatically fix the topological changes update. 
- Fix the use of subset indices combined with topology changes.
- Add callback on endingEvent to update the totalMass/vertexMass
- Fix the center of gravity display when using subset of indices

______________________________________________________

Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fast merge Minor change that can be merged without waiting for the 7 review days pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants