Skip to content
Snippets Groups Projects
Commit 5c5e6259 authored by Armin Damon Riess's avatar Armin Damon Riess
Browse files

delete tree after simulation is done

parent f843e07d
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,7 @@ nBodySim::nBodySim(std::string datafile) {
}
nBodySim::~nBodySim() {
delete tree_;
delete[] positions_;
delete[] velocities_;
delete[] potential_;
......@@ -81,7 +82,7 @@ void nBodySim::runSimulation(double dt, unsigned nSteps) {
<< ", T = " << std::setw(8) << duration.count()/1000.0 << " s"
<< std::endl;
updateForces();
std::cout << std::right << "correct: " << std::setw(12) << calculateMeanForceMagnitude() << std::endl;
std::cout << std::right << " correct MFM = " << std::setw(12) << calculateMeanForceMagnitude() << std::endl;
doTimeStep(dt);
updateTree();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment