From 8f7b69195cabfd26a3fe670f5345a893011f5b30 Mon Sep 17 00:00:00 2001 From: Thomas Steinreiter Date: Mon, 21 Nov 2016 14:20:57 +0100 Subject: [PATCH] * removed unused Node::parent --- bhtree_mpi/src/datastructures/BarnesHutTree.cpp | 3 +-- bhtree_mpi/src/datastructures/Node.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bhtree_mpi/src/datastructures/BarnesHutTree.cpp b/bhtree_mpi/src/datastructures/BarnesHutTree.cpp index 5f81a21..64d72ac 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 6a4e26a..8133f2a 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 -- GitLab