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

Wrapper around functionObjects to add time control. More...

Inheritance diagram for timeControl:
Inheritance graph
[legend]
Collaboration diagram for timeControl:
Collaboration graph
[legend]

Public Types

enum  controlMode { TIME, TRIGGER, TIME_OR_TRIGGER, TIME_AND_TRIGGER }
 

Public Member Functions

 TypeName ("timeControl")
 
 timeControl (const word &name, const Time &runTime, const dictionary &dict)
 
const dictionarydict () const
 
const Foam::timeControlexecuteControl () const
 
const Foam::timeControlwriteControl () const
 
const functionObjectfilter () const
 
virtual bool execute ()
 
virtual bool execute (const label subIndex)
 
virtual bool write ()
 
virtual bool end ()
 
virtual bool adjustTimeStep ()
 
virtual bool filesModified () const
 
virtual bool read (const dictionary &)
 
virtual void updateMesh (const mapPolyMesh &mpm)
 
virtual void movePoints (const polyMesh &mesh)
 
- Public Member Functions inherited from timeFunctionObject
 timeFunctionObject (const word &name, const Time &runTime)
 
virtual ~timeFunctionObject ()=default
 
const Timetime () const
 
objectRegistrystoredObjects ()
 
const objectRegistrystoredObjects () const
 
- Public Member Functions inherited from functionObject
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 
 functionObject (const word &name, const bool withNamePrefix=defaultUseNamePrefix)
 
autoPtr< functionObjectclone () const
 
virtual ~functionObject ()=default
 
virtual const wordtype () const =0
 
const wordname () const noexcept
 
bool useNamePrefix () const noexcept
 
bool useNamePrefix (bool on) noexcept
 

Static Public Member Functions

static bool entriesPresent (const dictionary &dict)
 
- Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &runTime, const dictionary &dict)
 

Static Public Attributes

static const Enum< controlModecontrolModeNames_
 
- Static Public Attributes inherited from functionObject
static int debug
 
static bool postProcess
 
static bool defaultUseNamePrefix
 
static word outputPrefix
 

Additional Inherited Members

- Public Attributes inherited from functionObject
bool log
 
- Protected Member Functions inherited from timeFunctionObject
void clearOutputObjects (const wordList &objNames)
 
 timeFunctionObject (const timeFunctionObject &)=delete
 
void operator= (const timeFunctionObject &)=delete
 
- Protected Member Functions inherited from functionObject
word scopedName (const word &name) const
 
- Protected Attributes inherited from timeFunctionObject
const Timetime_
 

Detailed Description

Wrapper around functionObjects to add time control.

Adds

Note
Since the timeIndex is used directly from Foam::Time, it is unaffected by user-time conversions. For example, Foam::engineTime might cause writeInterval to be degrees crank angle, but the functionObject execution interval would still be in timestep.

The function object can be limited to operate within a time range using the timeStart and timEnd options. All objects are read (and the OutputFilter allocated) on construction. However, if a timeEnd is supplied, the object will call the 'end' function of the filter at the timeEnd time and destroy the filter. Any other callback (execute(), write(), timeSet() etc) will only operate if within the timeStart, timeEnd time range. Note that the time range uses 0.5 * deltaT as a comparison tolerance to account for precision errors.

Source files

Definition at line 72 of file timeControlFunctionObject.H.

Member Enumeration Documentation

◆ controlMode

enum controlMode
strong
Enumerator
TIME 
TRIGGER 
TIME_OR_TRIGGER 
TIME_AND_TRIGGER 

Definition at line 81 of file timeControlFunctionObject.H.

Constructor & Destructor Documentation

◆ timeControl()

timeControl ( const word name,
const Time runTime,
const dictionary dict 
)

Definition at line 439 of file timeControlFunctionObject.C.

Member Function Documentation

◆ TypeName()

TypeName ( "timeControl"  )

◆ dict()

const Foam::dictionary & dict ( ) const
inline

Definition at line 23 of file timeControlFunctionObjectI.H.

◆ executeControl()

const Foam::timeControl & executeControl ( ) const
inline

Definition at line 30 of file timeControlFunctionObjectI.H.

◆ writeControl()

const Foam::timeControl & writeControl ( ) const
inline

Definition at line 37 of file timeControlFunctionObjectI.H.

◆ filter()

const Foam::functionObject & filter ( ) const
inline

Definition at line 44 of file timeControlFunctionObjectI.H.

◆ entriesPresent()

bool entriesPresent ( const dictionary dict)
static

Definition at line 466 of file timeControlFunctionObject.C.

References dict, and timeControl::entriesPresent().

Referenced by multiRegion::read(), and functionObjectList::read().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute() [1/2]

bool execute ( )
virtual

Implements functionObject.

Definition at line 486 of file timeControlFunctionObject.C.

◆ execute() [2/2]

bool execute ( const label  subIndex)
virtual

Reimplemented from functionObject.

Definition at line 501 of file timeControlFunctionObject.C.

◆ write()

bool write ( )
virtual

Implements functionObject.

Definition at line 513 of file timeControlFunctionObject.C.

◆ end()

bool end ( )
virtual

Reimplemented from functionObject.

Definition at line 531 of file timeControlFunctionObject.C.

◆ adjustTimeStep()

bool adjustTimeStep ( )
virtual

◆ filesModified()

bool filesModified ( ) const
virtual

Reimplemented from functionObject.

Definition at line 795 of file timeControlFunctionObject.C.

◆ read()

bool read ( const dictionary dict)
virtual

Reimplemented from functionObject.

Definition at line 777 of file timeControlFunctionObject.C.

References dict.

◆ updateMesh()

void updateMesh ( const mapPolyMesh mpm)
virtual

Reimplemented from functionObject.

Definition at line 801 of file timeControlFunctionObject.C.

◆ movePoints()

void movePoints ( const polyMesh mesh)
virtual

Reimplemented from functionObject.

Definition at line 810 of file timeControlFunctionObject.C.

References mesh.

Member Data Documentation

◆ controlModeNames_

Definition at line 89 of file timeControlFunctionObject.H.


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