embedded3 flag wake: RTX_E3_FLAG_PHASES (phases per period) and RTX_E3_FLAG_VTK_FROM (the period the export starts at; 0 = the onset from rest) — 3-digit phase names past 100 files
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
Documentation / Build API Documentation (push) Failing after 5s
CI / Build CPU-Only (Explicit) (push) Failing after 6s
CI / Format Check (push) Failing after 18s
CI / Build (ubuntu-latest) (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 3s
CI / Clippy Check (push) Failing after 41s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m30s

Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
Omar Sobh
2026-09-22 17:24:09 -05:00
co-authored by Claude Fable 5.1
parent f016f0f96f
commit e562bf8663
@@ -388,8 +388,13 @@ fn flag_wake_on_the_device() {
f f
}); });
let vtk_dir = std::env::var("RTX_E3_FLAG_VTK").ok(); let vtk_dir = std::env::var("RTX_E3_FLAG_VTK").ok();
let phases = 32; // `RTX_E3_FLAG_PHASES` phases per period (32); `RTX_E3_FLAG_VTK_FROM` = the period
let last_period_start = t_end - period; // index the export starts at (the last period by default; 0 = the whole onset from
// rest, the viewer's sequence mode of 2026-09-22).
let phases = env_f("RTX_E3_FLAG_PHASES", 32.0) as usize;
let vtk_from = env_f("RTX_E3_FLAG_VTK_FROM", (periods - 1.0).max(0.0)) as f64;
let last_period_start = vtk_from * period;
let total_phases = ((periods - vtk_from) * phases as f64).round() as usize;
let mut next_phase = 0; let mut next_phase = 0;
let mid = nz / 2; let mid = nz / 2;
let slab = if slab_nz > 0 { let slab = if slab_nz > 0 {
@@ -414,7 +419,7 @@ fn flag_wake_on_the_device() {
let sample = (step + 1) % 10 == 0 || step + 1 == steps; let sample = (step + 1) % 10 == 0 || step + 1 == steps;
let phase_due = vtk_dir.is_some() let phase_due = vtk_dir.is_some()
&& t >= last_period_start + next_phase as f64 * period / phases as f64 && t >= last_period_start + next_phase as f64 * period / phases as f64
&& next_phase < phases; && next_phase < total_phases;
if sample || phase_due { if sample || phase_due {
device.download(&mut field); device.download(&mut field);
let solver = &device.solver; let solver = &device.solver;
@@ -506,7 +511,11 @@ fn flag_wake_on_the_device() {
if phase_due { if phase_due {
let tag = if flag_span() >= duct_depth() { "full" } else { "free" }; let tag = if flag_span() >= duct_depth() { "full" } else { "free" };
let path = std::path::Path::new(vtk_dir.as_ref().unwrap()) let path = std::path::Path::new(vtk_dir.as_ref().unwrap())
.join(format!("flag_{tag}_ny{ny}_phase{next_phase:02}.vtk")); .join(if total_phases > 100 {
format!("flag_{tag}_ny{ny}_phase{next_phase:03}.vtk")
} else {
format!("flag_{tag}_ny{ny}_phase{next_phase:02}.vtk")
});
write_vtk(&path, &field, Some(mask)).expect("vtk"); write_vtk(&path, &field, Some(mask)).expect("vtk");
next_phase += 1; next_phase += 1;
} }