embedded3 S2-2b-ii: DeviceCg::refresh (fine operator per step, hierarchy every K steps, z zeroed before the scatter) + gate test; the flag driver's correctors 3 / inner 1e-3 (residual remedy measured 7.6e-9 on the moving circle); residual study test
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / CI Success (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 / Format Check (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build API Documentation (push) Failing after 6s
Performance Benchmarks / Run Benchmarks (push) Failing after 7s
Documentation / Build User Guide (push) Successful in 6s
CI / Build CPU-Only (Explicit) (push) Failing after 1m8s
CI / Clippy Check (push) Failing after 1m30s
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / CI Success (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 / Format Check (push) Failing after 4s
CI / Build (ubuntu-latest) (push) Failing after 4s
Documentation / Build API Documentation (push) Failing after 6s
Performance Benchmarks / Run Benchmarks (push) Failing after 7s
Documentation / Build User Guide (push) Successful in 6s
CI / Build CPU-Only (Explicit) (push) Failing after 1m8s
CI / Clippy Check (push) Failing after 1m30s
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
fc8d69af29
commit
33de5d0080
@@ -155,6 +155,8 @@ pub struct DeviceStep {
|
||||
initialized: bool,
|
||||
/// A static cut-cell mask's tables (item 9b), when the solver has one.
|
||||
cut: Option<cut::DeviceCut>,
|
||||
/// Steps since the multigrid hierarchy was last rebuilt (moving bodies).
|
||||
steps_since_hierarchy: usize,
|
||||
}
|
||||
|
||||
impl DeviceStep {
|
||||
@@ -210,6 +212,7 @@ impl DeviceStep {
|
||||
timers,
|
||||
initialized: false,
|
||||
cut,
|
||||
steps_since_hierarchy: 0,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -329,7 +329,26 @@ impl DeviceStep {
|
||||
fresh_cells = self.solver.rebuild_moving_mask(&mut field, dt, t_new);
|
||||
self.upload(&field);
|
||||
self.cut = DeviceCut::build(&self.solver, g, Phase::Projection, t_new);
|
||||
self.cg = None;
|
||||
// The operator: refreshed every step, the hierarchy every
|
||||
// `RTX_E3_PRECOND_REFRESH` steps (default 10; 1 = rebuild always).
|
||||
let every: usize = std::env::var("RTX_E3_PRECOND_REFRESH")
|
||||
.ok()
|
||||
.and_then(|v| v.parse().ok())
|
||||
.unwrap_or(10)
|
||||
.max(1);
|
||||
self.steps_since_hierarchy += 1;
|
||||
if self.steps_since_hierarchy >= every || self.cg_dt != dt {
|
||||
self.cg = None;
|
||||
self.steps_since_hierarchy = 0;
|
||||
} else if let Some(cg) = self.cg.as_mut() {
|
||||
let problem = self.solver.poisson_operator(g, dt);
|
||||
let params = MultigridParameters {
|
||||
precision: self.solver.params.poisson_precision,
|
||||
smoother: self.solver.params.poisson_smoother,
|
||||
..MultigridParameters::default()
|
||||
};
|
||||
cg.refresh(&problem, ¶ms);
|
||||
}
|
||||
rt.stream
|
||||
.memcpy_dtod(&self.u, &mut self.u_star)
|
||||
.expect("u*");
|
||||
|
||||
Reference in New Issue
Block a user