timeControl Class Reference

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

Public Types

enum class  timeControls {
  timeStep , writeTime , outputTime , adjustableRunTime ,
  runTime , runTimes , clockTime , cpuTime ,
  none
}
 The time control options. More...
 

Public Member Functions

 timeControl (const Time &, const dictionary &, const word &prefix)
 Construct from Time object and dictionary. More...
 
 timeControl (const timeControl &)=delete
 Disallow default bitwise copy construction. 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...
 
scalar timeToNextAction ()
 Return the time to the next write. More...
 
timeControls control () const
 Return control. More...
 
void operator= (const timeControl &)=delete
 Disallow default bitwise assignment. 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

enum timeControls
strong

The time control options.

Enumerator
timeStep 

Execute/write every 'Interval' time-steps.

writeTime 

Execute/write every 'Interval' write times.

outputTime 

Execute/write every 'Interval' write times.

adjustableRunTime 

Execute/write every 'Interval' run time period.

runTime 

Execute/write every 'Interval' run time period.

runTimes 

Execute/write at specified list of run times.

clockTime 

Execute/write every 'Interval' CPU time period.

cpuTime 

Execute/write every 'Interval' CPU time period.

none 

No execution.

Definition at line 54 of file timeControl.H.

Constructor & Destructor Documentation

◆ timeControl() [1/2]

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 dict, and timeControl::read().

Here is the call graph for this function:

◆ timeControl() [2/2]

timeControl ( const timeControl )
delete

Disallow default bitwise copy construction.

◆ ~timeControl()

Destructor.

Definition at line 76 of file timeControl.C.

Member Function Documentation

◆ read()

void read ( const dictionary dict)

Read from dictionary.

Definition at line 82 of file timeControl.C.

References dict, Foam::e, Foam::endl(), forAll, dictionary::found(), IOWarningInFunction, dictionary::lookup(), dictionary::lookupOrDefault(), and Foam::nl.

Referenced by timeControl::timeControl().

Here is the call graph for this function:
Here is the caller 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 173 of file timeControl.C.

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

Here is the call graph for this function:

◆ timeToNextAction()

Foam::scalar timeToNextAction ( )

Return the time to the next write.

Definition at line 277 of file timeControl.C.

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

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.

◆ operator=()

void operator= ( const timeControl )
delete

Disallow default bitwise assignment.


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