example: buffer_proto3: get it to compile (fails at assert_filled_with runtime assertion)
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
//! the conclusion is that denser loops gets the coupling closer to 1:1 (counteracts losses),
|
||||
//! but it likely won't ever achieve amplification.
|
||||
|
||||
use coremem::{Driver, mat, meas, SampleableSim as _, SimState};
|
||||
use coremem::real::R32 as Real;
|
||||
use coremem::geom::{Index, Meters, Torus};
|
||||
use coremem::stim::{CurlStimulus, Sinusoid1, TimeVarying1 as _};
|
||||
use coremem::{Driver, mat, meas, SpirvDriver};
|
||||
use coremem::geom::{Meters, Torus};
|
||||
use coremem::sim::units::Seconds;
|
||||
use coremem::stim::{CurlStimulus, Sinusoid1, TimeVarying as _};
|
||||
|
||||
fn main() {
|
||||
coremem::init_logging();
|
||||
@@ -67,7 +67,7 @@ fn main() {
|
||||
0.8750*rev, 0.9375*rev,
|
||||
];
|
||||
|
||||
let mut define_coupling_region = |angle: f32| -> Torus {
|
||||
let define_coupling_region = |angle: f32| -> Torus {
|
||||
let ferro_center = (ferro1_center + ferro2_center) * 0.5;
|
||||
let tor_center = ferro_center + Meters::new(angle.cos(), angle.sin(), 0.0) * ferro_major;
|
||||
let tor_normal = Meters::new(-angle.sin(), angle.cos(), 0.0);
|
||||
@@ -79,9 +79,9 @@ fn main() {
|
||||
// mu_r=881.33, starting at H=25 to H=75.
|
||||
let ferro_mat = mat::MHPgram::new(25.0, 881.33, 44000.0);
|
||||
// let ferro_mat = mat::db::conductor(drive_conductivity);
|
||||
let wire_mat = mat::db::conductor(drive_conductivity);
|
||||
let wire_mat = mat::IsomorphicConductor::new(drive_conductivity);
|
||||
|
||||
let mut driver: Driver<_> = Driver::new_spirv(Meters::new(width, height, depth), feat_size);
|
||||
let mut driver: SpirvDriver = Driver::new_spirv(Meters::new(width, height, depth), feat_size);
|
||||
driver.set_steps_per_stim(1000);
|
||||
driver.fill_region(&ferro1_region, ferro_mat);
|
||||
driver.fill_region(&ferro2_region, ferro_mat);
|
||||
@@ -163,9 +163,9 @@ fn main() {
|
||||
let _ = std::fs::create_dir_all(&prefix);
|
||||
|
||||
driver.add_state_file(&*format!("{}/state.bc", prefix), 16000);
|
||||
// driver.add_serializer_renderer(&*format!("{}/frame-", prefix), 32000);
|
||||
driver.add_csv_renderer(&*format!("{}/meas.csv", prefix), 200);
|
||||
driver.add_csv_renderer(&*format!("{}/meas-sparse.csv", prefix), 8000);
|
||||
// driver.add_serializer_renderer(&*format!("{}/frame-", prefix), 32000, None);
|
||||
driver.add_csv_renderer(&*format!("{}/meas.csv", prefix), 200, None);
|
||||
driver.add_csv_renderer(&*format!("{}/meas-sparse.csv", prefix), 8000, None);
|
||||
|
||||
driver.step_until(duration);
|
||||
driver.step_until(Seconds(duration));
|
||||
}
|
||||
|
Reference in New Issue
Block a user