-
Notifications
You must be signed in to change notification settings - Fork 120
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
Feature coordinates canonicalize #336
Merged
Merged
Conversation
This file contains 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
This function makes a coordinate tuple and its origin tree index unique by, if on a tree boundary and touching a lower-numbered-tree, returning the lowest-numbered such tree and transforming the coordinates to it.
The function p4est_coordinates_canonicalize is changed to work out-of-place. It takes separate input and output arguments. We begin implementing it based on code of p4est_node_canonicalize.
Reinstate the usual way of including p4est_to_p8est and in the next line the corresponding p4est .c file. We needed to add a static prototype.
While at it, we remove some redundancy between the 2D and 3D files by including common dimension-independent code of the 2D file for 3D.
mkirilin
previously approved these changes
Feb 7, 2025
Thanks for the review! |
e2d714c
to
c49e9c8
Compare
414c3c9
to
082bea2
Compare
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.
Add function to uniquify coordinates at tree boundaries
Add
p4est_connectivity_coordinates_canonicalize
.Proposed changes
Quadrant coordinates are in the tree reference, basically an integer cube from the origin to
P4EST_MAXLEVEL
.At a tree boundary, multiple tree coordinate systems may meet which lead to different coordinates for the same topological point in the mesh. We add a function to impose a canonical convention and transformation of any (coordinate, tree) pair such that it becomes unique across all touching trees.
We add some minor cleanup of documentation and tests along the way.