Skip to content

Commit e47c02f

Browse files
committed
Remove splash detection
1 parent 9f0e5c5 commit e47c02f

5 files changed

Lines changed: 1 addition & 40 deletions

File tree

splashsurf/src/reconstruction.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ pub struct ReconstructSubcommandArgs {
4444
/// The smoothing length radius used for the SPH kernel, the kernel compact support radius will be twice the smoothing length (in multiplies of the particle radius)
4545
#[structopt(long)]
4646
smoothing_length: f64,
47-
/// If a particle has no neighbors in this radius (in multiplies of the particle radius) it is considered as a free particle
48-
#[structopt(long)]
49-
splash_detection_radius: Option<f64>,
50-
/// The marching cubes grid size in multiplies of the particle radius
47+
/// The cube edge length used for marching cubes in multiplies of the particle radius, corresponds to the cell size of the implicit background grid
5148
#[structopt(long)]
5249
cube_size: f64,
5350
/// The iso-surface threshold for the density, i.e. value of the reconstructed density that indicates the fluid surface (in multiplies of the rest density)
@@ -224,9 +221,6 @@ mod arguments {
224221

225222
// Scale kernel radius and cube size by particle radius
226223
let compact_support_radius = args.particle_radius * 2.0 * args.smoothing_length;
227-
let splash_detection_radius = args
228-
.splash_detection_radius
229-
.map(|r| args.particle_radius * r);
230224
let cube_size = args.particle_radius * args.cube_size;
231225

232226
let spatial_decomposition = if !args.octree_decomposition.into_bool() {
@@ -267,7 +261,6 @@ mod arguments {
267261
particle_radius: args.particle_radius,
268262
rest_density: args.rest_density,
269263
compact_support_radius,
270-
splash_detection_radius,
271264
cube_size,
272265
iso_surface_threshold: args.surface_threshold,
273266
domain_aabb,

splashsurf_lib/benches/benches/bench_full.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ pub fn surface_reconstruction_canyon(c: &mut Criterion) {
2424
particle_radius,
2525
rest_density: 1000.0,
2626
compact_support_radius: compact_support_radius,
27-
splash_detection_radius: None,
2827
cube_size,
2928
iso_surface_threshold: 0.6,
3029
domain_aabb: None,
@@ -97,7 +96,6 @@ pub fn surface_reconstruction_dam_break(c: &mut Criterion) {
9796
particle_radius,
9897
rest_density: 1000.0,
9998
compact_support_radius: compact_support_radius,
100-
splash_detection_radius: None,
10199
cube_size,
102100
iso_surface_threshold: 0.6,
103101
domain_aabb: None,
@@ -175,7 +173,6 @@ pub fn surface_reconstruction_double_dam_break(c: &mut Criterion) {
175173
particle_radius,
176174
rest_density: 1000.0,
177175
compact_support_radius: compact_support_radius,
178-
splash_detection_radius: None,
179176
cube_size,
180177
iso_surface_threshold: 0.6,
181178
domain_aabb: None,
@@ -253,7 +250,6 @@ pub fn surface_reconstruction_double_dam_break_inplace(c: &mut Criterion) {
253250
particle_radius,
254251
rest_density: 1000.0,
255252
compact_support_radius: compact_support_radius,
256-
splash_detection_radius: None,
257253
cube_size,
258254
iso_surface_threshold: 0.6,
259255
domain_aabb: None,

splashsurf_lib/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ pub struct Parameters<R: Real> {
170170
pub rest_density: R,
171171
/// Compact support radius of the kernel, i.e. distance from the particle where kernel reaches zero (in distance units, not relative to particle radius)
172172
pub compact_support_radius: R,
173-
/// Particles without neighbors within the splash detection radius are considered "splash" or "free particles".
174-
/// They are filtered out and processed separately. Currently they are only skipped during the surface reconstruction.
175-
pub splash_detection_radius: Option<R>,
176173
/// Edge length of the marching cubes implicit background grid (in distance units, not relative to particle radius)
177174
pub cube_size: R,
178175
/// Density threshold value to distinguish between the inside (above threshold) and outside (below threshold) of the fluid
@@ -194,10 +191,6 @@ impl<R: Real> Parameters<R> {
194191
particle_radius: self.particle_radius.try_convert()?,
195192
rest_density: self.rest_density.try_convert()?,
196193
compact_support_radius: self.compact_support_radius.try_convert()?,
197-
splash_detection_radius: map_option!(
198-
&self.splash_detection_radius,
199-
r => r.try_convert()?
200-
),
201194
cube_size: self.cube_size.try_convert()?,
202195
iso_surface_threshold: self.iso_surface_threshold.try_convert()?,
203196
domain_aabb: map_option!(&self.domain_aabb, aabb => aabb.try_convert()?),

splashsurf_lib/src/reconstruction.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,6 @@ pub(crate) fn reconstruct_surface_global<'a, I: Index, R: Real>(
4141
&mut output_surface.mesh,
4242
);
4343

44-
/*
45-
let particle_indices = splash_detection_radius.map(|splash_detection_radius| {
46-
let neighborhood_list = neighborhood_search::search::<I, R>(
47-
&grid.aabb(),
48-
particle_positions,
49-
splash_detection_radius,
50-
enable_multi_threading,
51-
);
52-
53-
let mut active_particles = Vec::new();
54-
for (particle_i, neighbors) in neighborhood_list.iter().enumerate() {
55-
if !neighbors.is_empty() {
56-
active_particles.push(particle_i);
57-
}
58-
}
59-
60-
active_particles
61-
});
62-
*/
63-
6444
// TODO: Set this correctly
6545
output_surface.density_map = None;
6646
}

splashsurf_lib/tests/integration_tests/test_full.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ fn params<R: Real>(
3030
particle_radius,
3131
rest_density: R::from_f64(1000.0).unwrap(),
3232
compact_support_radius,
33-
splash_detection_radius: None,
3433
cube_size,
3534
iso_surface_threshold: R::from_f64(0.6).unwrap(),
3635
domain_aabb: None,

0 commit comments

Comments
 (0)