Skip to content

Commit f11f096

Browse files
committed
Rename domain_min/max CLI args to particle_aabb_min/max
1 parent a3bfdfe commit f11f096

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

splashsurf/src/reconstruction.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ pub struct ReconstructSubcommandArgs {
8383
number_of_values = 3,
8484
value_names = ["X_MIN", "Y_MIN", "Z_MIN"],
8585
allow_negative_numbers = true,
86-
requires = "domain_max",
86+
requires = "particle_aabb_max",
8787
)]
88-
pub domain_min: Option<Vec<f64>>,
88+
pub particle_aabb_min: Option<Vec<f64>>,
8989
/// Upper corner of the domain where surface reconstruction should be performed (requires domain-min to be specified)
9090
#[arg(
9191
help_heading = ARGS_BASIC,
9292
long,
9393
number_of_values = 3,
9494
value_names = ["X_MIN", "Y_MIN", "Z_MIN"],
9595
allow_negative_numbers = true,
96-
requires = "domain_min",
96+
requires = "particle_aabb_min",
9797
)]
98-
pub domain_max: Option<Vec<f64>>,
98+
pub particle_aabb_max: Option<Vec<f64>>,
9999

100100
/// Flag to enable multi-threading to process multiple input files in parallel
101101
#[arg(
@@ -392,8 +392,8 @@ mod arguments {
392392

393393
fn try_from(args: &ReconstructSubcommandArgs) -> Result<Self, Self::Error> {
394394
// Convert particle domain args to aabb
395-
let domain_aabb = if let (Some(domain_min), Some(domain_max)) =
396-
(&args.domain_min, &args.domain_max)
395+
let particle_aabb = if let (Some(domain_min), Some(domain_max)) =
396+
(&args.particle_aabb_min, &args.particle_aabb_max)
397397
{
398398
Some(try_aabb_from_min_max(
399399
domain_min,
@@ -465,7 +465,7 @@ mod arguments {
465465
compact_support_radius,
466466
cube_size,
467467
iso_surface_threshold: args.surface_threshold,
468-
particle_aabb: domain_aabb,
468+
particle_aabb,
469469
enable_multi_threading: args.parallelize_over_particles.into_bool(),
470470
spatial_decomposition,
471471
};

splashsurf/src/tests/cli.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,20 @@ fn test_main_cli() {
102102
"--particle-radius=0.05",
103103
"--smoothing-length=3.0",
104104
"--cube-size=0.75",
105-
"--domain-min",
105+
"--particle-aabb-min",
106106
"-1.0",
107107
"1.0",
108108
"-1.0",
109-
"--domain-max",
109+
"--particle-aabb-max",
110110
"-2.0",
111111
"2.0",
112112
"-2.0",
113113
])
114114
.expect("this command is supposed to work")
115115
.subcommand
116116
{
117-
assert_eq!(rec_args.domain_min, Some(vec![-1.0, 1.0, -1.0]));
118-
assert_eq!(rec_args.domain_max, Some(vec![-2.0, 2.0, -2.0]));
117+
assert_eq!(rec_args.particle_aabb_min, Some(vec![-1.0, 1.0, -1.0]));
118+
assert_eq!(rec_args.particle_aabb_max, Some(vec![-2.0, 2.0, -2.0]));
119119
};
120120

121121
// Test domain min/max: too many values
@@ -127,12 +127,12 @@ fn test_main_cli() {
127127
"--particle-radius=0.05",
128128
"--smoothing-length=3.0",
129129
"--cube-size=0.75",
130-
"--domain-min",
130+
"--particle-aabb-min",
131131
"-1.0",
132132
"1.0",
133133
"-1.0",
134134
"2.0",
135-
"--domain-max",
135+
"--particle-aabb-max",
136136
"-2.0",
137137
"2.0",
138138
"-2.0",

0 commit comments

Comments
 (0)