198 mutable bool cacheTemporaryObjects_;
219 const bool enableFunctionObjects =
true
228 const bool enableFunctionObjects =
true
237 const bool enableFunctionObjects =
true
245 const bool enableFunctionObjects =
true
296 return writeVersion_;
302 return writeCompression_;
308 return runTimeModifiable_;
429 return functionObjects_;
470 virtual bool run()
const;
493 virtual bool end()
const;
517 virtual void setTime(
const scalar,
const label newIndex);
547 return functionObjects_;
A FIFO stack based on a singly-linked list.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
readOption
Enumeration defining the read options.
streamFormat
Enumeration for the format of data in the stream.
compressionType
Enumeration for the format of data in the stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A class for addressing time paths without using the Time class.
fileName path() const
Return path.
static const word constantName
const fileName & caseName() const
Return case name.
const fileName & rootPath() const
Return root path.
The time value with time-stepping information, user-defined remapping, etc.
friend class Time
Declare friendship with the Time class.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual bool run() const
Return true if run should continue,.
virtual void readDict()
Read the control dictionary and set the write controls etc.
static int precision_
Time directory name precision.
scalar timeToUserTime(const scalar t) const
Convert the real-time (s) into user-time (e.g. CA deg)
instantList times() const
Search the case for valid time directories.
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
const TimeState & prevTimeState() const
Return previous TimeState if time is being sub-cycled.
const unitConversion & userUnits() const
Return the user-time unit conversion.
virtual bool writeTimeDict() const
Write time dictionary to the <time>/uniform directory.
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
virtual dimensionedScalar startTime() const
Return start time.
static const NamedEnum< stopAtControl, 4 > stopAtControlNames
sigStopAtWriteNow sigStopAtWriteNow_
Enable write and clean exit upon signal.
bool writeNow()
Write the objects now (not at end of iteration) and continue.
const unitConversion & writeIntervalUnits() const
Return the write interval units.
static instantList findTimes(const fileName &, const word &constantName="constant")
Search a given directory for valid time directories.
static int curPrecision_
Current time directory name precision adjusted as necessary.
void adjustDeltaT()
Adjust the time step so that writing occurs at the specified time.
format
Supported time directory name formats.
scalar userTimeToTime(const scalar tau) const
Convert the user-time (e.g. CA deg) to real-time (s).
fileName path() const
Explicitly inherit path from TimePaths to disambiguate from.
virtual dimensionedScalar beginTime() const
Return begin time (initial start time)
FIFOStack< word > previousWriteTimes_
scalar userTimeValue() const
Return current user time value.
scalar userDeltaTValue() const
Return user time step value.
void writeOnce()
Write the objects once (one shot) and continue the run.
static const int maxPrecision_
Maximum time directory name precision.
autoPtr< TimeState > prevTimeState_
If time is being sub-cycled this is the previous TimeState.
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
Return the location of "dir" containing the file "name".
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool write) const
Write using given format, version and compression.
const Switch & runTimeModifiable() const
Supports re-reading.
virtual void setWriteInterval(const scalar writeInterval)
Reset the write interval.
virtual void setEndTime(const dimensionedScalar &)
Reset end time.
IOstream::versionNumber writeVersion() const
Default write version number.
word userTimeName() const
Return current user time name with units.
bool subCycling() const
Return true if time currently being sub-cycled, otherwise false.
IOstream::streamFormat writeFormat() const
Default write format.
writeControl writeControl_
sigWriteNow sigWriteNow_
Enable one-shot writing upon signal.
virtual bool running() const
Return true if run should continue without any side effects.
void setControls()
Set the controls from the current controlDict.
word findInstancePath(const fileName &path, const instant &) const
Search the case for the time directory path.
virtual void setDeltaT(const dimensionedScalar &)
Reset time step.
static word controlDictName
The default control dictionary name (normally "controlDict")
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to time.
autoPtr< userTimes::userTime > userTime_
Optional user-time, defaults to realTime in s.
stopAtControl
Stop-run control options.
@ nextWrite
stop the next time data are written
@ writeNow
set endTime to stop immediately w/ writing
@ endTime
stop when Time reaches the prescribed endTime
@ noWriteNow
set endTime to stop immediately w/o writing
static format format_
Time directory name format.
const IOdictionary & controlDict() const
Return the control dict.
virtual bool stopAt(const stopAtControl) const
Adjust the current stopAtControl. Note that this value.
const userTimes::userTime & userTime() const
Return the userTime.
virtual label startTimeIndex() const
Return start time index.
virtual void endSubCycle()
Reset time after sub-cycling back to previous TimeState.
virtual void setDeltaTNoAdjust(const scalar)
Reset time step without additional adjustment or modification.
IOstream::compressionType writeCompression() const
Default write compression.
virtual Time & operator++()
Prefix increment,.
static const NamedEnum< writeControl, 5 > writeControlNames
void readModifiedObjects()
Read the objects that have been modified.
fileName timePath() const
Return current time path.
virtual TimeState subCycle(const label nSubCycles)
Set time to sub-cycle for the given number of steps.
writeControl
Write control options.
virtual bool loop()
Return true if run should continue and if so increment time.
bool subCycling_
Is the time currently being sub-cycled?
bool restart() const
Return true if the run is a restart, i.e. startTime != beginTime.
virtual dimensionedScalar endTime() const
Return end time.
virtual ~Time()
Destructor.
static label findClosestTimeIndex(const instantList &, const scalar, const word &constantName="constant")
Search instantList for the time index closest to the given time.
virtual Time & operator+=(const dimensionedScalar &)
Set deltaT to that specified and increment time via operator++()
virtual bool end() const
Return true if end of run,.
instant findClosestTime(const scalar) const
Search the case for the time closest to the given time.
const fileName & caseName() const
Explicitly inherit caseName from TimePaths to disambiguate from.
const functionObjectList & functionObjects() const
Return the list of function objects.
const fileName & rootPath() const
Explicitly inherit rootPath from TimePaths to disambiguate from.
Extract command arguments and options from the supplied argc and argv parameters.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Read access to the system clock with formatting.
controlDict specific IOdictionary to provide automatic read-update for Time
Starts timing CPU usage and return elapsed time from start.
A list of keyword definitions, which are a keyword followed by any number of values (e....
const word & name() const
Return const reference to name.
A class for handling file names.
static const fileName null
An empty fileName.
List of function objects with start(), execute() and end() functions that is called for each object.
An instant of time. Contains the time value and name.
Registry of regIOobjects.
virtual bool write(const bool write=true) const
Write using setting from DB.
Signal handler to write and exit when the stopAtWriteNowSignal is sent.
Signal handler to write when the writeNowSignal is sent.
Unit conversion structure. Contains the associated dimensions and the multiplier with which to conver...
A class for handling words, derived from string.
static const word null
An empty word.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
IOstream & fixed(IOstream &io)
IOstream & scientific(IOstream &io)
Foam::argList args(argc, argv)
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...