Repository navigation
Rotated free slip with an analytic normal, and the free surface, find every owned wall node (#935) - #938
Conversation
… wall node (#935) An analytic or constant normal takes a rank's wall nodes from the facets labelled on that rank, so a rank that owns a wall node whose facets all sit on neighbours gives it no constraint row. Kaiju found it on coarse boxes at np 2 (a corner owned by rank 1 with no facet of either wall beside it), and on the zg95 annulus at np 24-52. tests/parallel/test_1140 checks, at np 2 and 4: - the analytic normal finds the geometric path's wall nodes on every rank; - the fixtures hold an owned wall node that no local facet reaches, so the file can see the defect; - a rotated free-slip solve with the constant wall normals leaves no normal flow at any wall node. Serially, dropping the Top-Left corner from the Top and Left node sets makes this fail with normal flow equal to max |v|. Underworld development team with AI support from Claude Code
…#935) _boundary_velocity_nodes took the analytic path's nodes from the facets labelled on the rank. The geometric path completes its node set through the point-SF scatter that sums the normal (#560); the analytic path now sums a marker through the same scatter, and a node found only that way takes the normal at its coordinate, as a node with one local facet does. Nodes found locally keep their normals bit for bit (test_1018 passes serially). The analytic path is now collective, as the geometric one already was; every caller (build_rotation, fault_mg's coarse levels, the traction readers) reaches it on every rank. rotated-freeslip.md says both normals constrain the same nodes in parallel, and what happened before. Underworld development team with AI support from Claude Code
…w, free surface From the pre-PR review: - the analytic and geometric node sets must be equal, so an analytic path that over-collected (interior seam nodes pinned to the wall normal) fails too; - the power check runs per fixture, so neither fixture can lose its partition case while its other tests pass without seeing the defect; - no normal flow above 1e-13 of max |v|: exactly 0 serially, and the review found the 1e-10 bound blind when only one wall's row at a corner is lost (6.6e-11 to 9.5e-11 serially); - the docstring names no campaign, host or probe outside the repository. New: FreeSurface._surface_node_coords took its vertices from the facets labelled on the rank, as the analytic path did, so every surface row it matches (the mesh deformation, h_inf, the consistent solve's datum) missed a vertex whose facets all sit on neighbours. With the rotated fix alone that vertex gets a constraint row whose datum the free surface never writes on its owner (0). The new test asks for every local vertex on Top; it fails at np 2 until the next commit. Underworld development team with AI support from Claude Code
…935) FreeSurface._surface_node_coords took its vertices from the closures of the surface facets labelled on the rank. A rank can hold a surface vertex whose facets all sit on neighbours, so on its owner that vertex had no row in any surface field matched from these coordinates: the mesh deformation did not move it, and with the rotated fix the consistent solve's constraint row there read a datum the free surface never wrote (0). A marker summed over the point SF through the coordinate DM's local-to-global scatter completes the set; every rank takes part, a rank with no surface facet included. Serially nothing changes but the order, now sorted by point; the plume test (test_1070) passes serially. Underworld development team with AI support from Claude Code
…r the set is complete The facet loop now only collects: the geometric normal sums |f| n_f per node, the analytic path a marker. One cross-rank sum completes either, and the analytic normal is then evaluated once per node. Before, a node found through k local facets took normalize(sum_k normalize(n(x))) and a node found only through the scatter normalize(normalize(n(x))). These agree to the bit for k <= 2, so 2-D is unchanged (test_1018's analytic comparison passes), but they differ by an ulp in 3-D, so a node's normal depended on how many of its facets the rank held. Serially, on a 3-D box with the constant normal (0.3, 0.1, 1) on Top: the same 101 nodes; 14 move by 1 ulp, all on 3 or more facets. - _unit_normal replaces the pasted evaluate-and-normalise in _manifold_velocity_nodes, the sheet datum and here. - _sum_facet_normals_across_ranks is now _sum_node_vectors_across_ranks: it sums markers too. - rotated-freeslip.md: what the analytic path sums, that the traction readers and the dynamic topography field take the same node list, and that the free surface completes its vertex set the same way; no campaign names. Underworld development team with AI support from Claude Code
…measured at On kaiju at np 4 the regular box (cellSize 0.4) holds no owned wall node that only a neighbour's facets reach, so its power check failed there; the unstructured box (0.5) holds one at np 2 and 4, and both at np 2, CI's count. HOLDS_AT records this, and the check skips, with the reason, at a rank count a fixture was not measured to hold the case. Underworld development team with AI support from Claude Code
…all, facets only - Every normal check also runs with the normals as sympy matrices, which the library lambdifies and evaluates at each node's coordinate (as for unit_r), so the lambdified path of a node found only through the scatter is covered. - The free-surface check runs on all four walls, as the rotated checks do, so it keeps its power if a partition moves the case off Top. - _reached_by_local_facets takes facets only: the label also carries vertices. - Wall nodes are picked by exact coordinate; no host name in the comments. Underworld development team with AI support from Claude Code
…F; comments - FreeSurface._surface_node_coords reduces its marker onto each vertex's owner over dm.getPointSF() and broadcasts it back. The coordinate DM's scatter it used depends on that DM's SF, which DMSetPointSF does not propagate; a rebuild that left it stale would bring back the label-local set without an error. - The vertices keep their old order (no sort), so a 3-D surface's x-sorted rows, and the order of the sums over them, are unchanged serially. - rotated_bc: the null-IS comment says a rank with no facet can still return nodes; the essential-corner comment cites #936 and says what the marker keeps. Serially: test_1018, test_1074 and the test_1140 bodies pass. Underworld development team with AI support from Claude Code
Pre-PR adversarial reviewTwo rounds by independent reviewers, each followed by fixes. Round 1 ran on c382bd0, the first fix. Round 2 ran on 30daa32, after round 1's fixes. The reviewers' checks were serial; kaiju ran every parallel case afterwards; the run of the final tip's test file follows as a comment. Round 1 (c382bd0: the analytic path sums a marker across ranks)
Round 2 (30daa32)
Attacks that failed
Issues in this territory
Underworld development team with AI support from Claude Code |
There was a problem hiding this comment.
🔵 Needs a closer look
The partition-sensitive switch to the plex point SF for free-surface membership completion still needs final-commit MPI regression results at np=2 and np=4 before approval.
No open issues 🎉
What changed in this PR
Fixes missing wall nodes in parallel rotated free-slip and free-surface handling for #935. Nodes whose labelled boundary facets exist only on neighbouring ranks are now included, preserving velocity constraints and surface-field updates.
Changes:
- Completes analytic-normal node sets across ranks and centralises normal evaluation.
- Completes free-surface vertex sets through owner reduction and broadcast.
- Adds parallel regression tests and documents the shared-node behaviour.
| File | Description |
|---|---|
tests/parallel/test_1140_rotated_analytic_normal_wall_nodes_parallel.py |
Adds checks for node completeness, fixture validity, wall-normal flow and surface vertices. |
src/underworld3/utilities/rotated_bc.py |
Completes analytic-normal node sets across ranks and extracts a shared normalisation helper. |
src/underworld3/utilities/boundary_flux.py |
Updates a comment to reference the renamed reduction helper. |
src/underworld3/systems/free_surface.py |
Includes surface vertices reached only through neighbouring ranks. |
docs/developer/subsystems/rotated-freeslip.md |
Explains parallel node completion and the affected traction and topography readers. |
Review effort: Balanced
|
Kaiju's run of the final tip, 7621953 (Linux, PETSc 3.25.0, ParMETIS, OMP_NUM_THREADS=1):
On development, both power checks pass. Every analytic-node, no-normal-flow and free-surface case fails, with constant and with sympy normals:
Underworld development team with AI support from Claude Code |
…ned-node-936 #938's branch, which this one was stacked on, is now in development; clean merge. Underworld development team with AI support from Claude Code
The branch had merged #938's branch tip rather than development's merge commit, which left two merge bases; GitHub's merge then reported a conflict in rotated_bc.py. Underworld development team with AI support from Claude Code
Each boundary facet is labelled on one rank, so a rank can own a wall node whose labelled facets all sit on neighbours. Two node lists were built only from the facets labelled on the rank, and both missed such a node:
rotated_bc._boundary_velocity_nodeswith an analytic or constant normal (normal=unit_r, or a tuple). The node got no constraint row and carried normal flow. The geometric normal (normal=None) already completed its set across ranks (Rotated free-slip: the vertex normal is a bisector but assembly is facet-wise, so a kinked boundary with unequal facets leaves the pressure gauge unpinned #560).FreeSurface._surface_node_coords. The vertex had no row on its owner in any surface field matched from these coordinates. The mesh deformation did not move it, and the consistent solve's datum was not written there.The change
_sum_node_vectors_across_ranks, renamed from_sum_facet_normals_across_ranks.build_rotation, fault_mg's coarse levels, the traction readers) reaches it on every rank._unit_normalreplaces three pasted copies of the evaluate-and-normalise step.rotated-freeslip.mdsays that both normals constrain the same nodes in parallel, what happened before, and which readers share the node list.Measured on a production annulus
The zg95 annulus: TAc from checkpoint 20, refinement 5,
normal=unit_ron both walls, np 32, one step (kaiju, Linux, PETSc 3.25.0, ParMETIS).The unconstrained nodes slowed every linear solve and limited the time step. On a same-day control, none of the three missed nodes has a labelled facet on its owner. #935's analysis listed two of them as having one, but those two carry only a vertex label there, so there is no second mechanism.
Tests
tests/parallel/test_1140_rotated_analytic_normal_wall_nodes_parallel.py(level 2, tier B,mpi(min_size=2); CI's MPI phase runs it at np 2). It uses two coarse boxes. On each, at np 2, one rank owns a corner with no facet of either wall beside it (Linux, PETSc 3.25, ParMETIS). It checks four things:HOLDS_AT): both at np 2, and the unstructured box at np 4. The check skips, with the reason, elsewhere.On kaiju:
The round 2 fixes (2d1ab8a, 7621953) were checked serially here; kaiju's np 2 and 4 run of the final test file, and its run against development, follow as a comment.
Closes #935. Left open in this territory:
boundary_normal_tractionreads uninitialised memory at a node that an essential wall constrains.Verdicts are in the review comment.
Underworld development team with AI support from Claude Code