diff --git a/bh_tree_mpi/datastructures/BarnesHutTree.cpp b/bh_tree_mpi/datastructures/BarnesHutTree.cpp index 97edcf29202fbe29868244484da12290fd8f6f04..022c942b71ee25c78b8f1bdf03f86c5fa7231db8 100644 --- a/bh_tree_mpi/datastructures/BarnesHutTree.cpp +++ b/bh_tree_mpi/datastructures/BarnesHutTree.cpp @@ -58,13 +58,13 @@ namespace nbody { void BarnesHutTree::splitNode(Node* current) { //TODO: check why to Process accumulates nodes - this->control.toProcess.push(current); + //this->control.toProcess.push(current); if (current->isSplitable(&this->control)) { vector subboxes = this->splitBB(current); current->leaf = false; Node* after = current->next; - this->control.toProcess.pop(); + //this->control.toProcess.pop(); for (vector::iterator it = subboxes.begin(); it != subboxes.end(); it++) { Node* child = new Node(this); @@ -80,12 +80,12 @@ namespace nbody { child->prevSibling = child->prev; child->prev->afterSubtree = child; } - this->control.toProcess.push(child); + //this->control.toProcess.push(child); } after->prev->afterSubtree = current->afterSubtree; current->bodies.clear(); } else { - this->control.toProcess.pop(); + //this->control.toProcess.pop(); } } diff --git a/bh_tree_mpi/datastructures/Tree.cpp b/bh_tree_mpi/datastructures/Tree.cpp index 3ee2e0825d5fe43b5c99d6348031c3d1d36ed400..1829878a38022282e916a424e1f4227468804dfc 100644 --- a/bh_tree_mpi/datastructures/Tree.cpp +++ b/bh_tree_mpi/datastructures/Tree.cpp @@ -44,11 +44,13 @@ namespace nbody { } current = current->next; } + /* BarnesHutTree* bht = dynamic_cast(this); if (bht != NULL && !(bht->control.processedNodes == 0 && bht->control.toProcess.empty())) { cout << bht->control.toProcess.size() << endl; return false; } + */ return true; } diff --git a/bh_tree_mpi/datastructures/Tree.hpp b/bh_tree_mpi/datastructures/Tree.hpp index 10757ea93e260986404c0e2d3c75b8a1704e6ef8..3503a8c5e11ab3a2112d33d1029023b82d1bff94 100644 --- a/bh_tree_mpi/datastructures/Tree.hpp +++ b/bh_tree_mpi/datastructures/Tree.hpp @@ -19,7 +19,7 @@ namespace nbody { unsigned int maxLeafBodies; Tree* tree; int processedNodes; - stack toProcess; + //stack toProcess; pthread_rwlock_t lock; } Control;