Calling apf::synchronize(Numbering * n, Sharing * shr) with a custom sharing deletes the sharing
Due to the default third argument to
not being exposed in the numbering synchronize:
synchronize(Numbering,Sharing)
Using a custom sharing to synchronize a numbering has the side-effect of deleting the numbering.
should the default value for delete_shr be false? It is automatically set to true if passed-in Sharing* == nullptr
The most straightforward thing to do is expose the bool through the numbering synchronize interface and also have it express a default value of true
I'll do that for now since it shouldn't change the existing behavior of deleting a passed in sharing unless you explicitly add the argument for it not to, though I assume the legacy behaviour is a bug.
added in commit 4e65c1e297d75e8cfaf55db64dbd895255d3e8cc
but this may not be the best way to solve this
switching the default value in synchronizeFieldData<T>() to false might be the better solution, it depends whether the existing behaviour is really a bug or not.
You are absolutely right. I do not know why its default is set to true. I will change delete_shr to "false" in
- synchronizeFieldData
- accumulateFieldData
- synchronize (in apfNumbering.h)
Has this been fixed?
Commit https://github.com/SCOREC/core/commit/4e65c1e297d75e8cfaf55db64dbd895255d3e8cc allows the bug to be avoided, but I don't know if Seegyoung committed the additional changes she commented about.
Is this resolved now?
It looks like I took care of it with commit a57d816.
I think I took care of it on April 4th. However I will take a look again to confirm
Is this fixed now?