184 Switch runTimeModifiable_;
187 mutable bool cacheTemporaryObjects_;
208 const word& systemName =
"system",
209 const word& constantName =
"constant" 218 const word& systemName =
"system",
219 const word& constantName =
"constant",
220 const bool enableFunctionObjects =
true 229 const word& systemName =
"system",
230 const word& constantName =
"constant",
231 const bool enableFunctionObjects =
true 239 const word& systemName =
"system",
240 const word& constantName =
"constant",
241 const bool enableFunctionObjects =
true 296 return writeVersion_;
302 return writeCompression_;
314 return runTimeModifiable_;
354 const word& constantName =
"constant" 387 const int precision = precision_
397 const word& constantName =
"constant" 412 return functionObjects_;
447 virtual bool run()
const;
470 virtual bool end()
const;
494 virtual void setTime(
const scalar,
const label newIndex);
521 return functionObjects_;
A FIFO stack based on a singly-linked list.
virtual Time & operator++()
Prefix increment,.
unwatchedIOdictionary is like IOdictionary but stores dependencies as files instead of fileMonitor wa...
fileName path() const
Return path.
A class for addressing time paths without using the Time class.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
sigStopAtWriteNow sigStopAtWriteNow_
Enable write and clean exit upon signal.
The time value with time-stepping information, user-defined remapping, etc.
writeControl writeControl_
void adjustDeltaT()
Adjust the time step so that writing occurs at the specified time.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual ~Time()
Destructor.
fileName timePath() const
Return current time path.
Read access to the system clock with formatting.
static const fileName null
An empty fileName.
virtual bool loop()
Return true if run should continue and if so increment time.
virtual dimensionedScalar startTime() const
Return start time.
bool subCycling() const
Return true if time currently being sub-cycled, otherwise false.
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".
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none/any.
virtual dimensionedScalar endTime() const
Return end time.
stopAtControl
Stop-run control options.
IOstream & fixed(IOstream &io)
const TimeState & prevTimeState() const
Return previous TimeState if time is being sub-cycled.
readOption
Enumeration defining the read options.
virtual word timeName() const
Return current time name.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual bool run() const
Return true if run should continue,.
static const int maxPrecision_
Maximum time directory name precision.
virtual bool writeTimeDict() const
Write time dictionary to the <time>/uniform directory.
IOstream::versionNumber writeVersion() const
Default write version number.
virtual TimeState subCycle(const label nSubCycles)
Set time to sub-cycle for the given number of steps.
virtual bool stopAt(const stopAtControl) const
Adjust the current stopAtControl. Note that this value.
const Switch & runTimeModifiable() const
Supports re-reading.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool write) const
Write using given format, version and compression.
static int precision_
Time directory name precision.
A class for handling words, derived from string.
virtual bool running() const
Return true if run should continue without any side effects.
Extract command arguments and options from the supplied argc and argv parameters. ...
const fileName & caseName() const
Return case name.
const fileName & caseName() const
Return case name.
const fileName & rootPath() const
Return root path.
bool subCycling_
Is the time currently being sub-cycled?
streamFormat
Enumeration for the format of data in the stream.
static const word null
An empty word.
IOstream::compressionType writeCompression() const
Default write compression.
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
format
Supported time directory name formats.
List of function objects with start(), execute() and end() functions that is called for each object...
Signal handler for interrupt defined by OptimisationSwitches::writeNowSignal.
Time(const word &name, const argList &args, const word &systemName="system", const word &constantName="constant")
Construct given name of dictionary to read and argument list.
static word controlDictName
The default control dictionary name (normally "controlDict")
compressionType
Enumeration for the format of data in the stream.
static format format_
Time directory name format.
FIFOStack< word > previousWriteTimes_
virtual void setDeltaTNoAdjust(const scalar)
Reset time step without additional adjustment or modification.
IOstream::streamFormat writeFormat() const
Default write format.
virtual void readDict()
Read the control dictionary and set the write controls etc.
static const NamedEnum< stopAtControl, 4 > stopAtControlNames_
const word & name() const
Return const reference to name.
void readModifiedObjects()
Read the objects that have been modified.
static instantList findTimes(const fileName &, const word &constantName="constant")
Search a given directory for valid time directories.
virtual void setEndTime(const dimensionedScalar &)
Reset end time.
void writeOnce()
Write the objects once (one shot) and continue the run.
static const NamedEnum< writeControl, 5 > writeControlNames_
An instant of time. Contains the time value and name.
virtual bool end() const
Return true if end of run,.
virtual bool read()
Read control dictionary, update controls and time.
const functionObjectList & functionObjects() const
Return the list of function objects.
const word & graphFormat() const
Default graph format.
sigWriteNow sigWriteNow_
Enable one-shot writing upon signal.
instantList times() const
Search the case for valid time directories.
const dictionary & controlDict() const
instant findClosestTime(const scalar) const
Search the case for the time closest to the given time.
virtual void setDeltaT(const dimensionedScalar &)
Reset time step.
writeControl
Write control options.
virtual void endSubCycle()
Reset time after sub-cycling back to previous TimeState.
Signal handler for interrupt defined by OptimisationSwitches::stopAtWriteNowSignal.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Starts timing CPU usage and return elapsed time from start.
virtual bool write(const bool write=true) const
Write using setting from DB.
Registry of regIOobjects.
Foam::argList args(argc, argv)
word findInstancePath(const fileName &path, const instant &) const
Search the case for the time directory path.
virtual label startTimeIndex() const
Return start time index.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
virtual Time & operator+=(const dimensionedScalar &)
Set deltaT to that specified and increment time via operator++()
autoPtr< TimeState > prevTimeState_
If time is being sub-cycled this is the previous TimeState.
bool writeNow()
Write the objects now (not at end of iteration) and continue.
void setControls()
Set the controls from the current controlDict.
IOstream & scientific(IOstream &io)
static label findClosestTimeIndex(const instantList &, const scalar, const word &constantName="constant")
Search instantList for the time index closest to the given time.
const fileName & rootPath() const
Return root path.