Skip to content

chore(movers): retire superseded interior movers — MMPDE is the mover#371

Open
lmoresi wants to merge 2 commits into
developmentfrom
chore/retire-superseded-movers
Open

chore(movers): retire superseded interior movers — MMPDE is the mover#371
lmoresi wants to merge 2 commits into
developmentfrom
chore/retire-superseded-movers

Conversation

@lmoresi

@lmoresi lmoresi commented Jul 16, 2026

Copy link
Copy Markdown
Member

Closes #346. Closes #353.

Ruling

Maintainer rulings, 2026-07-16: the naming ruling (user-facing names state the capability; algorithm names live in internals/docs) and the retirement ruling — the spring-equilibrium, Monge-Ampère, OT-improvement-step and anisotropic-Winslow interior movers are superseded by the variational MMPDE mover (a scalar metric reproduces their isotropic equidistribution — the isotropic-metric equivalence; a tensor metric clusters and aligns where they could not). Deletion sign-off was given 2026-07-16 (bundling answer), so the retired movers are deleted outright, not deprecated.

BEHAVIOUR CHANGE — stated loudly

smooth_mesh_interior(method=...) now defaults to "mmpde" (was "spring"). This is a sanctioned behaviour change under the retirement ruling. Consequences:

  • Calls that relied on the implicit spring default now run the MMPDE mover (same isotropic equidistribution intent, different iteration path — coordinates will differ in detail).
  • follow_metric(...) now drives the MMPDE mover (with theta=0.5, pure-equidistribution weighting — measurably the tightest setting for its scalar-density envelope contract). Its per-cell rest-size-spring envelope enforcement is gone; the envelope is encoded in the metric itself and is honoured approximately (refinement side tighter than coarsening side, as before).
  • mesh.OT_adapt() / OT_adapt_reset_reference() are retired: OT_adapt is a tombstone raising RuntimeError with the replacement spelled out; the reset-reference helper is deleted.

What was deleted

Item Disposition
meshing/smoothing/spring.py deleted (#346's latent rank-local early-return MPI deadlock dies with it)
meshing/smoothing/monge_ampere.py (MA mover + OT step + its solver wiring) deleted
meshing/smoothing/anisotropic.py (decoupled-Winslow tensor mover) deleted
meshing/_ot_adapt.py deleted; its mover-agnostic boundary-facet / slip primitives (_slip_normals, _boundary_facets, _resolve_slip, _nearest_on_facets_*, _all_boundary_labels) moved to meshing/smoothing/graph.py (still used by the MMPDE mover, mesh.boundary_slip, BoundingSurface)
Dead graph helpers (_min_incident_edge, _cap_step_to_edge_fraction, _backtracked_move, _reweight_displacement_radial_tangential) deleted (only retired movers consumed them)
tests/test_0760_mesh_ot_adapt.py, test_0641 WC-13 spring-shim class, one stale xfail in test_0762 deleted with the machinery they exercised

Error-path contract (tested)

  • Retired method= spellings ("spring", "ma"/"monge-ampere", "ot"/"equidistribute"/"improve", "anisotropic"/"aniso"/"tensor") raise a ValueError naming the retirement and the replacement.
  • strategy= now routes to the mmpde default — fixes smooth_mesh_interior(strategy=...) raises TypeError with spring/MA/OT movers (unconditional resolution_ratio injection) #353 (resolution_ratio injection no longer TypeErrors; mmpde accepts it, advisory). Regression test added.
  • The READ-06 _winslow_* aliases (<1 cycle old, per the brief's rule): _winslow_spring/_winslow_elliptic/_winslow_equidistribute/_winslow_anisotropic are ValueError tombstones; _winslow_mmpde (target survives) keeps the Wave C two-test shim contract — old name → identical result + exactly one DeprecationWarning; new name → zero warnings (both tested).

Style gate / allowlist

scripts/deprecated_pattern_allowlist.txt shrank 69 → 65 lines (removed: _ot_adapt.py hedging-name + except-pass, smoothing/anisotropic.py except-pass, smoothing/monge_ampere.py except-pass). Scanner green, no stale entries.

Gates (strictly serial; amr-dev env)

Gate Base (6ca0e60) This PR
pytest tests/ -m "level_1 and tier_a" 386 passed / 12 skipped / 2 xfailed / 1 xpassed (401 selected) 390 passed / 11 skipped / 1 xfailed (402 selected)
Smoothing batch (0850, 0855, 0641, 0750, 0762) all green (104 tests)
np2 tests/parallel/test_0855_mesh_smoothing_parallel.py 4 passed
Style gate scanner green (69 entries) green (65 entries, none stale)

Count reconciliation (nothing lost unintentionally): −10 OT_adapt tests, −2 spring-shim tests, −1 deleted stale xfail, +14 new retirement/shim/regression tests, +1 previously-xfailed 0750 skip test now passes cleanly (marker removed).

Docs swept: docs/advanced/mesh-adaptation.md, multigrid-preconditioning.md, subsystems/meshing.md, subsystems/mesh-metric-redistribution.md, adaptive-meshing skill; RETIRED banners on the MA/OT design records; CHANGELOG entry.

Underworld development team with AI support from Claude Code

…closes #346, #353)

Maintainer ruling 2026-07-16 (retirement: mmpde superseded spring/MA/OT
via the isotropic-metric equivalence; deletion sign-off given
2026-07-16).

Deleted: smoothing/{spring,monge_ampere,anisotropic}.py, meshing/
_ot_adapt.py, mesh.OT_adapt / OT_adapt_reset_reference (tombstone
raises RuntimeError), tests/test_0760_mesh_ot_adapt.py, the WC-13
spring-shim tests.

BEHAVIOUR CHANGE (sanctioned): smooth_mesh_interior's default method=
is now 'mmpde' (was 'spring'). Retired method spellings raise a clear
ValueError naming the replacement; strategy= now routes to mmpde
(fixes #353's TypeError); #346's latent spring MPI deadlock dies with
the file. follow_metric now drives the MMPDE mover (theta=0.5, pure
equidistribution weighting for its scalar-density contract).

Kept: the graph-Laplacian Jacobi smoother, the MMPDE mover, the Taubin
surface smoother, all metric builders (fault_comb_metric,
fault_metric_tensor, metric_density_from_gradient). Boundary-facet /
slip primitives moved from _ot_adapt.py to smoothing/graph.py.

Style-gate allowlist shrank by the deleted files' four entries;
scanner green with no stale entries.

Gates: serial 'level_1 and tier_a' 390 passed / 11 skipped / 1 xfailed;
smoothing batch green; np2 test_0855 to follow.

Underworld development team with AI support from Claude Code
Copilot AI review requested due to automatic review settings July 16, 2026 09:18

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 reached their quota limit.

…afe follow_metric envelope bound

CI runs tests/test_07*/test_08* by file range without marker filtering,
which caught two unmarked tests (test_0762_bounding_surfaces,
test_0763_boundary_slip_correctness) importing the deleted
meshing._ot_adapt for the relocated slip helpers — repointed to
meshing.smoothing. The follow_metric envelope bound is widened to 1.5x
target: the MMPDE mover's achieved h_min is platform-dependent
(1.27x on macOS, 1.40x on Linux CI at refinement=2); the bound now
catches over-refinement and gross under-refinement, not platform
jitter.

Local CI-mirror batches green: tests/test_07* 314 passed / 2 skipped /
8 xfailed / 1 xpassed; tests/test_08* 408 passed / 10 skipped /
11 xfailed.

Underworld development team with AI support from Claude Code
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.

2 participants