From c4a0fa4333c75481faffc563e84b107ed4055825 Mon Sep 17 00:00:00 2001 From: Elliot Bentine <7041164+ElliotB256@users.noreply.github.com> Date: Fri, 21 Jan 2022 18:04:07 +0000 Subject: [PATCH] Fix examples. --- Cargo.lock | 2 +- Cargo.toml | 2 +- examples/cross_section.rs | 6 +++--- examples/molasses_1d.rs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a033764..dcdd1be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ checksum = "c9ff149ed9780025acfdb36862d35b28856bb693ceb451259a7164442f22fdc3" [[package]] name = "atomecs" -version = "0.7.0" +version = "0.7.1" dependencies = [ "assert_approx_eq", "atomecs-derive", diff --git a/Cargo.toml b/Cargo.toml index 4dd9ace..3352050 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "atomecs" description = "An data-oriented simulation package for cold atom experiments." homepage = "https://github.com/TeamAtomECS/AtomECS" repository = "https://github.com/TeamAtomECS/AtomECS" -version = "0.7.0" +version = "0.7.1" authors = ["Pi-sun <37469116+Pi-sun@users.noreply.github.com>", "ElliotB256 <7041164+ElliotB256@users.noreply.github.com>"] edition = "2018" license = "GPL-3.0-or-later" diff --git a/examples/cross_section.rs b/examples/cross_section.rs index 9d3d63a..a6001ea 100644 --- a/examples/cross_section.rs +++ b/examples/cross_section.rs @@ -5,7 +5,7 @@ extern crate nalgebra; use lib::atom::{Atom, Force, Mass, Position, Velocity}; use lib::initiate::NewlyCreated; use lib::integrator::Timestep; -use lib::laser::{DEFAULT_BEAM_LIMIT, LaserPlugin}; +use lib::laser::{LaserPlugin}; use lib::laser::gaussian::GaussianBeam; use lib::laser_cooling::photons_scattered::ExpectedPhotonsScatteredVector; use lib::laser_cooling::{CoolingLight, LaserCoolingPlugin}; @@ -24,7 +24,7 @@ fn main() { let mut sim_builder = SimulationBuilder::default(); sim_builder.add_plugin(LaserPlugin::<{BEAM_NUMBER}>); sim_builder.add_plugin(LaserCoolingPlugin::::default()); - sim_builder.add_plugin(FileOutputPlugin::, Text, Atom>::new("scattered.txt".to_string(), 10)); + sim_builder.add_plugin(FileOutputPlugin::, Text, Atom>::new("scattered.txt".to_string(), 2)); sim_builder.add_plugin(FileOutputPlugin::::new("vel.txt".to_string(), 10)); let mut sim = sim_builder.build(); @@ -75,7 +75,7 @@ fn main() { } // Run the simulation - for _i in 0..4 { + for _i in 0..3 { sim.step(); } } diff --git a/examples/molasses_1d.rs b/examples/molasses_1d.rs index fe5eb8c..89fdb1b 100644 --- a/examples/molasses_1d.rs +++ b/examples/molasses_1d.rs @@ -9,19 +9,19 @@ use lib::laser_cooling::photons_scattered::ActualPhotonsScatteredVector; use lib::laser_cooling::{CoolingLight, LaserCoolingPlugin}; use lib::output::file::{FileOutputPlugin}; use lib::output::file::Text; -use lib::simulation::{SimulationBuilder, DEFAULT_BEAM_NUMBER}; +use lib::simulation::{SimulationBuilder}; use lib::species::{Rubidium87_780D2}; use nalgebra::Vector3; use specs::prelude::*; -const BEAM_NUMBER : usize = 6; +const BEAM_NUMBER : usize = 2; fn main() { let mut sim_builder = SimulationBuilder::default(); sim_builder.add_plugin(LaserPlugin::<{BEAM_NUMBER}>); sim_builder.add_plugin(LaserCoolingPlugin::::default()); - sim_builder.add_plugin(FileOutputPlugin::, Text, Atom>::new("scattered.txt".to_string(), 10)); + sim_builder.add_plugin(FileOutputPlugin::, Text, Atom>::new("scattered.txt".to_string(), 10)); sim_builder.add_plugin(FileOutputPlugin::::new("vel.txt".to_string(), 10)); let mut sim = sim_builder.build();