test(rtx-fsi): RTX_FSI{2,3}_ES stiffness override for the TWIN-2 parameter sweep
Performance Benchmarks / Run Benchmarks (push) Canceled after 0s
CI / Format Check (push) Canceled after 0s
CI / Clippy Check (push) Canceled after 0s
CI / Build (macos-latest) (push) Canceled after 0s
CI / Build (ubuntu-latest) (push) Canceled after 0s
CI / Python Bindings (maturin) (ubuntu-latest) (push) Canceled after 0s
CI / WASM Build + Size Check (push) Canceled after 0s
CI / Distributed Training Tests (push) Canceled after 0s
CI / CI Success (push) Canceled after 0s
Documentation / Build API Documentation (push) Canceled after 0s
Documentation / Build User Guide (push) Canceled after 0s
CI / Test (macos-latest) (push) Canceled after 0s
CI / Test (ubuntu-latest) (push) Canceled after 0s
CI / Build CPU-Only (Explicit) (push) Canceled after 0s
CI / Python Bindings (maturin) (macos-latest) (push) Canceled after 0s

The second knob of the TWIN-2 campaign (omni-cortex
docs/twin2_stiffness_campaign.md): case_from_env now also reads
RTX_{prefix}_ES over the case's benchmark Young's modulus, mirroring
UMEAN exactly — digit-identical with the knob unset (verified in vivo
on BOTH committed defaults against same-day baselines: FSI2 and FSI3
physics lines diff-clean, only compile/wall timings moved), a loud
override line naming the benchmark value and E/E0 when set. The
benchmark-inflow physics-band guard in both turek_hron tests widens to
a benchmark-CASE guard (u_mean AND e_s bit-identical) so no measured
band ever asserts off-benchmark; machinery invariants stay asserted at
every inflow and stiffness.

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01X2GmJXeQ2njUecEKiJZ1G2
This commit is contained in:
Omar Sobh
2026-09-01 20:50:58 -07:00
co-authored by Claude Fable 5
parent c08abbdc4f
commit 045e145962
3 changed files with 37 additions and 18 deletions
@@ -80,12 +80,14 @@ pub const FSI3: BenchmarkCase = BenchmarkCase {
};
/// `RTX_{prefix}_UMEAN` over the case's benchmark inflow — TWIN-1's
/// sweep parameter (`docs/twin_composition_campaign.md` in omni-cortex).
/// Unset, the case comes back unchanged: the same f64 flows and the
/// sweep parameter (`docs/twin_composition_campaign.md` in omni-cortex)
/// — and `RTX_{prefix}_ES` over the case's benchmark Young's modulus —
/// TWIN-2's second parameter (`docs/twin2_stiffness_campaign.md`).
/// Unset, the case comes back unchanged: the same f64s flow and the
/// march is digit-identical by construction (and verified in vivo on
/// both committed defaults). When set, the march's printed rigid-drag
/// reference still names the BENCHMARK value, which only applies at the
/// case's own inflow — the override line below keeps logs honest.
/// case's own inflow — the override lines below keep logs honest.
pub fn case_from_env(prefix: &str, case: BenchmarkCase) -> BenchmarkCase {
let u_mean = env_or(&format!("RTX_{prefix}_UMEAN"), case.u_mean);
if u_mean.to_bits() != case.u_mean.to_bits() {
@@ -96,7 +98,20 @@ pub fn case_from_env(prefix: &str, case: BenchmarkCase) -> BenchmarkCase {
100.0 * u_mean
);
}
BenchmarkCase { u_mean, ..case }
let e_s = env_or(&format!("RTX_{prefix}_ES"), case.e_s);
if e_s.to_bits() != case.e_s.to_bits() {
println!(
" {} e_s OVERRIDDEN to {e_s:.4e} (benchmark {:.4e}; E/E0 = {:.4})",
case.name,
case.e_s,
e_s / case.e_s
);
}
BenchmarkCase {
u_mean,
e_s,
..case
}
}
pub fn circle_sdf(x: f64, y: f64) -> f64 {