Repository navigation
Stokes.pressure_split: a prescribed interface pressure jump on fitted facets (opt-in, from #1033) - #1116
Conversation
…= q + p_J on fitted facets Cut from #1033 (gthyagi/underworld3 feature/cylindrical-wall-boundaries_sph at 1b74046), unchanged apart from test file numbers: the pressure_split method, utilities/_pressure_split.py, its triangle and tetrahedron tests (1184, 1185; 1099 is taken on development) and the guide page. The jump is prescribed on named, fitted interior facets; nothing here needs to know the shape of a wall. Underworld development team with AI support from Claude Code
…entry and CI line The guide page loses the paragraph on cylindrical_pressure_lifting, which is not part of this change, and gains a note that the split is experimental and is built once from the mesh geometry. The page is linked from the advanced index, and scripts/test.sh gains the batch line for tests 1184 and 1185. Underworld development team with AI support from Claude Code
The split marks interface vertices on ranks that share a vertex and hold none of the interface's facets, through the point SF. No CI run exercised that: the split's tests are serial files. With the exchange skipped, test_1184 passes serially and at two ranks and fails at four (test_incompatible_junction_or_tip_is_rejected[True]). scripts/test.sh now runs test_1184 at four ranks in the parallel phase, as it runs test_1084 at three. Underworld development team with AI support from Claude Code
Re-check of #1116 (H3, second review desk): the pressure split cut out of #1110Verdict: READY at 0be5468 once a moved mesh is refused (one small change, below). The cut and the np 4 run meet the condition from our #1110 review. The cut
The np 4 run
The mesh-move gap: not acceptable silently
Unchanged from #1110, stated in the body
Underworld development team with AI support from Claude Code |
One conflict, in scripts/test.sh: #1114 replaced the per-file batch lines with one line per decade. Development's side is taken, so the batch line for tests 1184 and 1185 is gone (the test_118* decade covers them); the np 4 line for test_1184 in the parallel phase is kept. Underworld development team with AI support from Claude Code
…lit was built Fails before the change that follows: the first solve is silent and returns u = 0, and after mesh.deform the next solve says nothing about the split. Underworld development team with AI support from Claude Code
…it was built pressure_split records the mesh geometry version it was built at, on the solver. The Stokes solve notes, which already carry the formulation warnings, gain one for each split whose version is no longer the mesh's: it names the interfaces and says to build the split again. A warning, not a refusal. Users who never call pressure_split have no record and get no note. Underworld development team with AI support from Claude Code
Re-check of #1116 at 378f7e5From H3, the second review desk, running on a 96-thread Linux workstation (single system image; Intel Xeon Gold 6240R, AVX-512; MPICH). Verdict: READY at 378f7e5, on green CI (one job green and five running when checked). The cutAgainst development, the diff is still the pressure split alone: 7 files, 895 lines added and none removed. Those are the method, The np 4 run
The mesh-move warning
Underworld development team with AI support from Claude Code |
pressure_split came to development in #1116: its module, test and docstring note are taken from development. The guide page keeps development's split text and this branch's section on the circular benchmark. Underworld development team with AI support from Claude Code
Stokes.pressure_splitwrites a prescribed pressure jump across named, fitted interior facets asp = q + p_J, so the solver's continuous pressure never has to represent the discontinuity. It works on triangles and tetrahedra and needs nothing about the shape of any wall. This is @gthyagi's work from #1033, cut out of #1110 on its own as the review there asked.What is added (gthyagi, one commit, authorship kept)
Stokes.pressure_split(jumps=, normals=)andutilities/_pressure_split.py: a DG P1 lift of the jump on the vertex stars of the interface, the regular body force that replaces the sheet load, and the correction to an exterior natural datum.test_1184_general_pressure_split.pyandtest_1185_tetrahedral_pressure_split.py(1099 is taken ondevelopment).developmentis merged at ba68af0; thetest_118*decade line inscripts/test.shcovers both files.docs/advanced/prescribed-pressure-jumps.md.What we changed, and why
test_1184passes serially and at two ranks and fails at four (test_incompatible_junction_or_tip_is_rejected[True], on every rank).scripts/test.shnow runstest_1184at four ranks in the parallel phase, the way it runstest_1084at three. It takes 24 s on the workstation named below.pressure_splitnow records the mesh geometry version on the solver, and the Stokes solve notes (which already carry the formulation warnings) add one for each split built before the geometry last changed, naming its interfaces. It is a warning, not a refusal. The test, written first, fails without it: the first solve is silent and returns u = 0; aftermesh.deformthe next solve warns once.cylindrical_pressure_liftingis gone, since that method is not here), linked from the advanced index, and marked experimental in the page and the docstring.Opt-in
The solver file gains this method and nine lines in the Stokes solve notes for the warning above; no existing line changes. A solver on which
pressure_splitwas never called has no record, so the notes loop does nothing. The module is imported only inside the method.Verification (a 96-thread Linux workstation, single system image, Intel Xeon Gold 6240R, MPICH 5.0.1, PETSc int32; head 378f7e5)
mesh.deformscripts/check_test_coverage.pyKnown gaps
raisefor non-simplex cells sits in a rank-local loop; it cannot be reached, because the mesh-wide check comes first.Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)
level_*andtier_*markers (S8)maybe_/try_/do_) and no commented-out code (S3, S4).array/mesh.X.coords— nowith ....access(...), nomesh.data(S7)pixi.toml/pixi.lockor other dependency changes riding in an unrelated PRUnderworld development team with AI support from Claude Code