tsphere now only reports to stdout at a certain time step intervals - sphere - … | |
git clone git://src.adamsgaard.dk/sphere | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 7e87969a61a5a8ce5f636d5d777a33e6cefed427 | |
parent 95180945f0ef9f2bf1ad44f25f43ef7fec95c52d | |
Author: Anders Damsgaard <[email protected]> | |
Date: Wed, 21 Aug 2013 15:37:02 +0200 | |
sphere now only reports to stdout at a certain time step intervals | |
Diffstat: | |
M src/device.cu | 10 ++++++++-- | |
1 file changed, 8 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/src/device.cu b/src/device.cu | |
t@@ -620,6 +620,8 @@ __host__ void DEM::startTime() | |
// Initialize counter variable values | |
filetimeclock = 0.0; | |
long iter = 0; | |
+ int stdout_report = 100; // the no of time steps between reporting to stdo… | |
+ int stdout_report_counter = stdout_report; | |
// Create first status.dat | |
//sprintf(file,"output/%s.status.dat", sid); | |
t@@ -951,8 +953,12 @@ __host__ void DEM::startTime() | |
// Report time to console | |
if (verbose == 1) { | |
- cout << "\r Current simulation time: " | |
- << time.current << " s. ";// << std::flush; | |
+ stdout_report_counter--; | |
+ if (stdout_report < 0) { | |
+ cout << "\r Current simulation time: " | |
+ << time.current << " s. ";// << std::flush; | |
+ stdout_report_counter = stdout_report; | |
+ } | |
} | |