Update adapt vs ref24 cost script for current APIs - #479
Conversation
lmoresi
left a comment
There was a problem hiding this comment.
Adversarial review
Same three findings as #476, and they bite harder here:
- MAJOR — free-slip → no-slip on the upper boundary (in
build()). This script's sole purpose is a cost comparison against a stored ref-24 baseline taken under free-slip with warm starts; the comparison is invalidated, not updated. Useadd_rotated_freeslip_bc(0, "Upper"). - MAJOR —
zero_init_guess=Truein the timed loops: cold-start timings against a warm-start baseline. - MINOR —
deform()double-counts field transfer in the remap timings (it runsremesh_with_field_transferinternally).
Requested changes as on #476. The API updates themselves verified correct.
93c8ada to
5e1e1f9
Compare
|
Thanks , Professor @lmoresi . I restored the intended upper free-slip boundary using add_rotated_freeslip_bc(0, "Upper") and restored warm-start Stokes timing with zero_init_guess=False. I also added a note that Mesh.deform() includes remesh_with_field_transfer internally, so the remap timing includes that transfer cost before the script overwrites fields. Validation:
|
lmoresi
left a comment
There was a problem hiding this comment.
All three findings verified fixed in 5e1e1f9: rotated free-slip restored on Upper with the correct value-first signature (line 57), zero_init_guess=False on the initial/warm/timed solves (76/82/89), and the deform double-transfer note (106-107). Smoke-ran to completion against current development. Thanks for the careful rework.
Underworld development team with AI support from Claude Code
This PR updates scripts/adapt_vs_ref24_cost.py so the cost comparison script runs with the current Underworld3 APIs.
Changes include:
This does not change solver internals.
Validation:
Example local output: