Skip to content
Snippets Groups Projects
Commit 34b632a1 authored by Paul Heinzlreiter's avatar Paul Heinzlreiter
Browse files

* removed wrong error message

parent b8fc6669
Branches
No related merge requests found
......@@ -255,8 +255,9 @@ namespace nbody {
}
void Box::print() {
cout << "------" << endl;
for (int i = 0; i < 3; i++) {
cout << i << " min " << this->min[i] << " max " << this->max[i] << endl;
cout << " min " << this->min[i] << " max " << this->max[i] << endl;
}
}
......
......@@ -92,16 +92,6 @@ namespace nbody {
return result;
}
void Tree::moveBodies() {
for (Node* n = this->nodes->next; n != this->nodes; n = n->next) {
if (n->leaf) {
for (vector<Body>::iterator it = n->bodies.begin(); it != n->bodies.end(); it++) {
it->integrate();
}
}
}
}
vector<Body> Tree::extractLocalBodies() {
vector<Body> result;
......
......@@ -28,7 +28,6 @@ namespace nbody {
virtual unsigned long numberOfNodes();
virtual void accumulateForceOnto(Body& body);
virtual void computeForces();
virtual void moveBodies();
virtual vector<Body> extractLocalBodies();
virtual vector<Body> copyRefinements(Box domain);
virtual void rebuild(Box domain);
......
......@@ -50,7 +50,7 @@ namespace nbody {
bool MpiBodyComm::sendUnblocking(int target, vector<Body> bodies) {
if (this->request != MPI::REQUEST_NULL && !this->request.Test()) {
//unblocking send still not finished
cout << "Test failed" << endl;
//cout << "Test failed" << endl;
return false;
}
/*
......
......@@ -182,17 +182,23 @@ namespace nbody {
void MpiSimulation::runStep() {
Box overallDomain;
this->distributeDomains();
//this->domains[this->mpiRank].print();
for (unsigned int i = 0; i < this->mpiSize; i++) {
overallDomain.extend(this->domains[i]);
for (int k = 0; k < 3; k++) {
this->distributeDomains();
//this->domains[this->mpiRank].print();
for (unsigned int i = 0; i < this->mpiSize; i++) {
overallDomain.extend(this->domains[i]);
}
/*
if (this->mpiRank == 0) {
overallDomain.print();
}
*/
this->tree.rebuild(overallDomain);
this->distributeLETs();
this->tree.computeForces();
this->tree.advance();
this->domains[this->mpiRank] = this->tree.getLocalBB();
}
//overallDomain.print();
this->tree.rebuild(overallDomain);
this->distributeLETs();
this->tree.computeForces();
this->tree.advance();
this->domains[this->mpiRank] = this->tree.getLocalBB();
}
}
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