Skip to content
Snippets Groups Projects
Commit 8f7b6919 authored by Thomas Steinreiter's avatar Thomas Steinreiter
Browse files

* removed unused Node::parent

parent 1b45157d
Branches
No related merge requests found
......@@ -16,7 +16,7 @@ namespace nbody {
return 8;
}
//update upper tree ndoes according to moved particles
//update upper tree nodes according to moved particles
void BarnesHutTree::update() {
//iterate for updating representatives
Node* current = nodes->prev;
......@@ -64,7 +64,6 @@ namespace nbody {
for (auto it = std::begin(subboxes); it != std::end(subboxes); it++) {
Node* child = new Node(current->tree);
child->parent = current;
child->bb = *it;
child->bodies = it->copyBodies(current->bodies);
child->nextSibling = nullptr;
......
......@@ -157,7 +157,7 @@ namespace nbody {
for (std::size_t i = 0; i < 3; i++) {
distance += (representative.position[i] - body.position[i]) * (representative.position[i] - body.position[i]);
}
return sqrt(distance) > getL();
return sqrt(distance) > getL(); // TODO(steinret): do squared comparison
}
//check if node is sufficient for force evaluation for all bodies in box
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment