83 double cpuTimeStart{}, cpuTimeCur{}, cpuTimeEnd{};
84 time_t sTimeStart{}, sTimeCur{}, sTimeEnd{}, *tp{};
85 timeval msTimeStart{}, msTimeCur{}, msTimeEnd{};
101 int ltPas{}, ltRem{}, ltTot{};
102 double ctPas{}, ctRem{}, ctTot{};
103 T rtPas{}, rtRem{}, rtTot{};
104 T rtPasMs{}, rtRemMs{}, rtTotMs{};
106 unsigned int _printModeSummary;
110 Timer(
int maxTimeSteps, std::size_t numFluidCells=1,
unsigned int printModeSummary = 0);
133 void update(
int currentTimeStep);
162 void print(std::size_t currentTimeStep,
int printMode=0);
173template<
typename T,
typename DESCRIPTOR>
class for marking output with some text
Conversion between physical and lattice units, as well as discretization.
Timer(int maxTimeSteps, std::size_t numFluidCells=1, unsigned int printModeSummary=0)
initializes timer with the given values, abbreviation to Timer() + initialize(int,...
void printStep(int printMode=0)
Prints a one-line-summary of the values calculated in update() for use during computation.
void printShortSummary()
Prints a short summary containing only time consumptions (real and cpu time)
T getMLUPs()
returns Million DESCRIPTOR Site Updates per second (all processes together)
T getTotalRealTime()
Returns the total measured time between start() and stop() in seconds.
void update(int currentTimeStep)
Updates all time values of interest during computation.
void print(std::size_t currentTimeStep, int printMode=0)
Performs an update() followed by a printStep().
T getTotalMLUPps()
returns average Million DESCRIPTOR Site Updates per second and process between start() and stop()
T getTotalMLUPs()
returns average Million DESCRIPTOR Site Updates per second between start() and stop()
double getTotalCpuTime()
Returns the total cpu time in seconds between start() and stop().
T getMLUPps()
returns Million DESCRIPTOR Site Updates per second and process
T getTotalRealTimeMs()
Returns the total measured time between start() and stop() in ms.
void start()
(Re-)sets start value for time measurement.
T timevalDiffTimeMs(timeval end, timeval start)
returns the time difference between two timeval objects in ms
void stop()
Terminates time measurement and sets end value.
void printSummary()
Prints a (short) summary containing the overall time consumption in real and in cpu time for use afte...
Timer< T > * createTimer(XMLreader ¶m, const UnitConverter< T, DESCRIPTOR > &converter, size_t numLatticePoints)
Top level namespace for all of OpenLB.
Unit conversion handling – header file.
Input/Output in XML format – header file.