@@ -207,10 +207,10 @@ def reconstruct_surface(
207207 smoothing_length : float = 2.0 ,
208208 cube_size : float = 0.5 ,
209209 iso_surface_threshold : float = 0.6 ,
210- enable_multi_threading : bool = False ,
210+ multi_threading : bool = True ,
211211 global_neighborhood_list : bool = False ,
212212 subdomain_grid : bool = True ,
213- auto_disable_subdomain_grid : bool = True ,
213+ subdomain_grid_auto_disable : bool = True ,
214214 subdomain_num_cubes_per_dim : int = 64 ,
215215 aabb_min = None ,
216216 aabb_max = None ,
@@ -239,7 +239,7 @@ def reconstruct_surface(
239239 iso_surface_threshold: float
240240 Threshold for the iso surface
241241
242- enable_multi_threading : bool
242+ multi_threading : bool
243243 Multi-threading flag
244244
245245 global_neighborhood_list: bool
@@ -248,7 +248,7 @@ def reconstruct_surface(
248248 subdomain_grid: bool
249249 Enable spatial decomposition using by dividing the domain into subdomains with dense marching cube grids for efficient multi-threading
250250
251- auto_disable_subdomain_grid : bool
251+ subdomain_grid_auto_disable : bool
252252 Whether to automatically disable the subdomain grid if the global domain is too small
253253
254254 subdomain_num_cubes_per_dim: int
@@ -270,14 +270,14 @@ def reconstruct_surface(
270270 if particles .dtype == 'float32' :
271271 return reconstruct_surface_f32 (particles , particle_radius = particle_radius , rest_density = rest_density ,
272272 smoothing_length = smoothing_length , cube_size = cube_size , iso_surface_threshold = iso_surface_threshold ,
273- enable_multi_threading = enable_multi_threading , global_neighborhood_list = global_neighborhood_list ,
274- use_subdomain_grid = subdomain_grid , auto_disable_subdomain_grid = auto_disable_subdomain_grid , subdomain_num_cubes_per_dim = subdomain_num_cubes_per_dim ,
273+ multi_threading = multi_threading , global_neighborhood_list = global_neighborhood_list ,
274+ subdomain_grid = subdomain_grid , subdomain_grid_auto_disable = subdomain_grid_auto_disable , subdomain_num_cubes_per_dim = subdomain_num_cubes_per_dim ,
275275 aabb_min = aabb_min , aabb_max = aabb_max )
276276 elif particles .dtype == 'float64' :
277277 return reconstruct_surface_f64 (particles , particle_radius = particle_radius , rest_density = rest_density ,
278278 smoothing_length = smoothing_length , cube_size = cube_size , iso_surface_threshold = iso_surface_threshold ,
279- enable_multi_threading = enable_multi_threading , global_neighborhood_list = global_neighborhood_list ,
280- use_subdomain_grid = subdomain_grid , auto_disable_subdomain_grid = auto_disable_subdomain_grid , subdomain_num_cubes_per_dim = subdomain_num_cubes_per_dim ,
279+ multi_threading = multi_threading , global_neighborhood_list = global_neighborhood_list ,
280+ subdomain_grid = subdomain_grid , subdomain_grid_auto_disable = subdomain_grid_auto_disable , subdomain_num_cubes_per_dim = subdomain_num_cubes_per_dim ,
281281 aabb_min = aabb_min , aabb_max = aabb_max )
282282 else :
283283 raise ValueError ("Invalid data type (only float32 and float64 are supported, consider explicitly specifying the dtype for particles)" )
@@ -525,16 +525,16 @@ def convert_tris_to_quads(
525525
526526
527527def reconstruction_pipeline (
528- particles , * , attributes_to_interpolate = {} , particle_radius ,
528+ particles , * , attributes_to_interpolate = None , particle_radius ,
529529 rest_density = 1000.0 , smoothing_length = 2.0 , cube_size ,
530- iso_surface_threshold = 0.6 , enable_multi_threading = True ,
530+ iso_surface_threshold = 0.6 , multi_threading = True ,
531531 check_mesh_closed = False , check_mesh_manifold = False ,
532532 check_mesh_orientation = False , check_mesh_debug = False ,
533533 mesh_smoothing_weights = False , sph_normals = False ,
534534 mesh_smoothing_weights_normalization = 13.0 , mesh_smoothing_iters = None , normals_smoothing_iters = None ,
535535 mesh_cleanup = False , mesh_cleanup_snap_dist = None , decimate_barnacles = False , keep_vertices = False ,
536536 compute_normals = False , output_raw_normals = False , output_raw_mesh = False , output_mesh_smoothing_weights = False , mesh_aabb_clamp_vertices = False ,
537- subdomain_grid = True , auto_disable_subdomain_grid = True , subdomain_num_cubes_per_dim = 64 , aabb_min = None , aabb_max = None , mesh_aabb_min = None , mesh_aabb_max = None ,
537+ subdomain_grid = True , subdomain_grid_auto_disable = True , subdomain_num_cubes_per_dim = 64 , aabb_min = None , aabb_max = None , mesh_aabb_min = None , mesh_aabb_max = None ,
538538 generate_quads = False , quad_max_edge_diag_ratio = 1.75 , quad_max_normal_angle = 10.0 , quad_max_interior_angle = 135.0
539539):
540540 """Surface reconstruction based on particle positions with subsequent post-processing
@@ -564,7 +564,7 @@ def reconstruction_pipeline(
564564 iso_surface_threshold: float
565565 Threshold for the iso surface
566566
567- enable_multi_threading : bool
567+ multi_threading : bool
568568 Multi-threading flag
569569
570570 check_mesh_closed: bool
@@ -628,7 +628,7 @@ def reconstruction_pipeline(
628628 subdomain_grid: bool
629629 Enable spatial decomposition using by dividing the domain into subdomains with dense marching cube grids for efficient multi-threading
630630
631- auto_disable_subdomain_grid : bool
631+ subdomain_grid_auto_disable : bool
632632 Whether to automatically disable the subdomain grid if the global domain is too small
633633
634634 subdomain_num_cubes_per_dim: int
@@ -663,11 +663,14 @@ def reconstruction_pipeline(
663663 tuple[TriMeshWithDataF32 | TriMeshWithDataF64 | MixedTriQuadMeshWithDataF32 | MixedTriQuadMeshWithDataF64, Optional[SurfaceReconstructionF32] | Optional[SurfaceReconstructionF64]]
664664 Mesh with data object and SurfaceReconstruction object containing the reconstructed mesh and used grid
665665 """
666+ if attributes_to_interpolate is None :
667+ attributes_to_interpolate = {}
668+
666669 if particles .dtype == 'float32' :
667670 tri_mesh , tri_quad_mesh , reconstruction = reconstruction_pipeline_f32 (particles , attributes_to_interpolate = attributes_to_interpolate , particle_radius = particle_radius , rest_density = rest_density ,
668671 smoothing_length = smoothing_length , cube_size = cube_size , iso_surface_threshold = iso_surface_threshold ,
669- aabb_min = aabb_min , aabb_max = aabb_max , enable_multi_threading = enable_multi_threading ,
670- use_subdomain_grid = subdomain_grid , auto_disable_subdomain_grid = auto_disable_subdomain_grid , subdomain_num_cubes_per_dim = subdomain_num_cubes_per_dim ,
672+ aabb_min = aabb_min , aabb_max = aabb_max , multi_threading = multi_threading ,
673+ subdomain_grid = subdomain_grid , subdomain_grid_auto_disable = subdomain_grid_auto_disable , subdomain_num_cubes_per_dim = subdomain_num_cubes_per_dim ,
671674 check_mesh_closed = check_mesh_closed , check_mesh_manifold = check_mesh_manifold , check_mesh_orientation = check_mesh_orientation , check_mesh_debug = check_mesh_debug ,
672675 mesh_cleanup = mesh_cleanup , mesh_cleanup_snap_dist = mesh_cleanup_snap_dist , decimate_barnacles = decimate_barnacles ,
673676 keep_vertices = keep_vertices , compute_normals = compute_normals , sph_normals = sph_normals , normals_smoothing_iters = normals_smoothing_iters ,
@@ -684,8 +687,8 @@ def reconstruction_pipeline(
684687 elif particles .dtype == 'float64' :
685688 tri_mesh , tri_quad_mesh , reconstruction = reconstruction_pipeline_f64 (particles , attributes_to_interpolate = attributes_to_interpolate , particle_radius = particle_radius , rest_density = rest_density ,
686689 smoothing_length = smoothing_length , cube_size = cube_size , iso_surface_threshold = iso_surface_threshold ,
687- aabb_min = aabb_min , aabb_max = aabb_max , enable_multi_threading = enable_multi_threading ,
688- use_subdomain_grid = subdomain_grid , auto_disable_subdomain_grid = auto_disable_subdomain_grid , subdomain_num_cubes_per_dim = subdomain_num_cubes_per_dim ,
690+ aabb_min = aabb_min , aabb_max = aabb_max , multi_threading = multi_threading ,
691+ subdomain_grid = subdomain_grid , subdomain_grid_auto_disable = subdomain_grid_auto_disable , subdomain_num_cubes_per_dim = subdomain_num_cubes_per_dim ,
689692 check_mesh_closed = check_mesh_closed , check_mesh_manifold = check_mesh_manifold , check_mesh_orientation = check_mesh_orientation , check_mesh_debug = check_mesh_debug ,
690693 mesh_cleanup = mesh_cleanup , mesh_cleanup_snap_dist = mesh_cleanup_snap_dist , decimate_barnacles = decimate_barnacles ,
691694 keep_vertices = keep_vertices , compute_normals = compute_normals , sph_normals = sph_normals , normals_smoothing_iters = normals_smoothing_iters ,
0 commit comments