embedded3 S2-6: the oblique-wall instrument (tests/embedded3_wall_position_oblique.rs: z-flow / in-plane Poiseuille + Couette linear exactness; gate oblique_wall_position_is_second_order) and the closures it found, host + device, default OFF — the transverse centroid correction (RTX_E3_DIFFUSION_TRANSVERSE=1, wall_order bit 7), the fine distance floor (RTX_E3_DISTANCE_FLOOR=fine, bit 8); kernel geometry factored into cut_cv; DFG 2D-1 x-shift knob (RTX_E3_DFG_SHIFT_X); FLAG_X0 0.6 -> 0.25 in the three flag tests (the flag of every record was detached)
CI / Build (macos-latest) (push) Waiting to run
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 / Format Check (push) Failing after 5s
CI / Clippy Check (push) Failing after 5s
CI / Build (ubuntu-latest) (push) Failing after 4s
Performance Benchmarks / Run Benchmarks (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 6s
Documentation / Build API Documentation (push) Failing after 17s
CI / Build CPU-Only (Explicit) (push) Failing after 57s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-18 16:22:38 -05:00
co-authored by Claude Fable 5.1
parent 9ae0e42dcd
commit e9b2e7887b
12 changed files with 579 additions and 24 deletions
@@ -47,6 +47,10 @@ fn dfg_2d_1_on_the_device() {
let nz = NZ;
let lz = nz as f64 * h;
let t_end = env_f("RTX_E3_DFG_T", 10.0);
// S2-6: the body (and the Δp probes) shifted in x by a fraction of h —
// the lift's grid-registration scatter (a y-shift would change the
// physical lift: the cylinder is 5 mm off the centreline).
let cx = CX + env_f("RTX_E3_DFG_SHIFT_X", 0.0) * h;
// Explicit stability: CFL 0.3 on U_m and half the viscous limit.
let dt = (0.3 * h / U_M).min(0.5 * h * h / (6.0 * NU));
let mut solver = Solver::new(
@@ -81,7 +85,7 @@ fn dfg_2d_1_on_the_device() {
// traction route (S2-1).
solver.set_body(Body::extruded(
rtx_cfd::solvers::incompressible::EmbeddedBody::circle(
CX,
cx,
CY,
0.5 * D + env_f("RTX_E3_DFG_DR", 0.0) * h,
),
@@ -101,8 +105,10 @@ fn dfg_2d_1_on_the_device() {
solver.initialize(&mut field);
let mask_cells = solver.mask().map_or(0, |m| m.fluid_cells());
println!(
" DFG 2D-1 ny {ny}: {nx}×{ny}×{nz} = {} cells ({mask_cells} fluid), h {h:.4e}, dt {dt:.3e}, t_end {t_end}",
g.cells()
" DFG 2D-1 ny {ny}: {nx}×{ny}×{nz} = {} cells ({mask_cells} fluid), h {h:.4e}, dt {dt:.3e}, t_end {t_end}, centre x/h {:.3} y/h {:.3}",
g.cells(),
cx / h,
CY / h
);
let mut device = DeviceStep::new(solver, g);
device.upload(&field);
@@ -138,8 +144,8 @@ fn dfg_2d_1_on_the_device() {
let ci = |x: f64| ((x / h).round() as usize).clamp(2, nx - 2);
let cj = |y: f64| ((y / h).round() as usize).clamp(2, ny - 2);
let bx = (
ci(CX - margin),
ci(CX + margin),
ci(cx - margin),
ci(cx + margin),
cj(CY - 0.15),
cj(CY + 0.15),
0,
@@ -159,10 +165,10 @@ fn dfg_2d_1_on_the_device() {
let (cd_s, cl_s) = (coef * fs.f[0], coef * fs.f[1]);
let zc = 0.5 * lz;
let p_front = mask
.pressure_at(&field.p, CX - 0.5 * D, CY, zc)
.pressure_at(&field.p, cx - 0.5 * D, CY, zc)
.unwrap_or(f64::NAN);
let p_back = mask
.pressure_at(&field.p, CX + 0.5 * D, CY, zc)
.pressure_at(&field.p, cx + 0.5 * D, CY, zc)
.unwrap_or(f64::NAN);
let dp = p_front - p_back;
let (cd, cl, cd_cv, cl_cv) = (coef * fw[0], coef * fw[1], coef * fcv[0], coef * fcv[1]);