diff --git a/jobs/src/bht_algorithm_3D.py b/jobs/src/bht_algorithm_3D.py index 47f2acd39f076b7b8116a33ec5f9ba3be29ae13b..d897155723323eda587933c9b099f9dd27aca3d7 100644 --- a/jobs/src/bht_algorithm_3D.py +++ b/jobs/src/bht_algorithm_3D.py @@ -22,7 +22,7 @@ class MainApp: self.rootNode.insert(particle) def ResetTree(self, particles): - """Reset the Quadtree by reinitializing the root node.""" + """Reset the Octree by reinitializing the root node.""" # Define the size of the rootNode based on the positions of the particles #min_x = min([particle.x for particle in particles]) #min_y = min([particle.y for particle in particles]) @@ -161,8 +161,8 @@ class TreeNode: mid_x = self.x + self.width / 2 mid_y = self.y + self.height / 2 mid_z = self.z + self.depth / 2 - quad_index = (particle.x >= mid_x) + 2 * (particle.y >= mid_y) + 4 * (particle.z >= mid_z) - return quad_index + oct_index = (particle.x >= mid_x) + 2 * (particle.y >= mid_y) + 4 * (particle.z >= mid_z) + return oct_index def print_tree(self, depth_=0): """Print the structure of the Octree. @@ -363,4 +363,4 @@ class TreeNode: self.mass = total_mass else: self.center_of_mass = np.array([0.0, 0.0, 0.0]) - self.mass = 0 \ No newline at end of file + self.mass = 0