Skip to content

mesh: fix transfer_meshtags_to_submesh sentinel collision, close test gaps - #4524

Merged
jhale merged 6 commits into
jhale/mesh-review-wp5-docsfrom
jhale/mesh-review-wp7-test-gaps
Sep 18, 2026
Merged

jhale merged 6 commits into
jhale/mesh-review-wp5-docsfrom
jhale/mesh-review-wp7-test-gaps

Conversation

@jhale

@jhale jhale commented Sep 15, 2026

Copy link
Copy Markdown
Member

Replaces the numeric_limits::max() "unmapped" sentinel in
transfer_meshtags_to_submesh with an explicit found-flag vector: a
legitimate tag value equal to that sentinel was being silently dropped
from the transferred result.

Adds regression tests for three previously-untested paths: a
cells/celltypes length mismatch across ranks in build_dual_graph (the
same MPI-ordering defect class as WP1, now verified not to hang),
create_submesh with zero selected entities on some ranks (previously
only traced by hand, never executed), and the sentinel-collision fix
above.

Left cpp/test/mesh/generation.cpp's commented-out per-row adjacency
checks disabled: re-enabling them exposes a real discrepancy between
build_tet's cell-vertex order and the hand-written expected tables,
but Topology construction reorders cell vertices during distribution
and no ordering contract is documented for connectivity(tdim, 0), so
it's unclear whether this is a build_tet bug or an outdated fixture.
Left as a follow-up rather than guessing.

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com


Stack created with GitHub Stacks CLIGive Feedback 💬

@jhale
jhale added this pull request to stack #4520 September 15, 2026 10:19
@jhale
jhale requested a review from jorgensd September 15, 2026 10:55
Comment thread cpp/test/mesh/generation.cpp Outdated
Comment thread python/test/unit/mesh/test_dual_graph.py Outdated
Comment thread python/test/unit/mesh/test_mesh.py
Comment thread python/test/unit/mesh/test_mesh.py Outdated
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from bac896b to 0093042 Compare September 15, 2026 13:03
@jhale
jhale marked this pull request as ready for review September 15, 2026 13:05
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from 0093042 to 558c6af Compare September 15, 2026 13:12
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from dd66665 to b24d553 Compare September 15, 2026 13:50
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from c5f0e16 to 95b06ed Compare September 15, 2026 13:59
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from 95b06ed to a8f1e6d Compare September 15, 2026 14:22
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from a8f1e6d to 40e3085 Compare September 15, 2026 18:42
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from 40e3085 to 4841df7 Compare September 16, 2026 08:16
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from 4841df7 to 74bc544 Compare September 16, 2026 15:19
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from 74bc544 to 218574d Compare September 17, 2026 06:27
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch 2 times, most recently from 8a8f6ba to d254c5d Compare September 17, 2026 16:39
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from d254c5d to 4b4a5dd Compare September 18, 2026 07:51
jhale and others added 6 commits September 18, 2026 11:40
… gaps

Replaces the numeric_limits<T>::max() "unmapped" sentinel in
transfer_meshtags_to_submesh with an explicit found-flag vector: a
legitimate tag value equal to that sentinel was being silently dropped
from the transferred result.

Adds regression tests for two previously-untested paths: create_submesh
with zero selected entities on some ranks (previously only traced by
hand, never executed), and the sentinel-collision fix above.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Updated docstrings for degenerate rectangle and box tests to clarify error handling across ranks.
Update the test description for clarity.
Removed a regression test for transferring mesh tags that checks if the maximum integer value survives the transfer process. There is no chance that this will be regressed.
@jhale
jhale force-pushed the jhale/mesh-review-wp7-test-gaps branch from 4b4a5dd to c2e3f22 Compare September 18, 2026 09:40
@jhale
jhale added this pull request to the merge queue Sep 18, 2026
An error occurred while trying to automatically change base from jhale/mesh-review-wp5-docs to jhale/mesh-review-wp4-exception-types September 18, 2026 11:12
Merged via the queue into main with commit 00fe68c Sep 18, 2026
22 of 40 checks passed
@jhale
jhale deleted the jhale/mesh-review-wp7-test-gaps branch September 18, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants