common_fixes.jl: update iter_side_data* #9
Merged
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.
These are changes that I needed to be able to use
p4est_iterate()
with a face callback.The substantive change is changing a
quad::Ptr{Cvoid}
to a tuplequad::NTuple{S,Ptr{Cvoid}}
in the definition ofstruct hanging{S}
. This resolved incorrect data I encountered attempting to load these structs, prompting me to poke into the binary representations. The change also seems to correspond with the layout of p4est or p8est'shanging
struct as described here and here, respectively.I made what I think are a couple of other useful fixes, but please check these carefully if merging this PR, as these were mainly motivated by making things consistent between similar definitions in
common_fixes.jl
, not any deep understanding.Note that there is a backwards incompatibility being introduced by replacing what I assume is a copy-paste error in accessing the
hanging{S}
data in by the symbol:user_long
instead of:hanging
.My hope is that these changes will be useful to others in the short term, but I am aware of the open issue #1 - if progress has been made on that front, to allow automatic wrapping of these sorts of structures without the need for
common_fixes.jl
at all, that would of course be exciting!(P.S. Thank you very much for making this wrapper public in the first place - I found it very helpful and will contribute to it as I can)