diff --git a/bhtree_mpi/src/datastructures/BarnesHutTree.cpp b/bhtree_mpi/src/datastructures/BarnesHutTree.cpp index 5f81a21973ca41b4039b1e871d4221766cd7771e..64d72ac647c96571e6f3376931ec23c4c6a7387d 100644 --- a/bhtree_mpi/src/datastructures/BarnesHutTree.cpp +++ b/bhtree_mpi/src/datastructures/BarnesHutTree.cpp @@ -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; diff --git a/bhtree_mpi/src/datastructures/Node.cpp b/bhtree_mpi/src/datastructures/Node.cpp index 6a4e26abaf871d142ca4438dbf6b2273ed0624f7..8133f2a4e2335dfb4d14c432560c0b358620768c 100644 --- a/bhtree_mpi/src/datastructures/Node.cpp +++ b/bhtree_mpi/src/datastructures/Node.cpp @@ -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