[SofaCore] Inf fix topo subset indices#2870
Merged
hugtalbot merged 3 commits intosofa-framework:masterfrom May 13, 2022
Merged
Conversation
e6dc9e9 to
7330cc2
Compare
Contributor
Author
|
[ci-build][with-all-tests] |
7985433 to
7f7d940
Compare
Contributor
Author
|
[ci-build][with-all-tests] |
1 similar comment
Contributor
Author
|
[ci-build][with-all-tests] |
Contributor
Author
|
@hugtalbot any update on your suggestion for the method name? |
… (-1) when passing empty buffer size. Set to Invalid in this case. Update TopologyData to better update this index while adding/removing elements
7f7d940 to
b8abe99
Compare
hugtalbot
reviewed
May 11, 2022
| * By default @sa m_addNewElements is set to false. | ||
| * @param {bool} to change m_addNewElements value. | ||
| */ | ||
| void supportNewElements(bool value) { m_addNewElements = true; } |
Contributor
There was a problem hiding this comment.
Suggested change
| void supportNewElements(bool value) { m_addNewElements = true; } | |
| void supportNewElementsInTopology(bool value) { m_addNewElements = true; } |
Contributor
There was a problem hiding this comment.
Expliciting that we refer to the topology in the name can be very useful since this function is actually used in the components (e.g. FF etc)
Contributor
Author
There was a problem hiding this comment.
supportNewElementsFromTopology ?
as reminder the definition is: "If set to true, new element created in the topology will be added in this subsetData which depends on this topology.
Contributor
There was a problem hiding this comment.
I prefer the shorter version (In) but it's anyway better with the keyword topology
…ddNewTopologyElements. This method is used to allow subsetData to growth follow topological changes
…ot set. Clean remove method from unecessary checks/loops. Better tracking of Data LastElementIndex
b8abe99 to
2c1a226
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this PR is based on #2869
Sevral fixes in
TopologyData/TopologySubsetData/TopologySubsetIndicesTopologyData::m_lastElementIndexwas set to invalid when passing empty buffer size. keep value to 0 in this case.TopologySubSetDataoption isConcerned by addNewelements. This method is used to allow TopologySubsetData to growth following topological changesBy 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