Repository navigation
An internal boundary's seam facet assembles no normal (#1135) - #1212
Conversation
Mesh._assemble_boundary_normal skips a facet that is not exterior (two cells), so an internal boundary assembles no normal in serial. In parallel a facet of an internal boundary on a partition seam has one LOCAL cell and passed as exterior: Internal took a normal on that rank, the facet-slip normal (_slip_normals) saw two boundaries claim the vertices where Internal meets a side, and refused their slide. On a 3-D BoxInternalBoundary under a random cell partition the moved mesh was 5.1e-3 (np 3) to 1.2e-2 (np 6, 8) off serial against a 4.1e-2 move. A facet the point star forest shares between ranks is now skipped (Mesh._seam_points, factored out of _drop_seam_facets, read on every rank before the facet walk). Serial is unchanged. Test: tests/parallel/test_1135_internal_boundary_normal_on_a_seam_parallel.py (Internal assembles a zero normal on every rank; facet slip matches serial to 1e-10 on a random partition). The defect needs three ranks, so test.sh runs the file at np 3 always. 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)) Verdict on head fd52e63: ready to merge on green from this review. The fix is correct, and the seam test cannot drop a real wall facet. With the issue's probe, the PR matches serial to about 1e-12 on every layout tried, including four that fail on development. No blocking or medium findings. There are two nits and one test suggestion below; none of them needs to hold the merge. The probe is the issue's case: a 3-D The PR was built at fd52e63. The development column is the same build with the merge base's (0414d3d) ResultsThe facet-slip rows give max |x_np - x_serial|. The serial move is 4.104e-2 in 3-D, 3.644e-2 on the 2-D box and 2.885e-2 on the annulus. The PR's serial result is bit-identical to development's serial result.
The rand3 rows at np 3 and 4 reproduce the issue's values exactly. Two cases give
FindingsNo blocking or medium findings.
Confirmed correct
What was run
Not run
Logs kept by the reviewer. Underworld development team with AI support from Claude Code |
Fixes #1135. Review: H1 (review and parallel test runs on a 96-thread Linux workstation).
The defect
Mesh._assemble_boundary_normalskips a facet that is not exterior, meaning one with two cells. So an internal boundary assembles no normal in serial: its facets have a cell on each side.In parallel, a facet of an internal boundary that lies on a partition seam has only one local cell, and it passed as exterior. On that rank,
Internalassembled a normal at the vertices of those facets.The facet-slip normal (
smoothing._slip_normals) refuses a vertex that more than one boundary claims. WhereInternalmeets a side of a 3-DBoxInternalBoundary, the vertex was therefore refused its slide normal on some partitions and slid in serial.Measured at (0.25, 0, 0.5):
Internalnormal is 0 in serial and (0, 0, -1) on the owning rank at rand3, np 3;The issue's guess, that a vertex's set of incident labels comes from the rank's local facets, was close. It is the internal label's normal assembly, not the label sets: those were already combined over the sharing ranks.
The fix
A facet that the point star forest shares between ranks is now skipped in the normal assembly. Such a facet is a leaf on this rank, or a root with leaves elsewhere, so it lies between two ranks' cells and is interior.
Mesh._seam_points(), factored out of_drop_seam_facets(Facet-surface slip restores onto the label's facets over all ranks (#1103) #1109), which uses the same test.computeDegreeis collective.Test
tests/parallel/test_1135_internal_boundary_normal_on_a_seam_parallel.py(min_size 2) runs the issue's mesh,BoxInternalBoundary(simplex=True, cellSize=0.25)in 3-D, on a random cell partition with seed 3:test_an_internal_boundary_assembles_no_normal:Internal's assembled normal is zero on every rank, andFront's is still a unit normal.test_facet_slip_matches_serial_on_a_scattered_partition: facet slip with every label slipping (no declared surfaces, H1's probe configuration) matches serial vertex by vertex to 1e-10. The serial baseline is computed byserial_referencein the same environment.The defect needs three ranks: no seed from 1 to 12 gives
Internala normal at np 2. Soscripts/test.shruns this file at np 3 on every run, as it does fortest_1084andtest_0786, as well as in the np 2 batch.Results on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH). This is the largest distance from serial with H1's probe (n_outer 5, serial move 4.104e-2):
The new test:
discretisation_mesh.py: passes at np 2, where the defect doesn't show. Both tests fail at np 3 and np 4:Internalassembles a normal of size 1.0, and 205 of 468 coordinates are off serial by up to 5.1e-3.Neighbours:
test_0056,test_0750, bothtest_0762files,test_0763,test_0764,test_0765,test_0766,test_0768,test_0770,test_0855,test_1082,test_1086,test_1103_facet_slip_matches_serial,test_1188.test_0766files,test_0856,test_1063,test_1064,test_1069_boundary_normal,test_1086,test_1103_split_fault_slip,test_1103_facet_slip_against_serial,test_1135.scripts/check_test_coverage.py: OK.Side findings
rotated_bckeeps the raw PETSc normal for internal boundaries, separately.Underworld development team with AI support from Claude Code