Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
w1th0utnam3 committed Aug 31, 2023
1 parent 3f5d27d commit 733fdf5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions splashsurf_lib/src/dense_subdomains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,12 @@ pub(crate) fn initialize_parameters<'a, I: Index, R: Real>(
) -> Result<ParametersSubdomainGrid<I, R>, anyhow::Error> {
let chunk_size = 500;

let Some(SpatialDecomposition::UniformGrid(grid_parameters)) = &parameters.spatial_decomposition else {
return Err(anyhow!("spatial decomposition parameters for uniform grid are missing"))
let Some(SpatialDecomposition::UniformGrid(grid_parameters)) =
&parameters.spatial_decomposition
else {
return Err(anyhow!(
"spatial decomposition parameters for uniform grid are missing"
));
};

// A subdomain will be a cube consisting of this number of MC cubes along each coordinate axis
Expand Down
4 changes: 3 additions & 1 deletion splashsurf_lib/src/reconstruction_octree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ impl<I: Index, R: Real> OctreeBasedSurfaceReconstruction<I, R> {
// The grid was already generated by the calling public function
let grid = output_surface.grid.clone();

let Some(SpatialDecomposition::Octree(decomposition_parameters)) = &parameters.spatial_decomposition else {
let Some(SpatialDecomposition::Octree(decomposition_parameters)) =
&parameters.spatial_decomposition
else {
// TODO: Use default values instead?

// If there are no decomposition parameters, we cannot construct an octree.
Expand Down

0 comments on commit 733fdf5

Please sign in to comment.