Skip to content

Commit

Permalink
Fix examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotB256 committed Jan 21, 2022
1 parent 5ee735a commit c4a0fa4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions examples/cross_section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -24,7 +24,7 @@ fn main() {
let mut sim_builder = SimulationBuilder::default();
sim_builder.add_plugin(LaserPlugin::<{BEAM_NUMBER}>);
sim_builder.add_plugin(LaserCoolingPlugin::<Rubidium87_780D2, {BEAM_NUMBER}>::default());
sim_builder.add_plugin(FileOutputPlugin::<ExpectedPhotonsScatteredVector<Rubidium87_780D2, {DEFAULT_BEAM_LIMIT}>, Text, Atom>::new("scattered.txt".to_string(), 10));
sim_builder.add_plugin(FileOutputPlugin::<ExpectedPhotonsScatteredVector<Rubidium87_780D2, {BEAM_NUMBER}>, Text, Atom>::new("scattered.txt".to_string(), 2));
sim_builder.add_plugin(FileOutputPlugin::<Velocity, Text, Atom>::new("vel.txt".to_string(), 10));
let mut sim = sim_builder.build();

Expand Down Expand Up @@ -75,7 +75,7 @@ fn main() {
}

// Run the simulation
for _i in 0..4 {
for _i in 0..3 {
sim.step();
}
}
6 changes: 3 additions & 3 deletions examples/molasses_1d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Rubidium87_780D2, {BEAM_NUMBER}>::default());
sim_builder.add_plugin(FileOutputPlugin::<ActualPhotonsScatteredVector<Rubidium87_780D2, {DEFAULT_BEAM_NUMBER}>, Text, Atom>::new("scattered.txt".to_string(), 10));
sim_builder.add_plugin(FileOutputPlugin::<ActualPhotonsScatteredVector<Rubidium87_780D2, {BEAM_NUMBER}>, Text, Atom>::new("scattered.txt".to_string(), 10));
sim_builder.add_plugin(FileOutputPlugin::<Velocity, Text, Atom>::new("vel.txt".to_string(), 10));
let mut sim = sim_builder.build();

Expand Down

0 comments on commit c4a0fa4

Please sign in to comment.