clean up some unused code/imports
This commit is contained in:
@@ -3,13 +3,12 @@
|
|||||||
//! search for the conditions which maximize energy transfer from the one core to the other.
|
//! search for the conditions which maximize energy transfer from the one core to the other.
|
||||||
|
|
||||||
use coremem::{Driver, mat, meas, SpirvDriver};
|
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::mat::{Ferroxcube3R1MH, IsoConductorOr};
|
||||||
use coremem::real::{R32, Real as _};
|
use coremem::real::{R32, Real as _};
|
||||||
use coremem::render::CsvRenderer;
|
use coremem::render::CsvRenderer;
|
||||||
use coremem::stim::{CurlStimulus, Exp1, Gated, Sinusoid1, TimeVarying as _};
|
use coremem::stim::{CurlStimulus, Exp1, Gated, Sinusoid1, TimeVarying as _};
|
||||||
use coremem::sim::units::{Seconds, Frame, Time as _};
|
use coremem::sim::units::{Seconds, Time as _};
|
||||||
use coremem::sim::spirv;
|
|
||||||
use coremem::util::cache::DiskCache;
|
use coremem::util::cache::DiskCache;
|
||||||
use log::{error, info, warn};
|
use log::{error, info, warn};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
@@ -151,24 +150,43 @@ struct Geometries {
|
|||||||
wrap2_len: f32,
|
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)]
|
#[derive(Clone, Debug, Default)]
|
||||||
struct Results {
|
struct Results {
|
||||||
|
#[allow(dead_code)]
|
||||||
m1_peak: f32,
|
m1_peak: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
m2_peak: f32,
|
m2_peak: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
m1_stable: f32,
|
m1_stable: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
m2_stable: f32,
|
m2_stable: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
h1_peak: f32,
|
h1_peak: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
h2_max: f32,
|
h2_max: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
h2_min: f32,
|
h2_min: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
h1_stable: f32,
|
h1_stable: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
h2_stable: f32,
|
h2_stable: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
iset_min: f32,
|
iset_min: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
iset_max: f32,
|
iset_max: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
icoupling_peak: f32,
|
icoupling_peak: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
peak_m_ratio: f32,
|
peak_m_ratio: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
stable_m_ratio: f32,
|
stable_m_ratio: f32,
|
||||||
/// m2_stable divided by m1_peak. i.e. "amplification"
|
/// m2_stable divided by m1_peak. i.e. "amplification"
|
||||||
|
#[allow(dead_code)]
|
||||||
m2_stable_m1_peak: f32,
|
m2_stable_m1_peak: f32,
|
||||||
|
#[allow(dead_code)]
|
||||||
t: f32,
|
t: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -428,8 +446,9 @@ fn run_sim(id: u32, p: Params, g: Geometries) -> Results {
|
|||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
let add_drive_step = |driver: &mut SpirvDriver<Mat>, region: &Torus, start: f32, amp: f32| {
|
// step function: "permanently" increase the current by `amp`.
|
||||||
add_drive_square_pulse(driver, region, start, 1.0, amp);
|
let _add_drive_step = |driver: &mut SpirvDriver<Mat>, 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<Mat>, region: &Torus, start: f32, duration: f32, amp: f32| {
|
let add_drive_pulse = |ty: PulseType, driver: &mut SpirvDriver<Mat>, region: &Torus, start: f32, duration: f32, amp: f32| {
|
||||||
|
@@ -39,7 +39,6 @@
|
|||||||
use coremem::geom::{Meters, Torus};
|
use coremem::geom::{Meters, Torus};
|
||||||
use coremem::sim::units::Seconds;
|
use coremem::sim::units::Seconds;
|
||||||
use coremem::mat::{Ferroxcube3R1MH, IsoConductorOr, IsomorphicConductor};
|
use coremem::mat::{Ferroxcube3R1MH, IsoConductorOr, IsomorphicConductor};
|
||||||
use coremem::spirv;
|
|
||||||
use coremem::{Driver, SpirvDriver};
|
use coremem::{Driver, SpirvDriver};
|
||||||
|
|
||||||
type Mat = IsoConductorOr<f32, Ferroxcube3R1MH>;
|
type Mat = IsoConductorOr<f32, Ferroxcube3R1MH>;
|
||||||
|
@@ -5,7 +5,6 @@
|
|||||||
|
|
||||||
use coremem::{Driver, mat, meas, SpirvDriver};
|
use coremem::{Driver, mat, meas, SpirvDriver};
|
||||||
use coremem::geom::{Meters, Torus};
|
use coremem::geom::{Meters, Torus};
|
||||||
use coremem::sim::spirv;
|
|
||||||
use coremem::sim::units::Seconds;
|
use coremem::sim::units::Seconds;
|
||||||
use coremem::stim::{CurlStimulus, Sinusoid1, TimeVarying as _};
|
use coremem::stim::{CurlStimulus, Sinusoid1, TimeVarying as _};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user