diff --git a/crates/applications/buffer_proto5/src/main.rs b/crates/applications/buffer_proto5/src/main.rs index cd53344..60700db 100644 --- a/crates/applications/buffer_proto5/src/main.rs +++ b/crates/applications/buffer_proto5/src/main.rs @@ -3,13 +3,12 @@ //! search for the conditions which maximize energy transfer from the one core to the other. use coremem::{Driver, mat, meas, SpirvDriver}; -use coremem::geom::{region, Cube, Dilate, Memoize, Meters, Region, Spiral, SwapYZ, Torus, Translate, Wrap}; +use coremem::geom::{region, Cube, Dilate, Memoize, Meters, Spiral, SwapYZ, Torus, Translate, Wrap}; use coremem::mat::{Ferroxcube3R1MH, IsoConductorOr}; use coremem::real::{R32, Real as _}; use coremem::render::CsvRenderer; use coremem::stim::{CurlStimulus, Exp1, Gated, Sinusoid1, TimeVarying as _}; -use coremem::sim::units::{Seconds, Frame, Time as _}; -use coremem::sim::spirv; +use coremem::sim::units::{Seconds, Time as _}; use coremem::util::cache::DiskCache; use log::{error, info, warn}; use serde::{Deserialize, Serialize}; @@ -151,24 +150,43 @@ struct Geometries { wrap2_len: f32, } +/// computed measurements which get written to disk for later, manual (or grep-based) analysis. +/// because we only write these (except for the Debug impl reading them to write to disk), +/// rustc thinks all the fields are dead. #[derive(Clone, Debug, Default)] struct Results { + #[allow(dead_code)] m1_peak: f32, + #[allow(dead_code)] m2_peak: f32, + #[allow(dead_code)] m1_stable: f32, + #[allow(dead_code)] m2_stable: f32, + #[allow(dead_code)] h1_peak: f32, + #[allow(dead_code)] h2_max: f32, + #[allow(dead_code)] h2_min: f32, + #[allow(dead_code)] h1_stable: f32, + #[allow(dead_code)] h2_stable: f32, + #[allow(dead_code)] iset_min: f32, + #[allow(dead_code)] iset_max: f32, + #[allow(dead_code)] icoupling_peak: f32, + #[allow(dead_code)] peak_m_ratio: f32, + #[allow(dead_code)] stable_m_ratio: f32, /// m2_stable divided by m1_peak. i.e. "amplification" + #[allow(dead_code)] m2_stable_m1_peak: f32, + #[allow(dead_code)] t: f32, } @@ -428,8 +446,9 @@ fn run_sim(id: u32, p: Params, g: Geometries) -> Results { )); }; - let add_drive_step = |driver: &mut SpirvDriver, region: &Torus, start: f32, amp: f32| { - add_drive_square_pulse(driver, region, start, 1.0, amp); + // step function: "permanently" increase the current by `amp`. + let _add_drive_step = |driver: &mut SpirvDriver, region: &Torus, start: f32, amp: f32| { + add_drive_square_pulse(driver, region, start, 1.0 /* effectively infinite duration */, amp); }; let add_drive_pulse = |ty: PulseType, driver: &mut SpirvDriver, region: &Torus, start: f32, duration: f32, amp: f32| { diff --git a/crates/applications/multi_core_inverter/src/main.rs b/crates/applications/multi_core_inverter/src/main.rs index ec4da24..66effe7 100644 --- a/crates/applications/multi_core_inverter/src/main.rs +++ b/crates/applications/multi_core_inverter/src/main.rs @@ -39,7 +39,6 @@ use coremem::geom::{Meters, Torus}; use coremem::sim::units::Seconds; use coremem::mat::{Ferroxcube3R1MH, IsoConductorOr, IsomorphicConductor}; -use coremem::spirv; use coremem::{Driver, SpirvDriver}; type Mat = IsoConductorOr; diff --git a/crates/applications/sr_latch/src/main.rs b/crates/applications/sr_latch/src/main.rs index 1916a86..09161c6 100644 --- a/crates/applications/sr_latch/src/main.rs +++ b/crates/applications/sr_latch/src/main.rs @@ -5,7 +5,6 @@ use coremem::{Driver, mat, meas, SpirvDriver}; use coremem::geom::{Meters, Torus}; -use coremem::sim::spirv; use coremem::sim::units::Seconds; use coremem::stim::{CurlStimulus, Sinusoid1, TimeVarying as _};