From f93939392202f0cc74d9ed71cf660e9279fe59c8 Mon Sep 17 00:00:00 2001 From: "armindamon.riess" <armindamon.riess@uzh.ch> Date: Wed, 14 Dec 2022 17:39:23 +0100 Subject: [PATCH] also measure time it takes to update tree --- lib/nBodySim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nBodySim.cpp b/lib/nBodySim.cpp index cf6a5f7..c49c230 100644 --- a/lib/nBodySim.cpp +++ b/lib/nBodySim.cpp @@ -82,6 +82,7 @@ void nBodySim::runSimulation(double dt, unsigned nSteps) { drift(dt); treeUpdateForces(); kick(dt/2.0); + updateTree(); auto stop = std::chrono::high_resolution_clock::now(); auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(stop - start); @@ -94,7 +95,6 @@ void nBodySim::runSimulation(double dt, unsigned nSteps) { // << ", E = " << std::setw(12) << calculateTotalEnergy() << ", T = " << std::setw(8) << duration.count()/1000.0 << " s" << std::endl; - updateTree(); } positionsFile.close(); } -- GitLab