OOFEM 3.0
Loading...
Searching...
No Matches
oofem::EngngModelTimer Class Reference

#include <timer.h>

Collaboration diagram for oofem::EngngModelTimer:

Public Types

enum  EngngModelTimerType {
  EMTT_AnalysisTimer , EMTT_SolutionStepTimer , EMTT_NetComputationalStepTimer , EMTT_LoadBalancingTimer ,
  EMTT_DataTransferTimer , EMTT_LastTimer
}

Public Member Functions

 EngngModelTimer ()
 ~EngngModelTimer ()
Profiling routines.
void startTimer (EngngModelTimerType t)
void stopTimer (EngngModelTimerType t)
void pauseTimer (EngngModelTimerType t)
void resumeTimer (EngngModelTimerType t)
void initTimer (EngngModelTimerType t)

Protected Attributes

Timer timers [EMTT_LastTimer]
 Array of Timer classes.

Reporting routines.

double getUtime (EngngModelTimerType t)
 Returns total user time elapsed.
double getWtime (EngngModelTimerType t)
 Returns elapsed wall clock time.
const TimergetTimer (EngngModelTimerType t)
 Returns pointer to timer determined by EngngModelTimerType.
void toString (EngngModelTimerType t, char *buff)
 Printing & formatting.
static void convert2HMS (int &nhrs, int &nmin, int &nsec, double tsec)
 Converts total seconds into hours, mins, and seconds.

Detailed Description

Timer class, assumed to be an attribute of engineering model, serving stop-watch facility for engineering model. It can handle several timers independently, each corresponding to different solution stage, etc. Each timer is capable to track elapsed wall clock time as well as user time.

Definition at line 98 of file timer.h.

Member Enumeration Documentation

◆ EngngModelTimerType

Enumeration to distinguish different type of timers.

EMTT_NetComputationalStepTimer timer (and particularly its wall clock time) should measure only computation itself, no communication, therefore it should be measure of workload (in terms of wall clock time) on particular processors. It also typically not include time needed to solve the system of equations, since this has to be done in parallel, so solution takes the same time on all processors and include unwanted synchronization.

Enumerator
EMTT_AnalysisTimer 
EMTT_SolutionStepTimer 
EMTT_NetComputationalStepTimer 
EMTT_LoadBalancingTimer 
EMTT_DataTransferTimer 
EMTT_LastTimer 

Definition at line 109 of file timer.h.

Constructor & Destructor Documentation

◆ EngngModelTimer()

oofem::EngngModelTimer::EngngModelTimer ( )
inline

Definition at line 123 of file timer.h.

◆ ~EngngModelTimer()

oofem::EngngModelTimer::~EngngModelTimer ( )
inline

Definition at line 124 of file timer.h.

Member Function Documentation

◆ convert2HMS()

void oofem::EngngModelTimer::convert2HMS ( int & nhrs,
int & nmin,
int & nsec,
double tsec )
static

Converts total seconds into hours, mins, and seconds.

Definition at line 164 of file timer.C.

◆ getTimer()

const Timer * oofem::EngngModelTimer::getTimer ( EngngModelTimerType t)
inline

Returns pointer to timer determined by EngngModelTimerType.

Definition at line 142 of file timer.h.

References timers.

◆ getUtime()

double oofem::EngngModelTimer::getUtime ( EngngModelTimerType t)

Returns total user time elapsed.

Definition at line 154 of file timer.C.

References timers.

Referenced by oofem::LoadBalancer::printStatistics().

◆ getWtime()

double oofem::EngngModelTimer::getWtime ( EngngModelTimerType t)

Returns elapsed wall clock time.

Definition at line 159 of file timer.C.

References timers.

Referenced by oofem::LoadBalancer::printStatistics().

◆ initTimer()

void oofem::EngngModelTimer::initTimer ( EngngModelTimerType t)
inline

Definition at line 132 of file timer.h.

References timers.

◆ pauseTimer()

void oofem::EngngModelTimer::pauseTimer ( EngngModelTimerType t)
inline

Definition at line 130 of file timer.h.

References timers.

◆ resumeTimer()

void oofem::EngngModelTimer::resumeTimer ( EngngModelTimerType t)
inline

Definition at line 131 of file timer.h.

References timers.

◆ startTimer()

void oofem::EngngModelTimer::startTimer ( EngngModelTimerType t)
inline

Definition at line 128 of file timer.h.

References timers.

◆ stopTimer()

void oofem::EngngModelTimer::stopTimer ( EngngModelTimerType t)
inline

Definition at line 129 of file timer.h.

References timers.

◆ toString()

void oofem::EngngModelTimer::toString ( EngngModelTimerType t,
char * buff )

Printing & formatting.

Definition at line 169 of file timer.C.

References timers.

Member Data Documentation

◆ timers

Timer oofem::EngngModelTimer::timers[EMTT_LastTimer]
protected

Array of Timer classes.

Definition at line 120 of file timer.h.

Referenced by getTimer(), getUtime(), getWtime(), initTimer(), pauseTimer(), resumeTimer(), startTimer(), stopTimer(), and toString().


The documentation for this class was generated from the following files:

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011