Some UI!
This commit is contained in:
+19
-3
@@ -15,13 +15,29 @@ use rand::rngs::SmallRng;
|
||||
use crate::system::{DIM, Position};
|
||||
use crate::system::model::DLASystem;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser)]
|
||||
struct Cli {
|
||||
seed: u64,
|
||||
max_particles: usize,
|
||||
stick_probability: f32,
|
||||
csv_path: String,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
use rand::{SeedableRng, thread_rng};
|
||||
let mut sys = DLASystem::<SmallRng, VectorStorage, LocalRandomWalker>::new(1, 1000, 1.0);
|
||||
let cli = Cli::parse();
|
||||
|
||||
let mut sys = DLASystem::<SmallRng, VectorStorage, LocalRandomWalker>::new(
|
||||
cli.seed,
|
||||
cli.max_particles,
|
||||
cli.stick_probability
|
||||
);
|
||||
|
||||
while sys.running {
|
||||
sys.update();
|
||||
}
|
||||
|
||||
sys.export_data();
|
||||
sys.export_data()
|
||||
.expect("Failed to write");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user