@@ -185,11 +185,11 @@ class NeighborhoodLists:
185185
186186class SphInterpolator :
187187 r"""
188- Interpolator of per-particle quantities to arbitrary points using SPH interpolation (with cubic kernel)
188+ Interpolator of per-particle quantities to arbitrary points using SPH interpolation
189189 """
190- def __new__ (cls , particle_positions :numpy .typing .NDArray [typing .Any ], particle_densities :numpy .typing .NDArray [typing .Any ], particle_rest_mass :builtins .float , compact_support_radius :builtins .float ) -> SphInterpolator :
190+ def __new__ (cls , particle_positions :numpy .typing .NDArray [typing .Any ], particle_densities :numpy .typing .NDArray [typing .Any ], particle_rest_mass :builtins .float , compact_support_radius :builtins .float , kernel_type : KernelType ) -> SphInterpolator :
191191 r"""
192- Constructs an SPH interpolator (with cubic kernels) for the given particles
192+ Constructs an SPH interpolator for the given particles
193193
194194 Parameters
195195 ----------
@@ -200,7 +200,9 @@ class SphInterpolator:
200200 particle_rest_mass
201201 The rest mass of each particle (assumed to be the same for all particles).
202202 compact_support_radius
203- The compact support radius of the cubic spline kernel used for interpolation.
203+ The compact support radius of the kernel used for interpolation.
204+ kernel_type
205+ The kernel function used for interpolation
204206 """
205207 def interpolate_quantity (self , particle_quantity :numpy .typing .NDArray [typing .Any ], interpolation_points :numpy .typing .NDArray [typing .Any ], * , first_order_correction :builtins .bool = False ) -> numpy .typing .NDArray [typing .Any ]:
206208 r"""
@@ -315,6 +317,15 @@ class VertexVertexConnectivity:
315317 Returns the wrapped connectivity data by moving it out of this object (zero copy)
316318 """
317319
320+ class KernelType (Enum ):
321+ r"""
322+ Enum for specifying the Kernel function used for the reconstruction
323+ """
324+ CubicSpline = ...
325+ Poly6 = ...
326+ Spiky = ...
327+ WendlandQuinticC2 = ...
328+
318329class MeshType (Enum ):
319330 r"""
320331 Enum specifying the type of mesh wrapped by a ``MeshWithData``
@@ -497,7 +508,7 @@ def neighborhood_search_spatial_hashing_parallel(particle_positions:numpy.typing
497508 The radius per particle where other particles are considered neighbors.
498509 """
499510
500- def reconstruct_surface (particles :numpy .typing .NDArray [typing .Any ], * , particle_radius :builtins .float , rest_density :builtins .float = 1000.0 , smoothing_length :builtins .float , cube_size :builtins .float , iso_surface_threshold :builtins .float = 0.6 , aabb_min :typing .Optional [typing .Sequence [builtins .float ]]= None , aabb_max :typing .Optional [typing .Sequence [builtins .float ]]= None , multi_threading :builtins .bool = True , global_neighborhood_list :builtins .bool = False , subdomain_grid :builtins .bool = True , subdomain_grid_auto_disable :builtins .bool = True , subdomain_num_cubes_per_dim :builtins .int = 64 ) -> SurfaceReconstruction :
511+ def reconstruct_surface (particles :numpy .typing .NDArray [typing .Any ], * , particle_radius :builtins .float , rest_density :builtins .float = 1000.0 , smoothing_length :builtins .float , cube_size :builtins .float , iso_surface_threshold :builtins .float = 0.6 , aabb_min :typing .Optional [typing .Sequence [builtins .float ]]= None , aabb_max :typing .Optional [typing .Sequence [builtins .float ]]= None , multi_threading :builtins .bool = True , simd : builtins . bool = True , kernel_type : KernelType = ..., global_neighborhood_list :builtins .bool = False , subdomain_grid :builtins .bool = True , subdomain_grid_auto_disable :builtins .bool = True , subdomain_num_cubes_per_dim :builtins .int = 64 ) -> SurfaceReconstruction :
501512 r"""
502513 Performs a surface reconstruction from the given particles without additional post-processing
503514
@@ -523,6 +534,8 @@ def reconstruct_surface(particles:numpy.typing.NDArray[typing.Any], *, particle_
523534 Upper corner of the AABB of particles to consider in the reconstruction.
524535 multi_threading
525536 Flag to enable multi-threading for the reconstruction and post-processing steps.
537+ simd
538+ Flag to enable SIMD vectorization for the reconstruction if supported by the CPU architecture.
526539 subdomain_grid
527540 Flag to enable spatial decomposition by dividing the domain into subdomains with dense marching cube grids for efficient multi-threading.
528541 subdomain_grid_auto_disable
@@ -531,7 +544,7 @@ def reconstruct_surface(particles:numpy.typing.NDArray[typing.Any], *, particle_
531544 Number of marching cubes voxels along each coordinate axis in each subdomain if the subdomain grid is enabled.
532545 """
533546
534- def reconstruction_pipeline (particles :numpy .typing .NDArray [typing .Any ], * , attributes_to_interpolate :typing .Optional [dict ]= None , particle_radius :builtins .float , rest_density :builtins .float = 1000.0 , smoothing_length :builtins .float , cube_size :builtins .float , iso_surface_threshold :builtins .float = 0.6 , aabb_min :typing .Optional [typing .Sequence [builtins .float ]]= None , aabb_max :typing .Optional [typing .Sequence [builtins .float ]]= None , multi_threading :builtins .bool = True , subdomain_grid :builtins .bool = True , subdomain_grid_auto_disable :builtins .bool = True , subdomain_num_cubes_per_dim :builtins .int = 64 , check_mesh_closed :builtins .bool = False , check_mesh_manifold :builtins .bool = False , check_mesh_orientation :builtins .bool = False , check_mesh_debug :builtins .bool = False , mesh_cleanup :builtins .bool = False , mesh_cleanup_snap_dist :typing .Optional [builtins .float ]= None , decimate_barnacles :builtins .bool = False , keep_vertices :builtins .bool = False , compute_normals :builtins .bool = False , sph_normals :builtins .bool = False , normals_smoothing_iters :typing .Optional [builtins .int ]= None , mesh_smoothing_iters :typing .Optional [builtins .int ]= None , mesh_smoothing_weights :builtins .bool = True , mesh_smoothing_weights_normalization :builtins .float = 13.0 , generate_quads :builtins .bool = False , quad_max_edge_diag_ratio :builtins .float = 1.75 , quad_max_normal_angle :builtins .float = 10.0 , quad_max_interior_angle :builtins .float = 135.0 , output_mesh_smoothing_weights :builtins .bool = False , output_raw_normals :builtins .bool = False , output_raw_mesh :builtins .bool = False , mesh_aabb_min :typing .Optional [typing .Sequence [builtins .float ]]= None , mesh_aabb_max :typing .Optional [typing .Sequence [builtins .float ]]= None , mesh_aabb_clamp_vertices :builtins .bool = True ) -> tuple [MeshWithData , SurfaceReconstruction ]:
547+ def reconstruction_pipeline (particles :numpy .typing .NDArray [typing .Any ], * , attributes_to_interpolate :typing .Optional [dict ]= None , particle_radius :builtins .float , rest_density :builtins .float = 1000.0 , smoothing_length :builtins .float , cube_size :builtins .float , iso_surface_threshold :builtins .float = 0.6 , aabb_min :typing .Optional [typing .Sequence [builtins .float ]]= None , aabb_max :typing .Optional [typing .Sequence [builtins .float ]]= None , multi_threading :builtins .bool = True , simd :builtins .bool = True , kernel_type :KernelType = ..., subdomain_grid :builtins .bool = True , subdomain_grid_auto_disable :builtins .bool = True , subdomain_num_cubes_per_dim :builtins .int = 64 , check_mesh_closed :builtins .bool = False , check_mesh_manifold :builtins .bool = False , check_mesh_orientation :builtins .bool = False , check_mesh_debug :builtins .bool = False , mesh_cleanup :builtins .bool = False , mesh_cleanup_snap_dist :typing .Optional [builtins .float ]= None , decimate_barnacles :builtins .bool = False , keep_vertices :builtins .bool = False , compute_normals :builtins .bool = False , sph_normals :builtins .bool = False , normals_smoothing_iters :typing .Optional [builtins .int ]= None , mesh_smoothing_iters :typing .Optional [builtins .int ]= None , mesh_smoothing_weights :builtins .bool = True , mesh_smoothing_weights_normalization :builtins .float = 13.0 , generate_quads :builtins .bool = False , quad_max_edge_diag_ratio :builtins .float = 1.75 , quad_max_normal_angle :builtins .float = 10.0 , quad_max_interior_angle :builtins .float = 135.0 , output_mesh_smoothing_weights :builtins .bool = False , output_raw_normals :builtins .bool = False , output_raw_mesh :builtins .bool = False , mesh_aabb_min :typing .Optional [typing .Sequence [builtins .float ]]= None , mesh_aabb_max :typing .Optional [typing .Sequence [builtins .float ]]= None , mesh_aabb_clamp_vertices :builtins .bool = True ) -> tuple [MeshWithData , SurfaceReconstruction ]:
535548 r"""
536549 Runs the surface reconstruction pipeline for the given particle positions with optional post-processing
537550
@@ -561,6 +574,10 @@ def reconstruction_pipeline(particles:numpy.typing.NDArray[typing.Any], *, attri
561574 Upper corner [x,y,z] of the AABB of particles to consider in the reconstruction.
562575 multi_threading
563576 Flag to enable multi-threading for the reconstruction and post-processing steps.
577+ simd
578+ Flag to enable SIMD vectorization for the reconstruction if supported by the CPU architecture.
579+ kernel_type
580+ Kernel function to use for the reconstruction.
564581 subdomain_grid
565582 Flag to enable spatial decomposition by dividing the domain into subdomains with dense marching cube grids for efficient multi-threading.
566583 subdomain_grid_auto_disable
0 commit comments