Skip to content
Snippets Groups Projects
Commit 476083b0 authored by nguyed99's avatar nguyed99
Browse files

Remove 2D sims

parent 6ea7640a
No related branches found
No related tags found
No related merge requests found
Pipeline #59658 passed
......@@ -11,7 +11,7 @@ In `jobs/src` directory:
In `tasks/src` directory:
2. "ff_simulation_2D.py" or "ff_simulation_3D.py":
2. "ff_simulation_3D.py":
- Adjusting initial conditions (positions, velocities).
- Choosing integrators (we recommend using velocity verlet).
- Adjusting mass of particles
......
......@@ -22,7 +22,7 @@ class MainApp:
self.rootNode.insert(particle)
def ResetTree(self, particles):
"""Reset the Quadtree by reinitializing the root node."""
"""Reset the Octtree 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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment