embedded3 S2-5: centroid diffusion default ON (RTX_E3_DIFFUSION_CENTROID=0 restores the records); flat_wall_position_is_second_order gate; closure.rs split (cutwall.rs under 700)
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / Format Check (push) Failing after 4s
CI / Clippy Check (push) Failing after 4s
Performance Benchmarks / Run Benchmarks (push) Failing after 5s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build User Guide (push) Successful in 7s
CI / Build CPU-Only (Explicit) (push) Failing after 54s
Documentation / Build API Documentation (push) Failing after 1m0s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-18 12:37:56 -05:00
co-authored by Claude Fable 5.1
parent 37086300ba
commit 99e4a7214b
6 changed files with 178 additions and 136 deletions
@@ -53,10 +53,8 @@ fn offset(ny: usize, theta: f64) -> (f64, Vec<(f64, f64, f64)>) {
for k in 0..=nz {
for j in 0..ny {
for i in 0..nx {
if k < nz || true {
let idx = g.wface(k.min(nz), j, i);
field.w[idx] = exact((j as f64 + 0.5) * h);
}
let idx = g.wface(k, j, i);
field.w[idx] = exact((j as f64 + 0.5) * h);
}
}
}
@@ -100,3 +98,24 @@ fn flat_wall_effective_position() {
}
}
}
/// The gate: with the centroid diffusion (the default) the effective wall
/// position is second order — within 0.08 h at ny 16, halving in units of
/// h at ny 32, the same at every cut fraction (before S2-5: −½θ h at
/// every resolution).
#[test]
fn flat_wall_position_is_second_order() {
if std::env::var("RTX_E3_DIFFUSION_CENTROID").is_ok_and(|v| v == "0") {
return;
}
for theta in [0.25, 0.75] {
let (coarse, _) = offset(16, theta);
let (fine, _) = offset(32, theta);
println!(" θ {theta}: offset {coarse:+.4} h at ny 16, {fine:+.4} h at ny 32");
assert!(coarse.abs() < 0.08, "ny 16 offset {coarse}");
assert!(
fine.abs() < 0.6 * coarse.abs(),
"the offset does not halve: {coarse} → {fine}"
);
}
}