diff --git a/crates/specialized/rtx-cfd/src/solvers/incompressible/overset/mod.rs b/crates/specialized/rtx-cfd/src/solvers/incompressible/overset/mod.rs index ca44415..d37eb0e 100644 --- a/crates/specialized/rtx-cfd/src/solvers/incompressible/overset/mod.rs +++ b/crates/specialized/rtx-cfd/src/solvers/incompressible/overset/mod.rs @@ -329,6 +329,14 @@ impl OversetPisoSolver { }) } + /// PERF-2 P2-c: the background pressure solve's inner stop as a + /// multiple of the Schwarz tolerance (the constructor's 0.1; a knob for + /// the band-gated ladder — an accuracy change, never bit-identical). + pub fn set_inner_stop_multiplier(&mut self, multiplier: f64) { + self.background + .set_inner_stop_factor(multiplier * self.params.schwarz_tolerance); + } + /// PERF-2 P2: threads for the background multigrid's red-black maps. pub fn set_poisson_threads(&mut self, threads: usize) { self.background.set_poisson_threads(threads); diff --git a/crates/specialized/rtx-fsi/tests/fsi2_harness/overset.rs b/crates/specialized/rtx-fsi/tests/fsi2_harness/overset.rs index 4347470..7a40330 100644 --- a/crates/specialized/rtx-fsi/tests/fsi2_harness/overset.rs +++ b/crates/specialized/rtx-fsi/tests/fsi2_harness/overset.rs @@ -451,6 +451,18 @@ impl OversetFluid { ..OversetParameters::default() }; let mut solver = OversetPisoSolver::new(background, patch, (nx, ny, h, h), params)?; + // PERF-2 P2-c: `RTX_FSI2O_INNER_STOP=m` — the background Poisson's inner + // stop at m × the Schwarz tolerance (default 0.1; band-gated ladder). + let mut solver = solver; + if let Some(m) = std::env::var("RTX_FSI2O_INNER_STOP") + .ok() + .and_then(|v| v.parse::().ok()) + { + solver.set_inner_stop_multiplier(m); + println!( + " background Poisson inner stop: {m} × the Schwarz tolerance (RTX_FSI2O_INNER_STOP; default 0.1)" + ); + } let mut field = OversetField { background: FlowField::new(nx, ny, h, h)?, patch: patch_field,