Public Types | Public Member Functions | List of all members
timeControl Class Reference

General time dependent execution controller. The default to execute every time-step. More...

Public Types

enum  timeControls {
  ocTimeStep, ocWriteTime, ocOutputTime, ocAdjustableRunTime,
  ocRunTime, ocClockTime, ocCpuTime, ocNone
}
 The time control options. More...
 

Public Member Functions

 timeControl (const Time &, const dictionary &, const word &prefix)
 Construct from Time object and dictionary. More...
 
 ~timeControl ()
 Destructor. More...
 
void read (const dictionary &)
 Read from dictionary. More...
 
const Timetime () const
 Return Time. More...
 
bool execute ()
 Flag to indicate whether to execute. More...
 
timeControls control () const
 Return control. More...
 
scalar interval () const
 Return interval. More...
 
label executionIndex () const
 Return the index of the previous execution. More...
 

Detailed Description

General time dependent execution controller. The default to execute every time-step.

Source files

Definition at line 49 of file timeControl.H.

Member Enumeration Documentation

◆ timeControls

The time control options.

Enumerator
ocTimeStep 

execution is coupled to the time-step

ocWriteTime 

execution is coupled to the write-time

ocOutputTime 

execution is coupled to the output-time

ocAdjustableRunTime 

Adjust time step for execution.

ocRunTime 

run time for execution

ocClockTime 

clock time for execution

ocCpuTime 

cpu time for execution

ocNone 

no execution

Definition at line 54 of file timeControl.H.

Constructor & Destructor Documentation

◆ timeControl()

timeControl ( const Time t,
const dictionary dict,
const word prefix 
)

Construct from Time object and dictionary.

Definition at line 55 of file timeControl.C.

References Foam::read().

Here is the call graph for this function:

◆ ~timeControl()

Destructor.

Definition at line 74 of file timeControl.C.

Member Function Documentation

◆ read()

void read ( const dictionary dict)

Read from dictionary.

Definition at line 80 of file timeControl.C.

References Foam::endl(), dictionary::found(), IOWarningInFunction, dictionary::lookup(), dictionary::lookupOrDefault(), Foam::nl, and Foam::readScalar().

Here is the call graph for this function:

◆ time()

const Foam::Time & time ( ) const
inline

Return Time.

Definition at line 28 of file timeControlI.H.

◆ execute()

bool execute ( )

Flag to indicate whether to execute.

Definition at line 140 of file timeControl.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, Foam::nl, and Foam::returnReduce().

Here is the call graph for this function:

◆ control()

Foam::timeControl::timeControls control ( ) const
inline

Return control.

Definition at line 34 of file timeControlI.H.

◆ interval()

Foam::scalar interval ( ) const
inline

Return interval.

Definition at line 40 of file timeControlI.H.

◆ executionIndex()

Foam::label executionIndex ( ) const
inline

Return the index of the previous execution.

Definition at line 46 of file timeControlI.H.


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