Skip to content

Commit

Permalink
Implement regular grid-based decomposition with dense subdomain recon…
Browse files Browse the repository at this point in the history
…struction (#187)

* Update deps

* Rename old reconstruction module

* Add new subdomain grid based dense reconstruction

* Refactor, remove VTK write
  • Loading branch information
w1th0utnam3 committed Jul 5, 2023
1 parent 397dcef commit 11b6261
Show file tree
Hide file tree
Showing 15 changed files with 2,598 additions and 791 deletions.
123 changes: 76 additions & 47 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions splashsurf/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "splashsurf"
version = "0.9.3"
version = "0.10.0"
authors = ["Fabian Löschner <[email protected]>"]
license = "MIT"
description = "Command-line tool for surface reconstruction of SPH particle data"
Expand All @@ -13,7 +13,7 @@ homepage = "http://splashsurf.physics-simulation.org"
repository = "https://github.com/InteractiveComputerGraphics/splashsurf"

[dependencies]
splashsurf_lib = { path = "../splashsurf_lib", version = "0.9.2", features = ["vtk_extras", "profiling", "io"] }
splashsurf_lib = { path = "../splashsurf_lib", version = "0.10.0", features = ["vtk_extras", "profiling", "io"] }
clap = { version = "4.3", features = ["derive"] }
log = "0.4"
fern = "0.6"
Expand Down
20 changes: 20 additions & 0 deletions splashsurf/src/reconstruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ pub struct ReconstructSubcommandArgs {
#[arg(help_heading = ARGS_ADV, long, short = 'n')]
pub num_threads: Option<usize>,

/// Whether to enable spatial decomposition using a regular grid-based approach
#[arg(
help_heading = ARGS_OCTREE,
long,
default_value = "off",
value_name = "off|on",
ignore_case = true,
require_equals = true
)]
pub subdomain_grid: Switch,
/// Each subdomain will be a cube consisting of this number of MC cube cells along each coordinate axis
#[arg(help_heading = ARGS_OCTREE, long, default_value="64")]
pub subdomain_cubes: u32,

/// Whether to enable spatial decomposition using an octree (faster) instead of a global approach
#[arg(
help_heading = ARGS_OCTREE,
Expand Down Expand Up @@ -229,6 +243,8 @@ impl Switch {

/// Executes the `reconstruct` subcommand
pub fn reconstruct_subcommand(cmd_args: &ReconstructSubcommandArgs) -> Result<(), anyhow::Error> {
profile!("reconstruct CLI");

let paths = ReconstructionRunnerPathCollection::try_from(cmd_args)
.context("Failed parsing input file path(s) from command line")?
.collect();
Expand Down Expand Up @@ -388,6 +404,10 @@ mod arguments {
cube_size,
iso_surface_threshold: args.surface_threshold,
domain_aabb,
subdomain_num_cubes_per_dim: args
.subdomain_grid
.into_bool()
.then_some(args.subdomain_cubes),
enable_multi_threading: args.parallelize_over_particles.into_bool(),
spatial_decomposition,
};
Expand Down
4 changes: 2 additions & 2 deletions splashsurf_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "splashsurf_lib"
version = "0.9.2"
version = "0.10.0"
authors = ["Fabian Löschner <[email protected]>"]
license = "MIT"
description = "Library for surface reconstruction of SPH particle data"
Expand Down Expand Up @@ -67,7 +67,7 @@ serde_json = { version = "1.0", optional = true }
lazy_static = { version = "1.4", optional = true }

[dev-dependencies]
criterion = "0.5"
criterion = "0.5.1"
ultraviolet = "0.9"
sdfu = { git = "https://github.com/w1th0utnam3/sdfu", features = ["ultraviolet"], rev = "e39a4a8685a56a3430218b9f2dfd546ab2dbe2d6" }

Expand Down
Loading

0 comments on commit 11b6261

Please sign in to comment.