Skip to content
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

Calculate quadrant boundary coordinates #335

Merged
merged 8 commits into from
Feb 7, 2025

Conversation

cburstedde
Copy link
Owner

Calculate quadrant boundary coordinates

Proposed changes

Create functions to export any corner coordinates and face or odge midpoint of any valid p4est quadrant. The quadrant must thus be inside the unit tree. The coordinates may or may not be on any boundary of the unit tree.

This is an extension on top of #334. It can help the user create indexing the mesh topology and/or to use hashing to determine the quadrant connectivity.

Previously, coordinates were treated like from the lower left corner of a
quadrant.  Thus, they were not allowed to touch any high face of the unit
tree.  We change this to make coordinates valid on all tree boundaries.  We
also allow coordinates as deep as P4EST_MAXLEVEL (quadrant midpoints).

The idea is to use the coordinates to index any boundary object of a
quadrant, thus any of its corners and face, edge, and volume midpoints.
We had relaxed the requirements on p4est_coordinates_is_valid, thus when
reading a quadrant from a file, use the specific function to verify it.
mkirilin
mkirilin previously approved these changes Jan 30, 2025
src/p4est_bits.c Show resolved Hide resolved
Previously we were generating a root quadrant by calling
p4est_quadrant_set_morton (q, 0, 0), which is less immediate.
@cburstedde cburstedde merged commit 5024034 into develop Feb 7, 2025
28 of 52 checks passed
@cburstedde cburstedde deleted the feature-calc-coordinates branch February 7, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants