Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
comp-sci-project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nguyed99
comp-sci-project
Commits
476083b0
Commit
476083b0
authored
1 year ago
by
nguyed99
Browse files
Options
Downloads
Patches
Plain Diff
Remove 2D sims
parent
6ea7640a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#59658
passed
1 year ago
Stage: test-jobs
Stage: build-page
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/README_for_BHT.md
+1
-1
1 addition, 1 deletion
doc/README_for_BHT.md
jobs/src/bht_algorithm_3D.py
+3
-3
3 additions, 3 deletions
jobs/src/bht_algorithm_3D.py
with
4 additions
and
4 deletions
doc/README_for_BHT.md
+
1
−
1
View file @
476083b0
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
jobs/src/bht_algorithm_3D.py
+
3
−
3
View file @
476083b0
...
...
@@ -22,7 +22,7 @@ class MainApp:
self
.
rootNode
.
insert
(
particle
)
def
ResetTree
(
self
,
particles
):
"""
Reset the
Quad
tree by reinitializing the root node.
"""
"""
Reset the
Oct
tree 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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment