Skip to content

Facet restore: the side test uses the normal where the nearest point lies, including at corners - #1193

Merged
lmoresi merged 10 commits into
developmentfrom
bugfix/facet-restore-corner-normal
Nov 15, 2026
Merged

lmoresi merged 10 commits into
developmentfrom
bugfix/facet-restore-corner-normal

Conversation

@lmoresi

@lmoresi lmoresi commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Follows #1192 (merged). The integration desk's review of #1192 found the defect; there is no issue, and this body is the report. Review: the parallel review desk.

What changed and why

Mesh.return_coords_to_bounds on a deformed mesh, or on any mesh read from a file, is the facet restore. It finds the nearest point on the boundary facets, and decides whether a query is outside by the sign of (query − nearest point) along an outward normal. The semi-Lagrangian trace-back and swarm advection use it for their departure points and midpoints.

The normal was taken from the wrong facet. It came from the facet whose centroid is nearest the nearest point, not from the facet the search found. At a corner where the two walls' facets differ in length, that is the other wall's facet, so points just outside the mesh were judged inside and left where they were.

The integration desk's case: a 2-D unit box, cell size 0.05, deformed by y → y³. At the top right corner the right wall's facet is 0.143 long and the top wall's 0.050. Of 49 points at x = 1.02 beside the right wall's top facet, 10 were left outside, up to 0.020 below the corner. After: none.

Beyond a corner one facet's normal is not enough either. There the nearest point is the corner vertex, which two or more facets share. The vector from the corner to the query can lie along one wall, square to the other wall's normal. A point at (1.03, 1.0), beyond the corner along the top wall's line, was left there whichever facet's normal was used.

What the side test does now:

  • The nearest-point search returns the facet it found, and the feature of that facet holding the nearest point: its inside, an edge (two vertices), or a vertex. The search decides the feature first, from the signs of the query's offsets from the facet's vertices along its edges (Ericson, Real-Time Collision Detection, 2005, section 5.1.5), and then places the point: the vertex itself, the projection onto that edge, or the projection onto the plane. A query beyond a corner, including one on the line of an edge through it, is in the vertex's region and gets the vertex, with no coordinate comparison. In 2-D the end of a segment is decided the same way. (Added in round 2 of the parallel review.)
  • Inside a facet, the normal is that facet's.
  • At a vertex, it is the angle-weighted sum of the normals of the facets meeting there. On a 3-D edge, it is the sum of the two facets' normals. The sign of (query − nearest point) along this normal is the side of the boundary the query is on, at a convex corner and a reentrant one alike (Bærentzen and Aanæs, IEEE TVCG 11, 2005).
  • A point restored at a corner goes to the vertex, then inward along that normal, so it ends up off both walls.
  • The facets meeting at a vertex are found by their vertices' global numbers, which the facet gather now carries. A facet two ranks both hold is kept once, so it counts once in a corner's normal.
  • The vertex and edge normals are built once per geometry, with the gathered facets, and cached with them under the same collective rebuild (after deform or a direct write to the coordinates). They were rebuilt over the whole boundary on every call. (Added in round 2.)

The 3-D nearest point is now exact in a triangle's edge and vertex regions. The previous search clamped barycentric coordinates and rescaled them, which is not the nearest point there, and could return a point a rounding error off a vertex. Round 1 of this PR identified a vertex by comparing the returned point with the facet's vertices; the parallel review found 7 to 9 of 11,884 outside points beyond a box corner, along an edge's line, that this missed, and which ones depended on the partition. The comparison and its TODO(BUG) are gone: the feature comes from the region test.

The bounding-surface restore (BoundingSurface.restore for a facet surface) calls the same two searches, so its results change where the old search was not the nearest point. On the inputs it gives them (each surface's facets; points within 0.3 of the smallest cell radius of every facet vertex and centroid): an annulus, 380 points, none differ; a spherical shell, 51 of 2,644 differ, by up to 2.6e-4; a 3-D box, 9 of 599, by up to 3.5e-3. On every one of these 60 the new point is nearer the query than the old (by up to 5.4e-3 of the smallest cell radius), and on none farther. There is one search, not a copy, so nothing is retired beyond the approximation.

What a user's run gets now

One process: results change at graded corners and next to vertices. Measured against the previous side test (nearest-centroid normal, otherwise the same restore) on the five meshes of #1192's comparison: random points around and far from each mesh, points on facet vertices and on facet centroids.

mesh points verdict changed (now restored / now left) restored by both, to a different place largest such difference
annulus, moved to 0.9 of its size 4,970 0 / 0 712 5.5e-7 (2.5e-5 of the smallest cell radius)
2-D box, 4 cells a side, y → y² 4,448 75 / 8 505 8.5e-5 (1.4e-3)
2-D box, cell 0.05, y → y³ 4,640 30 / 0 492 7.7e-7 (7.7e-4)
3-D box, cell 0.2, y → y² 5,198 77 / 1 671 6.1e-5 (1.4e-3)
spherical shell, moved to 0.9 5,200 0 / 3 1,633 3.1e-5 (4.0e-4)

Every changed verdict is a correction. The boxes keep their walls straight under the grading, so the truth is exact: inside if every coordinate is in [0, 1].

  • Boxes:
    • All 182 points now restored were outside the box.
    • All 9 points now left were inside it or on a wall.
    • Wrong verdicts against the truth go from 83, 30 and 78 to 0 on the three boxes.
  • Shell:
    • The 3 points now left are inside or on the wall, by points_in_domain.
  • Annulus and shell:
    • What remains wrong against points_in_domain is 10 points on the annulus and 160 on the shell.
    • All of them lie within 1.7e-16 of the boundary (query points placed on facet vertices and centroids).
    • The restore moves them 1e-3 of a cell inward, as before.

The position changes: points restored at a vertex now go inward along the corner's normal, not along one facet's. They move by at most 1.4e-3 of the smallest cell radius.

Cost per call, after round 2. The parallel review measured round 1's fixed cost per call at 2.7 times #1192's (3.6 to 9.7 ms at np 4, 15 to 41 ms at np 8), from rebuilding the corner normals on every call. Measured here: the median of 20 calls of 10 points per rank, the facet cache already built, slowest rank, before (round 1, d625dff) and after (round 2):

mesh boundary facets np 1 np 4 np 6
spherical shell, cell 0.07, moved to 0.9 7,868 33.4 → 4.6 ms 27.7 → 4.7 ms 30.4 → 4.7 ms
3-D box, cell 0.05, y → y² 5,664 8.9 → 4.0 ms 7.0 → 4.5 ms 19.5 → 4.6 ms

np 6, not np 8: the host share for this work is 6 cores. The normals are now built once when the cache is (re)built.

Round 1's comparison against #1192 (best of three, the same 4,000-odd points per mesh, one process). Round 2 does change the per-point cost in 3-D, so this table is round 1's only:

mesh previous this PR
annulus 169 ms 172 ms
2-D box, 4 cells 147 ms 150 ms
2-D box, cell 0.05 160 ms 161 ms
3-D box 425 ms 428 ms
shell 402 ms 408 ms

Per-point cost in 3-D after round 2 (the parallel review's measurement, at bb6b0ea). The exact region test in _nearest_on_facets_3d costs 105 to 133 µs per point against 48 to 62 µs on development (one process, 8 to 128 candidate triangles). A full restore on the spherical shell therefore takes 1.85 times development's time at np 4 (0.68 s against 0.37 s) and 1.56 times at np 8 (3.25 s against 2.08 s). Rebuilding the cached facets and normals costs 2.5 to 3.5 times development's rebuild, once per geometry. This is the price of the exact answer and is accepted for now; the follow-up is to vectorise the region test over points and candidate triangles. The 2-D search is unchanged in cost.

Where a restored point lands. A point outside lands inside the mesh, near its nearest wall: that is the contract. A point beyond a corner that lies on the line of one of the corner's walls to rounding lands 1e-3 of a cell inside the nearest wall and on the other wall's plane, not strictly inside both (the parallel review: 8 of 368 such points on the 2-D box, 8 of 488 on the L-shape, 48 to 60 in 3-D). On the other wall's plane counts as inside, so this meets the contract.

Left: where a tied point lands can depend on the partition. Whether a point is restored does not. Where the nearest point is equidistant from two facets, the search takes the first in the gathered order, and that order follows the partition. The parallel review found, across its partitions, up to 124 points moving by up to 7.1e-4 of a cell, and up to 36 of them (one partition at np 4) strictly inside in one layout and on a wall in another. Breaking the tie by the lowest global facet or vertex number does not cure it: those numbers come from the partition too (dm.getVertexNumbering() numbers each rank's owned vertices in rank order). A partition-independent key would have to come from the geometry (for example the facet's sorted vertex coordinates), which is more than a tie-break line and is not done here. Between the ranks of one run every point is bit-identical.

Parallel: every rank gathers the same facets and vertex numbers, so the answer is the same on every rank. Round 2, a sweep after the parallel review's check 1 on the graded 3-D box (cell 0.2): the 56 boundary vertices on box edges and corners, each offset by 1e-12 to 1e-3 of the smallest cell radius in 46 directions (the 26 lattice directions and 20 random), 10,304 queries of which 6,928 outside. At np 1, 2, 4 and 6: no outside point left outside, no strictly inside point moved, every rank bit-identical. Four outside points land on a wall to rounding (at most 2.8e-17 beyond it), counted as on the wall as in the parallel review; between np 1 and np 6, 12 points differ by at most 6.8e-21. The integration desk's facet-order check from the #1192 review (five random facet orders) gives at most 6 of 5,198 and 21 of 5,200 points differing, by at most 5.6e-17, as on #1192.

Tests

  • tests/test_1193_facet_restore_corner_normal.py (serial, level_1, tier_b), five cases:
    • the integration desk's 49 points beside the graded corner, each landing just inside the right wall;
    • 50 points beyond the 2-D corner, along the diagonal and along each wall's line;
    • 60 points beyond a 3-D box's edge and corner;
    • 300-odd points inside a gmsh L-shape near its reentrant corner, graded there, which must not move;
    • round 2: 96 points beyond each corner of the graded 3-D box along the lines of its three edges, at 1e-12 to 1e-3 of the smallest cell radius (test_points_beyond_a_corner_along_an_edge_line_are_returned_inside).
  • tests/parallel/test_1193_facet_restore_corner_normal_parallel.py (level_1, tier_b): the 2-D and 3-D corner points at np > 1, and (round 2) the same 96 edge-line points (test_points_beyond_a_corner_along_an_edge_line_come_back_inside_on_every_rank). Each must come back inside, and every rank must return the same coordinates, bit for bit.

Failed first on #1192's code (c996762):

  • Serial: 3 of 4 cases failed, with 10 of 49, 10 of 50 and 20 of 60 points left outside. The L-shape case passed, as it should: it guards against the fix moving interior points.
  • Parallel at np 2: both cases failed on both ranks, with 19 of 70 and 20 of 50 left outside.
  • Round 2, on round 1's code (d625dff): the edge-line cases failed, 7 of 96 left outside, serially and on every rank at np 2 and 3.

What was run

what result
the new serial file and #1192's serial file 7 passed
the new parallel file, np 2, 3, 4 2 passed on every rank
#1192's parallel file, np 2, 3, 4 3 passed on every rank
107 serial files that call the restore, deform, the semi-Lagrangian or swarm advection, free surfaces, the bounding surfaces or the nearest-point search (not level_3 and not tier_c, 4 workers) 965 passed, 9 skipped
the 27 parallel files of the same kind, np 2 all 27 exit 0
after merging development (aee3fa6, with #1192), rebuilt: the two serial files; the two parallel files at np 2 and 4 7 passed; 2 and 3 passed on every rank
scripts/check_test_coverage.py all 471 test files reachable
round 2, at 6bc317b: the two serial files (#1193, #1192) 8 passed
round 2: the two parallel files (#1193, #1192), np 2, 3, 4, 5, 6 6 passed on every rank
round 2: 114 serial files that call the restore, deform, the semi-Lagrangian or swarm advection, free surfaces, the bounding surfaces, the movers or the nearest-point search (not level_3 and not tier_c, 4 workers) 1060 passed, 9 skipped
round 2: tests/test_0052_collective_guard_scan.py; scripts/check_deprecated_patterns.py 6 passed; OK
round 2, after merging development (918c4ba), rebuilt (bb6b0ea): the two serial files; the two parallel files at np 2, 4 and 6 8 passed; 6 passed on every rank
round 2: scripts/check_test_coverage.py all 472 test files reachable

What was not run

Above np 6 (round 2) and np 4 (round 1); the 27 parallel neighbour files were run in round 1 only; the parallel review's own probe set (11,884 points) was not rerun here, a sweep after it was; a free-surface or advection run in parallel; the full suite; level_3 and tier_c; macOS.

Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)

  • I have read the Style Charter and followed it over the surrounding code (S2)
  • No drive-by refactors, renames, or "while I was here" cleanups (S9). The 3-D nearest-point search is replaced because the side test needs its region (round 2, asked for by the dev hub); its other caller's changes are measured above.
  • Bug fixes ship the regression test, written first, with level_* and tier_* markers (S8)
  • No hedging names (maybe_ / try_ / do_) and no commented-out code (S3, S4)
  • Every exception swallow states its sanctioned failure mode in a comment (S4): not applicable, none added
  • New data access uses .array / mesh.X.coords, no with ....access(...), no mesh.data (S7). The facet gather's existing read of self.data is unchanged.
  • Parallel safety considered: np 2, 3 and 4 checked; the new gather of vertex numbers is entered by every rank with the facets
  • No mesh entity or rank identified by coordinates (S12). The facets meeting at a corner are matched by global vertex number. No coordinate comparison remains: the feature holding the nearest point comes from the search's region test (round 2).
  • No pixi.toml / pixi.lock or other dependency changes riding in an unrelated PR
  • AI-assisted work carries the attribution line below

Underworld development team with AI support from Claude Code

…ner, and inside a reentrant corner

Underworld development team with AI support from Claude Code
…lies

The side test took its outward normal from the facet whose centroid is nearest
the nearest boundary point. Where the two walls' facets at a corner differ in
length, that is the other wall's facet, and points just outside were left there
(the integration desk's review of #1192: 10 of 49 beside a graded box corner).
The nearest-point search now returns the facet it found. Inside that facet the
normal is the facet's; at a vertex, or a 3-D edge, where several facets meet, it
is their angle-weighted (vertex) or plain (edge) sum, so a point beyond a corner
is also returned inside, off both walls.

Underworld development team with AI support from Claude Code
Underworld development team with AI support from Claude Code
… a nearest point at a vertex is that vertex

The nearest-point search now reports which of the facet's vertices span the
point it found (one: a vertex; two: a 3-D edge), from the same clamped values
that place it, so the side test agrees with the point. The corner normals are
computed for all points at once, which keeps the restore's cost where it was.

Underworld development team with AI support from Claude Code
…umber, each facet once

The gathered facets now carry their vertices' global numbers, and a facet two
ranks both hold is kept once, so a corner's normal counts each facet meeting
there once and no vertex is identified by its coordinates.

Underworld development team with AI support from Claude Code
Underworld development team with AI support from Claude Code
No conflicts.

Underworld development team with AI support from Claude Code
Copilot AI balanced review requested due to automatic review settings November 14, 2026 11:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@lmoresi

lmoresi commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Verdict: READY with conditions at d625dff. Every rank returns the same answer, bit for bit, at points near corners and edges that sit on partition seams. This holds at np 2 to 6, in 2-D and 3-D, on generated, file-built and reloaded meshes. In 2-D every outside point near a corner is restored and no inside point moves. The 4-entry cache refreshes after deform and after a direct write. The issue probes stay fixed at np 1, 2, 4 and 8. The new tests pass serially and at np 2 to 6 under five partitions, and the 17 parallel files pass at np 2 and 4.

The conditions are text, not code:

  1. 3-D corners: the body should state the residual, and it should be tracked as a follow-up (the dev hub's call: an issue, or a fix to the TODO(BUG)).
    • Beyond a 3-D box corner, along the line of one of its edges, 7 to 9 of 11,884 outside points are still left outside, up to 1e-3 of the smallest cell radius.
    • Which points those are depends on the partition.
    • This is the TODO(BUG) in _nearest_on_facets_3d. The exact-vertex match the PR adds does not catch these points. Development leaves 3,262 of the same points outside, so this is not a regression.
  2. The body should give the per-call cost.
    • The fixed cost per call is 2.7 times what it was: 3.6 to 9.7 ms at np 4, and 15 to 41 ms at np 8.
    • The reason is that the corner normals are rebuilt over the whole boundary on every call.
    • Caching them with the facets is optional.

Parallel review of #1193 (follows #1192)

This is the parallel review by H1 (review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)). The integration desk (W1) reviews the code.

What was run.

Check 1: corners and edges on a partition seam

Meshes. Each one reaches the facet restore. The check asserts this on every run.

mesh how built smallest cell radius
2-D box cell 0.05, graded by y → y³ (the PR's case) 1.0e-3
3-D box cell 0.2, graded by y → y² (the PR's case) 4.3e-2
L-shape a gmsh file graded towards its reentrant corner (the PR's test geometry); a file-built mesh, not moved 6.1e-3
2-D and 3-D boxes, reloaded the two graded boxes written with mesh.write at np 1, then reloaded with uw.discretisation.Mesh(file) at each np as above

Base points.

  • every corner, the L-shape's reentrant corner (0.5, 0.5) included;
  • in 3-D, every boundary vertex on a box edge, and the midpoint of every facet edge that lies on a box edge. That gives 8 corners and 108 edge points.

Query points. Each base point is offset by 1e-12, 1e-9, 1e-6 and 1e-3 of the smallest cell radius. The directions:

  • 2-D: every 15° around the full circle, plus ±1° about each wall's line. This covers along each wall's line beyond the corner, the bisector, and the same directions inward (the ± cases).
  • 3-D edges: the same directions, in the plane square to the edge.
  • 3-D corners:
    • the 26 lattice directions: along each edge's line beyond the corner, the face diagonals and the body diagonal;
    • 24 directions tilted by 0.01 off the edge lines;
    • 20 random directions.

What is checked.

  • The answer: every rank queries the same set, in the same order. The results are gathered and compared across ranks, then against np 1 on the same points.
  • The truth: the walls are straight and axis-aligned, so the exact domain is known. A box query is inside if every coordinate is in [0, 1], and a point on a wall counts as inside.
  • Seam count: for each base point, the check counts the ranks that hold boundary facets meeting there, from each rank's own labelled facets.

Branch: between ranks. All 55 parallel runs give bit-identical returned coordinates on every rank, and no point whose in/out differs between ranks.

  • The runs are 5 meshes × 11 layouts: default np 2 and 4; wedge np 2, 3, 4, 5 and 6; rand1 np 4; rand2 np 6; band np 4; emptyband np 4.
  • No strictly inside point moved in any run.
mesh queries base points on a seam (most, layout) ranks at one point (most) outside left in place against np 1
2-D box 512 (368 outside) 4 corners (wedge np 4, rand2 np 6) 2 0 bit-identical in all 11 layouts
2-D box, reloaded 512 4 corners (rand2 np 6)* 2 0 bit-identical in all 11
L-shape 768 (488 outside) 5 corners (rand1 np 4, rand2 np 6); the reentrant corner with wedge np 4 2 0 same in/out; 4 points differ by up to 1.05e-5 (1.7e-3 of the cell radius), in 7 of 11
3-D box 16,064 (11,884 outside) 55 (7 corners, rand2 np 6); all 8 corners with wedge np 4 4 7 or 9 see below
3-D box, reloaded 16,064 55 (rand2 np 6) 4 7 or 9 see below

* The wedge layout put no corner of the reloaded 2-D box on a seam. The random layouts did.

Base (development) on the same points.

3-D: what the branch still gets wrong, and where it depends on the partition.

  • Left outside: 7 of 11,884 outside points at np 1, and 7 or 9 at np 2 to 6.
    • Every one lies beyond a corner, along the line of one of the corner's edges. Examples: (−4.3e-14, 0, 0) beyond (0, 0, 0), and (0, 0, 1 + 4.3e-8) beyond (0, 0, 1).
    • They are up to 4.3e-5 outside (1e-3 of the smallest cell radius).
  • Why:
    • The clamped nearest point comes back a rounding error from the vertex, for example (−3.6e-29, 1.4e-29, 0). So the PR's exact-vertex match misses it.
    • The span then reports an edge whose two facets lie in one face. The normal is that face's, square to the query's offset, so the dot product is exactly 0 and the point reads as inside.
    • This is the TODO(BUG) the PR names, and the exact-vertex match does not reach these points. The PR's own 3-D cases at the corner (1, 1, 1) and the edge x = y = 1 do not hit it.
  • Landing on a wall: a further 75 to 78 outside points beyond a corner or an edge are moved, but onto a wall's plane, exactly or within 1e-15 of it, not 1e-3 of a cell inside. For example, a query beyond the corner (0, 1, 0) in the direction (−1, 0, −1)/√2 goes to (1.2e-30, 1.0, 4.3e-5): it is moved off the face z = 0 but stays on the faces x = 0 and y = 1. These count as inside under the PR's rule. At the same points, development leaves 3,262 outside.
  • Against np 1:
    • in/out differs on 0 to 6 points per layout (rand2 np 6: 6; rand1 np 4 and wedge np 4: 4). All of them are the edge-line points above: one partition leaves the point and another restores it.
    • coordinates differ on 0 to 124 points (most at rand1 np 4), by up to 6.8e-5 (1.6e-3 of the cell radius). Mostly both answers are inside.
    • The cause: the facet order changes with the partition, and the 3-D clamp then takes a different facet on a tie.
  • What this means for the PR's claim: the claim "partition-independent" holds between the ranks of one run. Across partitions it holds only where the nearest point is found exactly.

The global vertex numbers.

  • How they are computed: dm.getVertexNumbering() (DMPlex's global vertex numbering). Each rank numbers its owned vertices in a contiguous block, in rank order. A ghost gets −(owner's number + 1), which the PR decodes.

  • They depend on the partition, as expected. The 2-D box's corners are numbered:

    • [0, 2, 1, 3] at np 1;
    • [236, 109, 365, 366] with wedge np 4;
    • [1, 18, 2, 19] with rand1 np 4.

    A reload with another partition gets other numbers.

  • The restore uses only their equality within one gathered set. The values never set an order. Vertex normals are summed in facet order, and edges are keyed by compressed indices.

  • They are consistent in every run: in all 66 runs of Check 1 (np 1 to 6, all five meshes, including the file-built L-shape and the reloaded boxes), no number had two coordinates and no coordinate had two numbers.

  • One-copy rule: the dedupe keeps one copy of each facet. In the cost runs, the gathered count equals the sum of the ranks' own facets, so no facet was held twice.

Check 2: the 4-entry cache after deform and after a direct write

Setup. This is #1192's check 2 on the annulus (cell size 0.1):

  1. Move the annulus to 0.9 of its size and restore once, which builds the cache.
  2. Change the geometry again: scale, local or translate.
  3. Restore.

Each change is made by deform or by a direct write to mesh.X.coords. Added for this PR: 288 probes at 1 ± 1e-6 and 1 + 1e-9 times every boundary vertex of the new geometry, so every restore goes through a vertex normal.

Branch: all 19 runs pass. These are {deform, write} × {scale, local, translate} × {np 1, np 4, band np 4}, plus local by deform with band at np 8.

  • Every rank holds a 4-entry cache, with 96 facets and one hash.
  • The facets, normals and vertex numbers equal a fresh mesh's in the same order, and differ from those held before the change.
  • The vertex normals built from the cache equal the fresh mesh's, bit for bit, on every rank.
  • The 288 vertex probes and Facet restore: one answer on every rank, from the whole mesh's boundary (#1176) #1192's 8 probes are bit-identical on every rank and to the fresh mesh's restore.
  • Rebuild when only some ranks move: this includes the cases where only 1 of 4 ranks' own coordinates change (local, band np 4) and 2 of 8 (band np 8). It also includes translate, which leaves the coordinate-sum key unchanged on 2 or 3 of 4 ranks.

Check 3: the one-process verdict changes, against a brute-force inside test

Meshes: #1192's five meshes, as in the PR's table:

  • the annulus (cell 0.05, 190 facets) and the spherical shell (cell 0.2, 700 facets), each scaled to 0.9 by deform;
  • 2-D boxes: 4 cells a side with y → y², and cell 0.05 with y → y³;
  • the 3-D box, cell 0.2, y → y².

Points (my own set, seed 1193, 3,832 to 5,295 per mesh):

  • 2,000 around the mesh;
  • 300 up to 30 domain widths away;
  • every facet vertex and facet centroid;
  • 1,500 within 1e-12 to 3e-2 of random facet vertices.

The truth:

  • Boxes: exact.
  • Annulus and shell: the generalized winding number of the oriented boundary facets, with a point within 1e-14 of a facet counted as on the wall. The distance comes from an exact point-to-triangle search.
mesh now restored (truly outside / on / inside) now left (outside / on / inside) wrong verdicts: development, branch restored by both, to a different place; largest move
annulus 0 0 0, 0 730; 2.2e-6 (9.8e-5 of the cell radius)
2-D box, 4 cells 135 (135 / 0 / 0) 2 (0 / 0 / 2) 137, 0 529; 6.0e-5 (1.0e-3)
2-D box, cell 0.05 40 (40 / 0 / 0) 1 (0 / 0 / 1) 41, 0 460; 7.1e-7 (7.1e-4)
3-D box 124 (124 / 0 / 0) 8 (0 / 0 / 8) 132, 0 805; 4.3e-5 (1.0e-3)
shell 0 1 (0 / 1 / 0) 0, 0 1,915; 3.2e-5 (4.7e-4)
  • Now restored: all 299 points on the boxes were truly outside.
  • Now left: all 11 points on the boxes were strictly inside. The 1 point on the shell is on the wall.
  • Restored positions: every point the branch restores lands strictly inside. On development, 461, 531 and 804 restored points on the three boxes landed on or beyond a wall.
  • Positions at vertices move by at most 1.0e-3 of the smallest cell radius, matching the PR's 1.4e-3 bound.
  • Agreement with the PR's numbers: these sets are mine, not the PR's, so the counts differ from its 182 and 9. The direction and the classification agree.
  • What this sample does not reach: the 3-D residual of Check 1 needs points on an edge's line, which a random sample does not hit.

Check 4: cost against #1192 (development aee3fa6)

Setup.

  • Mesh: SphericalShell(radiusOuter=1, radiusInner=0.5), scaled to 0.9 by deform.
  • Timing: maximum over ranks, best of 3.
  • Rebuild: clear the cache, then gather.
  • Restore: every local node, scaled by 1.02 or by 0.98.
cell, np cells facets gathered arrays per rank: dev / branch rebuild: dev / branch restore ×1.02: dev / branch restore ×0.98: dev / branch one point: dev / branch no points: dev / branch
0.06, np 4 82,829 10,882 1.00 / 1.25 MiB 0.031 / 0.037 s 0.364 / 0.428 s 0.369 / 0.432 s 3.6 / 9.7 ms 3.5 / 9.4 ms
0.03, np 8 628,454 42,134 3.86 / 4.82 MiB 0.072 / 0.109 s 2.10 / 2.31 s 2.22 / 2.42 s 15.3 / 41.4 ms 15.0 / 41.1 ms

Memory.

  • The vertex numbers add 25 % to the gathered arrays, which are 4.8 MiB per rank at 628 k cells.
  • No duplicate facets were found: the gathered count equals the sum of the ranks' own facets.
  • Peak resident memory is unchanged across the rebuild, to 1 MiB.

Time.

  • A full restore costs 10 to 18 % more.
  • The fixed cost of a call is 2.7 times what it was, with or without points. On every call, _outward_normals_at_nearest_points runs a unique over all gathered vertex numbers and accumulates angle-weighted normals over every facet. In 3-D it also runs a unique over the facet edges whenever a nearest point lies on an edge.
  • This matters only to a caller that restores small batches many times. Caching the vertex (and edge) normals with the facets, in the same 4-entry cache, would remove it.

Check 5: the issue probes

probe development aee3fa6, np 1 / 2 / 4 / 8 branch, np 1 / 2 / 4 / 8
return_probe.py, by deform and by a direct write: r = 0.95 → 0.90, r = 0.47 untouched correct on every rank correct on every rank
caller_probe.py, interior departure points moved, rotations 0.05, 0.2, 0.4, 0.8 and 1.6 rad 0 at every np and rotation 0 at every np and rotation

Both stay fixed. The branch leaves #1192's fix intact.

Check 6: tests

what result
tests/test_1193_facet_restore_corner_normal.py and tests/test_1176_facet_restore_whole_boundary.py, serial 7 passed
the new serial file on development 3 failed, 1 passed (the L-shape guard), as the PR reports
tests/parallel/test_1193_…_parallel.py with tests/parallel/test_1176_facet_restore_agrees_across_ranks_parallel.py, np 2, 3, 4, 5, 6 5 passed on every rank
the same two files, band np 4; emptyband np 3 and np 4 (a rank with no cells); wedge np 4; rand2 np 6 5 passed on every rank
the new parallel file on development, np 2 2 failed on both ranks
#1192's 17 parallel files (swarm advection, semi-Lagrangian and SUPG history, deform, the movers, remaps after a move), np 2 60 passed, 8 skipped per rank
the same 17 files, np 4 66 passed, 2 skipped per rank

Skips: the same as on #1192:

  • np 2: tests that need 4 ranks, and the multigrid hierarchy case in test_1172;
  • np 4: the hierarchy case only.

What passed

  • Corners and edges on seams: one answer per point on every rank, bit for bit, in 55 parallel runs.
    • Scope: np 2 to 6; corners held by up to 4 ranks; generated, file-built and reloaded meshes; offsets from 1e-12 to 1e-3 of the cell radius.
    • 2-D: identical to np 1, bit for bit, on the boxes. On the L-shape the in/out matches np 1, and positions differ by at most 1.7e-3 of a cell.
    • Verdicts: no outside point is left in 2-D, and no inside point moves anywhere.
  • The global vertex numbers: consistent in every run, including a file-built mesh and reloads. They differ by partition, and the restore does not depend on their values.
  • The 4-entry cache: after deform or a direct write, every rank holds the new facets, normals, vertex numbers and vertex normals, equal to a fresh mesh's, including when only some ranks moved.
  • One-process changes: every changed verdict is a correction on five meshes. Wrong verdicts go from 41, 137 and 132 to 0 on the three boxes.
  • The issue probes, the PR's tests and Facet restore: one answer on every rank, from the whole mesh's boundary (#1176) #1192's tests: all pass.

Not run

  • More than 8 ranks, and machines other than the one above.
  • A free-surface or advection run in parallel at a cornered boundary.
  • The PR's exact point set: Check 3 used an independent set.
  • The full suite, level_3 and tier_c.
  • A non-simplicial mesh, and a mesh without All_Boundaries.
  • A reentrant corner in 3-D.

Underworld development team with AI support from Claude Code

…inside (the parallel review of #1193)

Fails at d625dff: 7 of 96 left outside, serial and on every rank at np 2 and 3.

Underworld development team with AI support from Claude Code
…pologically; corner normals built once per geometry

_nearest_on_facets_3d now decides which region of a triangle holds the
nearest point (a vertex, an edge or the inside) from the signs of the
point's offsets from the vertices along the edges, then takes that
vertex, the projection onto that edge, or the projection onto the plane.
A point beyond a corner along an edge's line is in the vertex's region
and gets the vertex itself, so the side test uses the vertex normal; the
clamp it replaces could return a point a rounding error off the vertex.
_nearest_on_facets_2d decides an end the same way. The coordinate match
for the vertex and its TODO(BUG) are gone.

The vertex and edge normals are built with the gathered facets and
cached with them, under the same collective rebuild, instead of on every
call (the parallel review of #1193).

Underworld development team with AI support from Claude Code
No conflicts.

Underworld development team with AI support from Claude Code
@lmoresi

lmoresi commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

The parallel review desk's two points, fixed in this PR as the dev hub asked, at bb6b0ea (fix 6bc317b, tests 5f37ef7, development 918c4ba merged in):

  1. 3-D residual beyond a corner along an edge's line. _nearest_on_facets_3d now decides the region of the triangle holding the nearest point (a vertex, an edge, or the inside) from the signs of the query's offsets from the vertices along the edges, then places the point in that region. A query beyond a corner along an edge's line is in the vertex's region and gets the vertex itself; the side test then uses the vertex normal. The coordinate comparison and its TODO(BUG) are removed; _nearest_on_facets_2d decides a segment's end the same way.
    • Test: test_points_beyond_a_corner_along_an_edge_line_are_returned_inside (serial) and test_points_beyond_a_corner_along_an_edge_line_come_back_inside_on_every_rank (parallel): 96 points beyond each corner of the graded cube along its edges' lines, 1e-12 to 1e-3 of the smallest cell radius. Failed first at d625dff, 7 of 96 left outside serially and on every rank at np 2 and 3. Now 0 left outside at np 1 to 6, bit-identical across ranks.
    • A wider sweep after your check 1 (56 edge and corner vertices × 46 directions × 4 offsets, 6,928 of 10,304 outside): 0 left outside and 0 strictly inside moved at np 1, 2, 4, 6. Four land on a wall to rounding (at most 2.8e-17 beyond it), which your check counts as on the wall.
    • The bounding-surface restore calls the same search. It is one function, not a copy: where it changes, the new point is nearer the query (60 of 3,623 points on a shell and a 3-D box; none farther). Numbers in the body.
  2. Cost. The vertex and edge normals are built with the gathered facets and cached with them, under the same collective rebuild. Median per call, 10 points per rank, cache built, slowest rank: shell (7,868 facets) 27.7 → 4.7 ms at np 4, 30.4 → 4.7 ms at np 6; 3-D box (5,664 facets) 7.0 → 4.5 ms at np 4, 19.5 → 4.6 ms at np 6. np 6, not 8, within this host share. Table in the body.

Also run: 114 neighbouring serial files 1060 passed, 9 skipped; #1192's tests serially and at np 2 to 6; guard scan 6 passed; coverage all 472 reachable. Note for the integration desk's probe: the facet cache is still four entries, but the fourth is now the corner normals, not the vertex numbers.

Please re-check these two points.

Underworld development team with AI support from Claude Code

@lmoresi

lmoresi commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Verdict: READY with conditions at bb6b0ea. Both round-1 conditions are met in code:

  • No outside point is left outside in any of the 66 runs of Check 1. Round 1 left 7 to 9 in 3-D.
  • The fixed cost per call is back to development's: 3.7 ms against 3.7 ms at np 4, and 15.5 ms against 15.5 ms at np 8. Round 1 took 9.7 and 41.4 ms.

Every rank still returns the same answer, bit for bit. The cached corner normals are rebuilt after deform and after a direct write on every rank, including when only some ranks moved. The issue probes stay fixed, and every test passes.

The conditions are text, not code:

  1. The body's claim that round 2 leaves the per-point cost unchanged is wrong for 3-D, and should be replaced by the measured cost.
    • A full restore on the shell now takes 1.85 times development's time at np 4 (0.681 s against 0.369 s) and 1.56 times at np 8 (3.25 s against 2.08 s). In round 1 it was 1.16 and 1.11 times.
    • The cause is the region test in _nearest_on_facets_3d. On its own it costs 2.1 times the clamped search per point.
    • Every caller that restores many points pays this, for example the semi-Lagrangian trace-back and swarm advection on a moved 3-D mesh. Whether to make it faster before merging is the dev hub's call.
  2. The body should state where a restored point can now land. A point beyond a corner, lying on the line of one of the corner's walls to rounding, is now moved 1e-3 of a cell inside the nearest wall and stays on the other wall's plane. Round 1 moved it 7.1e-4 of a cell off both walls.
    • In 2-D this happens to 8 of 368 outside points on the graded box and 8 of 488 on the L-shape. Round 1 had none.
    • On some random partitions only 4 of the 8 land on the wall. The facet order decides it, so the position, not the verdict, depends on the partition. Details under Check 1.
    • This is the nearest-facet restore working as written, not an outside point left outside.

Re-check of #1193 after round 2 (follows the parallel review at d625dff)

This is the re-check by H1 (review and parallel test runs on a 96-thread Linux workstation (Intel Xeon Gold 6240R, AVX-512; MPICH)). It repeats the parallel review's checks 1, 2, 4 and 5 and its tests, with the same scripts, meshes, partitions and query points.

What was run.

  • Head arm: bb6b0ea, which merges development 918c4ba (with Units contract: evaluate refuses mixed units and far points; Stokes fields carry units (#771, #904, #881, #786, #844, #1001) #1182) into round 2 (fix 6bc317b, tests 5f37ef7).
  • Build: development changed a compiled file (petsc_generic_snes_solvers.pyx) after round 1's build, so the head was built from scratch, and the compiled solver extension was confirmed freshly built. Every installed .py file matches the head.
  • Development arm: the head's build, with development 918c4ba's versions of the PR's two changed source files (discretisation_mesh.py and meshing/smoothing/graph.py) laid over it. The head and 918c4ba differ only in those two files and the two test files.
  • Run limits and partitions:
    • Every run used at most 8 ranks, pinned to 8 cores, and every parallel run went through the MPI supervisor.
    • The partitions are round 1's: the default, band, emptyband (the last rank holds no cells), rand1, rand2 and wedge (angular wedges that put box corners, the 3-D box's vertical edges and the L-shape's reentrant corner on seams).
  • Script changes:
    • The cache's fourth entry is now the corner normals, not the vertex numbers, so check 2 now compares the cached corner normals with a fresh mesh's.
    • Check 1 now also counts outside points that land exactly on a wall plane, and verdict differences against np 1.
  • Logs are kept by the reviewer.

Round-1 condition 1: the 3-D residual

round 1 (d625dff) round 2 (bb6b0ea)
3-D outside points left in place (of 11,884), np 1 / np 2 to 6 7 / 7 or 9 0 / 0
moved exactly onto a wall plane 75 to 78 48 to 60
moved to within 1e-15 beyond a wall plane 17 6 to 18 (at most 2.3e-18 beyond)
restore or not, differing from np 1 0 to 6 points per layout 0 in every layout
coordinates differing from np 1 0 to 124 points, up to 6.8e-5 (1.6e-3 of the cell radius) 0 to 124 points, up to 3.1e-5 (7.1e-4 of the cell radius)

Met.

  • No outside point is left in place on the 3-D box or the reloaded 3-D box in any layout, including the edge-line points round 1 found.
  • Whether a point is restored no longer depends on the partition.
  • Where points land, at np 1:
    • 74 outside points end on a wall plane or within 2.3e-18 beyond one. Of these, 44 were also on a wall in round 1. The other 30 were 7.1e-4 of a cell inside in round 1.
    • 58 points that round 1 left outside or put on a wall now land strictly inside. These include round 1's 7 left outside.
  • Across partitions: where a point lands still depends on the facet order on a tie. Up to 124 points move by up to 7.1e-4 of a cell, and up to 36 of them (rand1 np 4) are strictly inside in one layout and on a wall in another.

Round-1 condition 2: the fixed cost per call

Check 4 used SphericalShell(radiusOuter=1, radiusInner=0.5), scaled to 0.9 by deform, timed as the maximum over ranks, best of 3. The development arm is 918c4ba (#1192's restore).

cell, np facets gathered rebuild: dev / round 1 / round 2 restore ×1.02: dev / round 1 / round 2 restore ×0.98: dev / round 1 / round 2 one point: dev / round 1 / round 2 no points: dev / round 1 / round 2
0.06, np 4 (82,829 cells) 10,882 0.029 / 0.037 / 0.072 s 0.369 / 0.428 / 0.681 s 0.373 / 0.432 / 0.688 s 3.7 / 9.7 / 3.7 ms 3.5 / 9.4 / 3.5 ms
0.03, np 8 (628,454 cells) 42,134 0.072 / 0.109 / 0.255 s 2.08 / 2.31 / 3.25 s 2.18 / 2.42 / 3.37 s 15.5 / 41.4 / 15.5 ms 15.2 / 41.1 / 15.1 ms

The round-1 columns are from the round-1 record, measured against development aee3fa6. The development numbers for 918c4ba agree with aee3fa6's to within 2 % for the restore and 8 % for the rebuild.

  • The fixed cost: met. One point and no points cost what development costs, to 0.1 ms. The PR's own measurement (33 → 4.6 ms on 7,868 facets) agrees in direction.

  • Rebuild:

    • The corner normals are now built with the facets, which makes a rebuild 2.5 to 3.5 times development's: 72 ms at np 4 and 255 ms at np 8.
    • A rebuild happens once per geometry.
    • The cached arrays are 2.0 MiB per rank at np 4 and 7.7 MiB at np 8 (development: 1.0 and 3.9). Peak resident memory is unchanged across the rebuild, to 1 MiB.
  • The full restore: slower, and this is the new condition 1.

    • It takes 1.85 times development's time at np 4 and 1.56 times at np 8.
    • The cause is in the search, not the normals, which are cached. On random triangles, one process, the head's _nearest_on_facets_3d takes 105 to 133 µs per point against 48 to 62 µs on development and 50 to 64 µs on round 1, for 8 to 128 candidate triangles.

    The PR body says round 2 does not change the per-point cost. That holds in 2-D, not in 3-D.

Check 1 again: corners and edges on a partition seam (55 parallel runs, plus np 1)

The meshes, base points, offsets (1e-12 to 1e-3 of the smallest cell radius) and directions are round 1's. The runs are 5 meshes × 11 layouts: default np 2 and 4; wedge np 2 to 6; rand1 np 4; rand2 np 6; band np 4; emptyband np 4.

mesh queries (outside) between ranks outside left strictly inside moved outside landing on a wall (exact / within 2.3e-18) against np 1
2-D box 512 (368) bit-identical, all 11 0 0 8 / 0; 4 / 0 with rand1 np 4 and rand2 np 6 same restore verdicts; bit-identical in 9 layouts; with rand1 and rand2, 4 points differ by 7.1e-7 (7.1e-4 of the cell radius)
2-D box, reloaded 512 (368) bit-identical, all 11 0 0 as above as above
L-shape 768 (488) bit-identical, all 11 0 0 8 / 0; 4 / 0 with rand1 and rand2 same restore verdicts; 4 to 8 points differ by up to 1.05e-5 (1.7e-3 of the cell radius), in 8 of 11 layouts (round 1: 4 points, in 7 of 11)
3-D box 16,064 (11,884) bit-identical, all 11 0 0 52 to 60 / 6 to 18 see condition 1 above
3-D box, reloaded 16,064 (11,884) bit-identical, all 11 0 0 48 to 60 / 6 to 18 as for the 3-D box. In one layout (wedge np 3) 3 points differ only by 1.1e-16
  • Seams: up to 4 ranks hold facets at one base point. All 8 corners of the 3-D box are on seams with rand1 np 4, and 7 with rand2 np 6. All 4 corners of the 2-D box are on seams with wedge np 4 and rand2 np 6.
  • Global vertex numbers: consistent in all 60 runs. No number has two coordinates and no coordinate has two numbers.

The 2-D points that now land on a wall.

  • Which points: in both 2-D meshes, they are the queries beyond the corner (0, 0) in the direction 180° (along the bottom wall's line, outward), and beyond the corner (0, 1) in the direction 90° (along the left wall's line, outward), at all four offsets.
    • In floating point these directions are not exactly along the wall: cos 90° and sin 180° are 6e-17 and 1.2e-16. So a query at 1e-3 of a cell is (−1.0e-6, +1.2e-22): outside the left wall, and 1.2e-22 on the inside of the bottom wall's line.
    • They are truly outside points. Before the restore they lie on the other wall's line to within 1.2e-16 of their offset.
  • What the search does:
    • The left wall's segment: the query's projection is inside the segment, 1.2e-22 above the corner, so the region test correctly reports the inside of that segment. The projected point then rounds to the corner (0, 0) exactly.
    • The bottom wall's segment: it reports the corner as its vertex region.
    • The tie: the two candidates are at the same distance, and the first in facet order wins.
  • Where the point goes:
    • When the left wall's segment wins (every layout but rand1 and rand2): the point moves along that wall's normal to (1.0e-6, 0). That is exactly 1e-3 of a cell inside the left wall, and exactly on the bottom wall's line.
    • When the corner wins (4 of the 8 points, under rand1 and rand2): the point moves along the corner's normal, 7.1e-4 of a cell off both walls, as every point did in round 1.
    • Round 1: it compared coordinates, saw the corner, and always took the corner's normal.
  • Is this a regression in the restore's contract?
    • The contract is met. The restore's contract is to move an outside point to 1e-3 of the smallest cell radius inside the nearest boundary facet, and that step is there in full: 1e-3 of a cell along the nearest wall's normal. The exact nearest point is (0, 1.2e-22) on the left wall, so an exact-arithmetic restore would put the point 1.2e-22 above the bottom wall's line, which is on that line to rounding. A point on a wall counts as inside under the PR's rule, and round 1 accepted 75 to 78 such points in 3-D.
    • What is lost: compared with round 1, the 7.1e-4 of a cell clearance from the second wall.
    • What changed: in 2-D, on these two meshes, where such points land now depends on the partition (4 points). The restore verdict does not.
    • Not affected: queries exactly on a wall's line beyond a corner, which are in the vertex region of both segments.
  • The 3-D landings are the same kind. The query lies on one face's plane, or within rounding of it, and is moved 1e-3 of a cell inside the other face only.

Check 2: the cache after deform and after a direct write (19 runs)

The runs are round 1's: {deform, write} × {scale, local, translate} × {np 1, np 4, band np 4}, plus local by deform with band at np 8, on the annulus (cell 0.1), after a first move to 0.9 of its size. All 19 pass:

  • Every rank holds a 4-entry cache with the same hash.
  • The facets equal a fresh mesh's, as a set and in order, and differ from those held before the change.
  • The corner normals: the vertices, vertex normals and edge arrays are rebuilt as a new object.
    • They equal a fresh mesh's corner normals bit for bit, in order, on every rank.
    • They differ from those held before the change.
    • Their vertices are the facets' vertices.
  • The 288 probes at 1 ± 1e-6 and 1 + 1e-9 times every boundary vertex, and Facet restore: one answer on every rank, from the whole mesh's boundary (#1176) #1192's 8 probes, are bit-identical on every rank and equal the fresh mesh's restore.
  • Rebuild when only some ranks move: this includes local with band np 4, where only 1 of 4 ranks' own coordinates change, and with band np 8, where 2 of 8 change. It also includes translate, which leaves the coordinate-sum key unchanged on 2 of 4 ranks (band) or 3 of 4 (default).

The annulus is 2-D, so check 2 does not exercise the cached edge normals after a move.

Check 5: the issue probes

probe development 918c4ba, np 1 / 2 / 4 / 8 head bb6b0ea, np 1 / 2 / 4 / 8
return_probe.py, by deform and by a direct write: r = 0.95 → 0.90, r = 0.47 untouched correct on every rank correct on every rank
caller_probe.py, interior departure points moved, rotations 0.05, 0.2, 0.4, 0.8 and 1.6 rad 0 at every np and rotation 0 at every np and rotation

Tests

what result
tests/test_1193_facet_restore_corner_normal.py and tests/test_1176_facet_restore_whole_boundary.py, serial 8 passed
the new serial file on development 4 failed, 1 passed (the L-shape guard), as the PR reports. The new edge-line case is among the 4
tests/parallel/test_1193_…_parallel.py with tests/parallel/test_1176_facet_restore_agrees_across_ranks_parallel.py, np 2, 3, 4, 5, 6 6 passed on every rank
the same two files, band np 4; emptyband np 3 and np 4 (a rank with no cells); wedge np 4; rand2 np 6 6 passed on every rank
the new parallel file on development, np 2 3 failed on both ranks
#1192's 17 parallel files (swarm advection, semi-Lagrangian and SUPG history, deform, the movers, remaps after a move, #1176's multigrid transfer), np 2 60 passed, 8 skipped per rank
the same 17 files, np 4 66 passed, 2 skipped per rank

The pass and skip counts are the same as round 1's. Nothing failed, so nothing needed checking against development for #1182.

Not run

  • Check 3 (the one-process verdict changes against a brute-force inside test) was not repeated.
  • The change to the bounding-surface restore, which now uses the same search, was not checked independently.
  • The cached 3-D edge normals after a move. Check 2 runs on a 2-D mesh.
  • More than 8 ranks, and machines other than the one above.
  • A free-surface or advection run in parallel at a cornered boundary.
  • The full suite, level_3 and tier_c.
  • A non-simplicial mesh, a mesh without All_Boundaries, and a reentrant corner in 3-D.

Underworld development team with AI support from Claude Code

@lmoresi

lmoresi commented Nov 15, 2026

Copy link
Copy Markdown
Member Author

Round 3, body only (head unchanged, bb6b0ea):

  1. Cost: the body now gives the parallel review's 3-D numbers (region test 105 to 133 µs per point against 48 to 62; shell restore 1.85 times development at np 4, 0.68 s against 0.37 s, and 1.56 times at np 8; rebuild 2.5 to 3.5 times, once per geometry) and names vectorising the region test as the follow-up. Round 1's table is marked as round 1's.
  2. Landing: the body states where a point beyond a corner, on the other wall's line to rounding, lands (1e-3 of a cell inside the nearest wall, on the other wall's plane; 8 of 368, 8 of 488, 48 to 60 in 3-D) and that this meets the contract.
  3. Tie-break: not done. The global facet and vertex numbers come from the partition (dm.getVertexNumbering() numbers owned vertices in rank order), so the lowest number would not make the landing partition-independent. A geometric key would; that is more than a tie-break line, so the body states the partition-dependent landing (verdicts unaffected, bit-identical between ranks of one run) and leaves it.

No code changed.

Underworld development team with AI support from Claude Code

@lmoresi
lmoresi merged commit fafbecb into development Nov 15, 2026
10 checks passed
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.

3 participants