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
Merge requests
!11
Revert "Merge branch 'nicoa96-main-patch-47348' into 'main'"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Revert "Merge branch 'nicoa96-main-patch-47348' into 'main'"
revert-adeaff5e
into
main
Overview
0
Commits
3
Pipelines
1
Changes
1
Closed
nguyed99
requested to merge
revert-adeaff5e
into
main
1 year ago
Overview
0
Commits
3
Pipelines
1
Changes
1
Expand
This reverts merge request
!9 (merged)
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
bdb86030
1 commit,
1 year ago
1 file
+
4
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
jobs/src/bht_algorithm_3D.py
+
4
−
4
Options
@@ -22,7 +22,7 @@ class MainApp:
self
.
rootNode
.
insert
(
particle
)
def
ResetTree
(
self
,
particles
):
"""
Reset the
Oc
tree by reinitializing the root node.
"""
"""
Reset the
Quad
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
oct
_index
=
(
particle
.
x
>=
mid_x
)
+
2
*
(
particle
.
y
>=
mid_y
)
+
4
*
(
particle
.
z
>=
mid_z
)
return
oct
_index
quad
_index
=
(
particle
.
x
>=
mid_x
)
+
2
*
(
particle
.
y
>=
mid_y
)
+
4
*
(
particle
.
z
>=
mid_z
)
return
quad
_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
self
.
mass
=
0
\ No newline at end of file
Loading