Repository navigation
The exterior cover's fallback leaves out internal surfaces and refuses shared faces - #1235
Conversation
…s shared faces When All_Boundaries marks no face, Mesh._boundaries_covering_the_exterior_once returned every boundary that marks faces. Those can overlap (an internal patch and its halves) and can include internal surfaces, so a whole-boundary condition could count a face twice or act inside the domain, the two defects #1211 removed for meshes with All_Boundaries. The fallback now leaves out internal surfaces (_boundary_is_internal), and refuses when the rest share a face or when nothing is left. No stock mesh takes the fallback; the tests remove the All_Boundaries stratum to reach it. Underworld development team with AI support from Claude Code
|
Review from the Underworld development team with AI support from Claude Code (H1: review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)) (H1 is the session that reviews pull requests and runs the parallel tests.) VerdictHead 6fbe204: changes requested. What works:
What does not:
Build. The merge base is development 246d6ce (#1211 merged). The only changes since the #1211 head 6f0bfdd are the two ResultsAll five meshes are tested with the
Findings1. Medium: an internal surface on a partition boundary is classified as exterior
2. Medium: the share-faces test segfaults on a rank without Top faces
3. Low: the fallback does not check that the cover coversA cover that misses exterior faces is accepted: on the box with The data for a check is already there. Counting the faces of the exterior label that are not in the cover, with one allreduce, would let the helper refuse this as it refuses overlaps. What was run
Not run: 3-D meshes with an internal surface on a partition boundary; np 4. Underworld development team with AI support from Claude Code |
…st reach every one (review of #1235) _boundary_is_internal read local support sizes, so an internal surface a partition boundary runs along looked exterior on every rank holding it (BoxInternalBoundary at np 2) and entered the cover; the same helper picks the Gamma replacement in _resolve_boundary_normals. It now reads Mesh._exterior_face_mask(), the faces markBoundaryFaces marks, which is the same at any rank count. The fallback cover is also refused when it leaves an exterior face in no boundary, and its stratum reads are guarded on ranks without the value. Underworld development team with AI support from Claude Code
Response to the review (head of this push)1. The internal surface on a partition boundary.
2. The null IS. The fallback's stratum reads are now guarded by 3. Coverage. The fallback now also refuses when the union of the cover leaves an exterior face in no boundary. The ranks decide it with a sum. New test: the box with Left removed too, so Bottom, Top and Right are disjoint and miss Left's faces. Serial runs here:
At np 2 and 3, including the empty-rank case, the reviewer re-checks. Underworld development team with AI support from Claude Code |
|
Review from the Underworld development team with AI support from Claude Code (H1: review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)) Recheck at 6f071f1: ready to merge on green from this review. All three findings of the first review (at 6fbe204) are fixed, and the fix also makes the choice of Gamma on an internal surface independent of the partition. I have no new findings. The PR changes only Items
On development, the sign of ∫Γ_y over Internal flips with the partition (row 6). This is the partition dependence that FindingsNone. Not run
Logs kept by the reviewer. Underworld development team with AI support from Claude Code |
A follow-up to the review of #1211. No issue is filed; the defect was found in that review.
What changes
Mesh._boundaries_covering_the_exterior_once()is the list of boundaries that theEulerianSUPGinflow and theLevelSetSolverfar field put their condition on. WhereAll_Boundariesmarks faces, it isAll_Boundariesalone, as before. WhenAll_Boundariesmarks none, the fallback returned every boundary that marks faces. Those can share faces (an internal patch and its halves, for example) and can include internal surfaces. So a whole-boundary condition could count a face twice, or act inside the domain. Those are the two defects #1211 removed for meshes that haveAll_Boundaries.Now the fallback:
Mesh._boundary_is_internal, which already exists;ValueErrorwhen the remaining boundaries share a face, or when none remain.No stock mesh takes the fallback: the reviewer's survey of 20 stock meshes found
All_Boundariesfaces on every one. The behaviour on every stock mesh is unchanged.Tolerances and coordinate matches
None. Faces are counted as height-1 points of
UW_Boundaries. Internal surfaces are found by support size.Tests
Added to
tests/test_1069_boundary_wrapper_checks_and_replaces.py. Each fixture removes theAll_Boundariesstratum fromUW_Boundaries.BoxInternalBoundary:Internalis left outInternalincluded)The first test guards the ordinary case; the other two fail first.
Serial run on this branch, which is development 246d6ce plus this commit: test_1069, 1055, 1059, 1105 and 0502. 91 passed, 1 skipped (shapely is not installed). Not run in parallel.
_boundary_is_internaland the overlap check each reduce over the ranks.Adversarial review (author's pass)
Parallel rank asymmetry.
_boundary_is_internal, which is collective, for the same boundaries in the same order.Not covered:
No stock mesh reaches this path, so we have not added these checks.
Issue state
No issue is open for this.
Underworld development team with AI support from Claude Code