191 Switch runTimeModifiable_;
212 const word& systemName =
"system",
213 const word& constantName =
"constant" 222 const word& systemName =
"system",
223 const word& constantName =
"constant",
224 const bool enableFunctionObjects =
true 233 const word& systemName =
"system",
234 const word& constantName =
"constant",
235 const bool enableFunctionObjects =
true 243 const word& systemName =
"system",
244 const word& constantName =
"constant",
245 const bool enableFunctionObjects =
true 300 return writeVersion_;
306 return writeCompression_;
318 return runTimeModifiable_;
372 const word& constantName =
"constant" 404 const int precision = precision_
414 const word& constantName =
"constant" 429 return functionObjects_;
473 virtual bool run()
const;
496 virtual bool end()
const;
520 virtual void setTime(
const scalar,
const label newIndex);
551 return functionObjects_;
A FIFO stack based on a singly-linked list.
virtual Time & operator++()
Prefix increment,.
const functionObjectList & functionObjects() const
Return the list of function objects.
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.
void adjustDeltaT()
Adjust the time step so that writing occurs at the specified time.
virtual bool end() const
Return true if end of run,.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual word timeName() const
Return current time name.
set endTime to stop immediately w/ writing
virtual ~Time()
Destructor.
fileMonitor::fileState getState(const label) const
Get current state of file (using handle)
fileState
Enumeration defining the file state.
general distribution model
Read access to the system clock with formatting.
static const fileName null
An empty fileName.
instant findClosestTime(const scalar) const
Search the case for the time closest to the given time.
writeControls
Write control options.
virtual bool loop()
Return true if run should continue and if so increment time.
static fmtflags format_
Time directory name format.
virtual dimensionedScalar startTime() const
Return start time.
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.
IOstream & fixed(IOstream &io)
writeControls writeControl_
readOption
Enumeration defining the read options.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool removeWatch(const label) const
Remove watch on a file (using handle)
static const int maxPrecision_
Maximum time directory name precision.
bool subCycling() const
Return true if time currently being sub-cycled, otherwise false.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const fileName & rootPath() const
Return root path.
const word & name() const
Return const reference to name.
word findInstancePath(const instant &) const
Search the case for the time directory path.
virtual TimeState subCycle(const label nSubCycles)
Set time to sub-cycle for the given number of steps.
const fileName & rootPath() const
Return root path.
static const NamedEnum< stopAtControls, 4 > stopAtControlNames_
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 void setDeltaT(const dimensionedScalar &, const bool adjustDeltaT=true)
Reset time step.
static int precision_
Time directory name precision.
A class for handling words, derived from string.
Extract command arguments and options from the supplied argc and argv parameters. ...
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.
const dlLibraryTable & libs() const
External access to the loaded libraries.
virtual void setTime(const Time &)
Reset the time and time-index to those of the given time.
List of function objects with start(), execute() and end() functions that is called for each object...
IOstream::streamFormat writeFormat() const
Default write format.
Signal handler for interupt 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")
const word & graphFormat() const
Default graph format.
A table of dynamically loaded libraries.
virtual bool run() const
Return true if run should continue,.
compressionType
Enumeration for the format of data in the stream.
FIFOStack< word > previousWriteTimes_
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write using given format, version and compression.
virtual void readDict()
Read the control dictionary and set the write controls etc.
const fileName & caseName() const
Return case name.
IOstream::compressionType writeCompression() const
Default write compression.
static const NamedEnum< writeControls, 5 > writeControlNames_
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.
set endTime to stop immediately w/o writing
An instant of time. Contains the time value and name.
virtual bool read()
Read control dictionary, update controls and time.
stop when Time reaches the prescribed endTime
sigWriteNow sigWriteNow_
Enable one-shot writing upon signal.
const fileName & getFile(const label) const
Get name of file being watched (using handle)
virtual dimensionedScalar endTime() const
Return end time.
instantList times() const
Search the case for valid time directories.
const Switch & runTimeModifiable() const
Supports re-reading.
virtual void endSubCycle()
Reset time after sub-cycling back to previous TimeState.
fmtflags
Supported time directory name formats.
Signal handler for interupt defined by OptimisationSwitches::stopAtWriteNowSignal.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
stop the next time data are written
virtual bool writeTimeDict() const
Write time dictionary to the <time>/uniform directory.
const TimeState & prevTimeState() const
Return previous TimeState if time is being sub-cycled.
Starts timing CPU usage and return elapsed time from start.
IOstream::versionNumber writeVersion() const
Default write version number.
const dictionary & controlDict() const
stopAtControls
Stop-run control options.
Registry of regIOobjects.
fileName path() const
Return path.
Foam::argList args(argc, argv)
virtual label startTimeIndex() const
Return start time index.
fileName timePath() const
Return current time path.
virtual bool stopAt(const stopAtControls) const
Adjust the current stopAtControl. Note that this value.
void setUnmodified(const label) const
Set current state of file (using handle) to unmodified.
virtual Time & operator+=(const dimensionedScalar &)
Set deltaT to that specified and increment time via operator++()
label addWatch(const fileName &) const
Add watching of a file. Returns handle.
autoPtr< TimeState > prevTimeState_
If time is being sub-cycled this is the previous TimeState.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
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 & caseName() const
Return case name.