driver: rename new_with_state -> new

This commit is contained in:
2022-07-28 01:59:11 -07:00
parent a6fb21d892
commit fe47eb09f8
7 changed files with 15 additions and 17 deletions

View File

@@ -390,7 +390,7 @@ fn run_sim(id: u32, p: Params, g: Geometries) -> Results {
p.clock_type,
);
let mut driver = Driver::new_with_state(SpirvSim::<f32, Mat, WgpuBackend>::new(
let mut driver = Driver::new(SpirvSim::<f32, Mat, WgpuBackend>::new(
g.dim.to_index(p.geom.feat_size), p.geom.feat_size
));
driver.set_steps_per_stim(1000);

View File

@@ -77,7 +77,7 @@ fn main() {
let ferro_mat = wire_mat;
// let ferro_mat = Ferroxcube3R1MH::new(); // uncomment when ready to simulate for real
let mut driver = Driver::new_with_state(SpirvSim::<f32, Mat, WgpuBackend>::new(
let mut driver = Driver::new(SpirvSim::<f32, Mat, WgpuBackend>::new(
sim_bounds.to_index(feat_size), feat_size,
));
driver.add_classical_boundary(sim_padding);

View File

@@ -59,7 +59,7 @@ fn main() {
let coupling_region = Torus::new_xz(Meters::new(0.5*(ferro1_center + ferro2_center), ferro_center_y, half_depth), wire_coupling_major, wire_minor);
let sense_region = Torus::new_xz(Meters::new(ferro2_center + ferro_major, ferro_center_y, half_depth), wire_major, wire_minor);
let mut driver = Driver::new_with_state(SpirvSim::<f32, mat::FullyGenericMaterial<f32>, WgpuBackend>::new(
let mut driver = Driver::new(SpirvSim::<f32, mat::FullyGenericMaterial<f32>, WgpuBackend>::new(
Meters::new(width, height, depth).to_index(feat_size), feat_size
));

View File

@@ -29,7 +29,7 @@ fn main() {
// the first parameter is the float type to use: f32 for unchecked math, coremem::real::R32
// to guard against NaN/Inf (useful for debugging).
// to run this on the gpu instead of the gpu, replace `CpuBackend` with `WgpuBackend`.
let mut driver = Driver::new_with_state(SpirvSim::<f32, Mat, spirv::CpuBackend>::new(
let mut driver = Driver::new(SpirvSim::<f32, Mat, spirv::CpuBackend>::new(
size, feature_size
));