Repository navigation
Tests: analytic_full sweeps KramerSphericalStokes and flips its smooth-density body force - #1204
Conversation
…y body force #1108 added KramerSphericalStokes to the family but not to this file's SWEEP, and its default (a density sheet at r_int) carries no body force, so the negative control flipped a zero vector. The sweep now covers smooth density and two non-axisymmetric modes (real_orthonormal harmonics, which m > 0 requires), and the flip test flips the smooth-density case. 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 b3fb580: ready to merge on green from this review (a comment, not a GitHub approval).
How it was runThe branch is test-only. It ran against a development install (176958a) with fafbecb's two changed Python files laid over it ( FindingsNo blocking findings.Nit
Confirmed correct
What was run
All runs were pinned to four cores. Not run: macOS. The file has no MPI component, so nothing was run in parallel beyond the xdist workers. Logs kept by the reviewer. Underworld development team with AI support from Claude Code |
Test-only. Two failures on
developmentintests/analytic_full/test_analytic_full_family.py, both fromKramerSphericalStokes, which #1108 added to the analytic family. Found by the parallel review desk.The two failures (on
developmentfafbecb)test_this_file_sweeps_the_whole_family:AssertionError: unswept: {'KramerSphericalStokes'}; stale: set(). Native spherical Kramer Stokes references, gravity kernels and real spherical harmonics #1108 added the family member but not itsSWEEPentry.test_flipping_the_body_force_breaks_the_momentum_balance[KramerSphericalStokes]: "flipping the body force left the momentum residual at 3.175e-14". The defaultdensity="delta"loads the shell with a density sheet atr_int: a stress jump at the sheet, and a body force of zero. Flipping a zero vector changes nothing, so the negative control cannot fail.The change
SWEEP["KramerSphericalStokes"]: smooth density; smooth density withell=3, m=1, k=1; delta density withell=3, m=2, boundary="zero",component="sin". The twom > 0cases usenormalization="real_orthonormal", which the constructor requires for non-axisymmetric modes (the default normalization refuses with "defined only for m=0").FLIP_CASEtable: the defaults, exceptKramerSphericalStokes, which flips its smooth-density case.Why not put it in
FORCE_FREEbesideEllipticalInclusionandFaultedMedium: those are driven by their boundaries and have no body force in any configuration. Kramer has a smooth-density configuration that does carry one, so the negative control can exercise it there instead of excluding the class. The delta default still runs every other gate (momentum, incompressibility, tracelessness, strain-rate consistency) as the first case inCASES.This file is not in CI, deliberately
From the file's own docstring: "Nothing in CI runs this file, and that is deliberate rather than an oversight. Run it before a release, and whenever you touch
underworld3/analytic/or_validation.py." Five solutions (SolC, SolDA, SolH, SolKx, SolKz) cost 565 s of the analytic suite's 1010 s, and CI was already near its 60-minute cap.scripts/test.shselects files by non-recursive globs, so the subdirectory is excluded by construction, and thelevel_2mark keeps it out ofpytest -m "level_1 and tier_a" tests/. That is why #1108 did not catch these.What was run
On a 96-thread Linux workstation (single system image, Intel Xeon Gold 6240R, MPICH), one process, a build of this branch.
developmentfafbecbpython -m pytest tests/analytic_full/on this branchNot run: macOS; anything in parallel (the file is symbolic, with no solve).
Checklist (UW3 Style Charter — docs/developer/UW3_STYLE_CHARTER.md)
level_*andtier_*markers (S8) — test-only; the file keeps its existing markersmaybe_/try_/do_) and no commented-out code (S3, S4).array/mesh.X.coords(S7) — not applicablepixi.toml/pixi.lockor other dependency changes riding in an unrelated PRReviewer: the parallel review desk.
Underworld development team with AI support from Claude Code