70 lines
1.4 KiB
Rust
70 lines
1.4 KiB
Rust
use std::path::PathBuf;
|
|
use clap::{Parser, Args, Subcommand, ValueEnum};
|
|
|
|
#[derive(ValueEnum, Clone, Debug, Copy)]
|
|
pub enum OutputFormat {
|
|
FullDataJson,
|
|
Positions,
|
|
}
|
|
|
|
#[derive(Args, Debug)]
|
|
pub struct InitialCli {
|
|
pub grid_size: u32
|
|
}
|
|
|
|
#[derive(Args, Debug)]
|
|
pub struct StickProbabilityCli {
|
|
pub grid_size: u32,
|
|
pub stick_probability: f32,
|
|
}
|
|
|
|
#[derive(Args, Debug)]
|
|
pub struct BallsCli {
|
|
pub ball_radius: f32,
|
|
pub stick_distance: f32,
|
|
pub walk_step: f32,
|
|
}
|
|
|
|
#[derive(Args, Debug)]
|
|
pub struct SurfaceProbabilityMeasureCli {
|
|
pub grid_size: u32,
|
|
pub stick_probability: f32,
|
|
pub initial_data: PathBuf,
|
|
pub particles: u32,
|
|
}
|
|
|
|
#[derive(Subcommand, Debug)]
|
|
pub enum PCM {
|
|
Initial(InitialCli),
|
|
StickProbability(StickProbabilityCli),
|
|
Grid3KD(StickProbabilityCli),
|
|
Grid3(StickProbabilityCli),
|
|
Hex(StickProbabilityCli),
|
|
Balls(BallsCli),
|
|
SurfaceProbabilityMeasure(SurfaceProbabilityMeasureCli),
|
|
}
|
|
|
|
#[derive(Parser, Debug)]
|
|
pub struct ModelCli {
|
|
#[command(subcommand)]
|
|
pub preconfigured_model: PCM,
|
|
|
|
#[arg(long)]
|
|
pub max_frames: Option<usize>,
|
|
|
|
#[arg(short = 'N', long)]
|
|
pub max_particles: usize,
|
|
|
|
#[arg(long, short)]
|
|
pub seed: u64,
|
|
|
|
#[arg(value_enum, short, long, default_value_t = OutputFormat::Positions)]
|
|
pub format: OutputFormat,
|
|
|
|
#[arg(value_enum, short, long)]
|
|
pub output: PathBuf,
|
|
|
|
#[arg(short, long)]
|
|
pub notify_every: Option<usize>,
|
|
}
|