diff --git a/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/poisson/device_cg/setup.rs b/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/poisson/device_cg/setup.rs index 94d2798..6d7d87f 100644 --- a/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/poisson/device_cg/setup.rs +++ b/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/poisson/device_cg/setup.rs @@ -1,5 +1,5 @@ //! R6-3: the moving path's Poisson setup on the device (`e3_pset.cu`), -//! behind `RTX_E3_POISSON_DEVICE=1` (default off). From the projection +//! default ON (`RTX_E3_POISSON_DEVICE=0` restores the host setup). From the projection //! tables `DeviceCut` holds (step apertures, open flags, activity, owners, //! the merged cells' CSR) the operator (`Solver::poisson_operator` with //! `merge_small_cells`), the fine level (`Level::new`: activity, masked @@ -81,10 +81,10 @@ fn kernels() -> &'static PsKernels { }) } -/// `RTX_E3_POISSON_DEVICE=1` (default off). +/// Default ON (`RTX_E3_POISSON_DEVICE=0` restores the host setup). #[must_use] pub fn enabled() -> bool { - std::env::var("RTX_E3_POISSON_DEVICE").is_ok_and(|v| v == "1") + !std::env::var("RTX_E3_POISSON_DEVICE").is_ok_and(|v| v == "0") } /// `struct PsGrid` in e3_pset.cu. diff --git a/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/device/cut.rs b/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/device/cut.rs index 63685b9..c72cc6a 100644 --- a/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/device/cut.rs +++ b/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/device/cut.rs @@ -909,7 +909,7 @@ impl DeviceStep { // w, p (fresh cells take their neighbours' pressure) and the // previous velocities (the imposition's source). let mut field = self.host_field.take().unwrap_or_else(|| Field::new(g)); - // R6-3 (`RTX_E3_FIELD_P_ONLY=1`, default off; not under the band + // R6-3 (default ON, `RTX_E3_FIELD_P_ONLY=0` off; not under the band // check, whose references read the whole mirror): the download // waits until the step's rebuild route is known — with the device // classification and imposition the host rebuild reads and writes @@ -1101,7 +1101,7 @@ impl DeviceStep { self.cut.as_ref(), super::poisson_setup::device_grid(&self.solver, g, dt), ) { - // R6-3 (`RTX_E3_POISSON_DEVICE=1`): the operator, level, lists, + // R6-3 (default ON, `RTX_E3_POISSON_DEVICE=0` off): the operator, level, lists, // links, components and export on the device from the step's // projection tables; `RTX_E3_BAND_CHECK=1` hands the host // operator as the reference. @@ -1144,7 +1144,7 @@ impl DeviceStep { smoother: self.solver.params.poisson_smoother, ..MultigridParameters::default() }; - // R6-3 (`RTX_E3_POISSON_DEVICE=1`): a moving body's hierarchy with + // R6-3 (default ON, `RTX_E3_POISSON_DEVICE=0` off): a moving body's hierarchy with // level 0 built on the device; the host build otherwise (or when // the hierarchy would stop at level 0). let device = match (self.solver.is_moving(), self.cut.as_ref()) { diff --git a/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/device/poisson_setup.rs b/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/device/poisson_setup.rs index e236985..6ac442c 100644 --- a/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/device/poisson_setup.rs +++ b/crates/specialized/rtx-cfd/src/solvers/incompressible/embedded3/step/device/poisson_setup.rs @@ -1,5 +1,5 @@ //! R6-3: when the moving path's Poisson setup runs on the device -//! (`RTX_E3_POISSON_DEVICE=1`, default off) and its grid description. +//! (default ON; `RTX_E3_POISSON_DEVICE=0` restores the host) and its grid description. use crate::solvers::incompressible::embedded3::Grid; use crate::solvers::incompressible::embedded3::poisson::device_cg::{ @@ -53,9 +53,9 @@ pub(super) fn device_grid(solver: &Solver, g: Grid, dt: f64) -> Option bool { - std::env::var("RTX_E3_FIELD_P_ONLY").is_ok_and(|v| v == "1") + !std::env::var("RTX_E3_FIELD_P_ONLY").is_ok_and(|v| v == "0") }