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

p4est_search: fix to pass true quadrant #234

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/p4est_search.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ p4est_reorder_recursion (const p4est_local_recursion_t * rec,
is_leaf = 1;
is_same = p4est_quadrant_is_equal (quadrant, q);
if (rec->skip && !is_same) {
quadrant = q;
/* we are asked to optimize by skipping intermediate levels */
is_same = 1;
}
if (is_same) {
Expand All @@ -866,6 +866,9 @@ p4est_reorder_recursion (const p4est_local_recursion_t * rec,
P4EST_ASSERT (offset >= 0 &&
(size_t) offset < tree->quadrants.elem_count);
local_num = tree->quadrants_offset + offset;

/* make sure we pass the leaf itself to subsequent callbacks */
quadrant = q;
}
}
P4EST_ASSERT (!is_same || is_leaf);
Expand Down