67 class profilingTrigger;
136 mutable std::unique_ptr<profilingTrigger> loopProfiling_;
216 Switch runTimeModifiable_;
240 const word& ctrlDictName,
242 const bool enableFunctionObjects =
true,
243 const bool enableLibs =
true 250 const word& ctrlDictName,
253 const bool enableFunctionObjects =
true,
254 const bool enableLibs =
true 264 const bool enableFunctionObjects =
true,
265 const bool enableLibs =
true 274 const bool enableFunctionObjects =
true,
275 const bool enableLibs =
true 282 const word& ctrlDictName,
284 const word& systemName,
285 const word& constantName,
286 const bool enableFunctionObjects =
true,
287 const bool enableLibs =
true 294 const word& ctrlDictName,
297 const word& systemName,
298 const word& constantName,
299 const bool enableFunctionObjects =
true,
300 const bool enableLibs =
true 310 const word& systemName,
311 const word& constantName,
312 const bool enableFunctionObjects =
true,
313 const bool enableLibs =
true 322 const word& systemName,
323 const word& constantName,
324 const bool enableFunctionObjects =
true,
325 const bool enableLibs =
true 370 virtual const fileName&
dbDir()
const 384 return writeStreamOption_;
390 return writeStreamOption_.
format();
402 return writeStreamOption_.
version();
414 return runTimeModifiable_;
421 Switch old(runTimeModifiable_);
422 runTimeModifiable_ = sw;
516 return functionObjects_;
558 virtual bool run()
const;
581 virtual bool end()
const;
598 virtual void setTime(
const instant& inst,
const label newIndex);
608 virtual void setTime(
const scalar newTime,
const label newIndex);
620 const bool adjust =
true 627 const bool adjust =
true 646 return functionObjects_;
A FIFO stack based on a singly-linked list.
virtual Time & operator++()
Prefix increment,.
Generic output stream using a standard (STL) stream.
unwatchedIOdictionary is like IOdictionary but stores dependencies as files instead of fileMonitor wa...
fileName path() const
Return path.
dlLibraryTable & libs() const noexcept
Mutable access to the loaded dynamic libraries.
Address the time paths without using the Time class.
A class for handling file names.
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
static int printExecutionFormat_
Style for "ExecutionTime = " output.
sigStopAtWriteNow sigStopAtWriteNow_
Signal handler for write and clean exit upon signal.
The time value with time-stepping information, user-defined remapping, etc.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
Dummy no-op. Do not change current value.
word findInstance(const fileName &dir, const word &name=word::null, IOobjectOption::readOption rOpt=IOobjectOption::MUST_READ, const word &stopInstance=word::null) const
Return time instance (location) of dir that contains the file name (eg, used in reading mesh data)...
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 a number of values (eg...
adjust endTime to stop immediately w/ writing
virtual ~Time()
Destructor.
virtual bool isAdjustTimeStep() const
Return true if adjustTimeStep is true.
fileName timePath() const
Return current time path.
virtual stopAtControls stopAt() const
Return the stop control information.
const word & name() const noexcept
Return the object name.
virtual void setEndTime(const dimensionedScalar &endTime)
Reset end time.
General relative velocity model.
Read access to the system clock with formatting.
static const fileName null
An empty fileName.
writeControls
Write control options.
virtual bool loop()
Return true if run should continue and if so increment time.
virtual dimensionedScalar startTime() const
Return start time.
static fmtflags format_
Time directory name format.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static const Enum< stopAtControls > stopAtControlNames
Names for stopAtControls.
label subCycling() const noexcept
Zero (tests as false) if time is not being sub-cycled, otherwise the current sub-cycle index or the t...
A simple container for options an IOstream can normally have.
virtual dimensionedScalar endTime() const
Return end time.
IOstream & fixed(IOstream &io)
writeControls writeControl_
const TimeState & prevTimeState() const
Return previous TimeState if time is being sub-cycled.
void setMonitoring(const bool forceProfiling=false)
Set file monitoring, profiling, etc.
virtual word timeName() const
Return current time name.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
IOstreamOption writeStreamOption() const noexcept
The write stream option (format, compression, version)
virtual bool run() const
Return true if run should continue,.
label subCycling_
The total number of sub-cycles, the current sub-cycle index, or 0 if time is not being sub-cycled...
static const int maxPrecision_
Maximum time directory name precision.
virtual bool writeTimeDict() const
Write time dictionary to the <time>/uniform directory.
virtual TimeState subCycle(const label nSubCycles)
Set time to sub-cycle for the given number of steps.
"adjustable" / "adjustableRunTime"
static int precision_
Time directory name precision.
TypeName("time")
Runtime type information.
A class for handling words, derived from Foam::string.
IOstreamOption::versionNumber writeVersion() const noexcept
The write stream version.
Extract command arguments and options from the supplied argc and argv parameters. ...
static const word null
An empty word.
static const Enum< writeControls > writeControlNames
Names for writeControls.
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
Time(const word &ctrlDictName, const argList &args, const bool enableFunctionObjects=true, const bool enableLibs=true)
Construct from dictionary name to read and argument list.
List of function objects with start(), execute() and end() functions that is called for each object...
Signal handler to write once and continue. The interrupt is defined by OptimisationSwitches::writeNow...
IOstreamOption::compressionType writeCompression() const noexcept
The write stream compression.
static word controlDictName
The default control dictionary name (normally "controlDict")
A table of dynamically loaded libraries.
virtual void subCycleIndex(const label index)
Adjust the reported sub-cycle index.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
FIFOStack< word > previousWriteTimes_
OBJstream os(runTime.globalPath()/outputName)
virtual void readDict()
Read the control dictionary and set the write controls etc.
compressionType compression() const noexcept
Get the stream compression.
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
void readModifiedObjects()
Read the objects that have been modified.
IOstreamOption::streamFormat writeFormat() const noexcept
The write stream format.
const word & graphFormat() const noexcept
Default graph format.
const word & name() const noexcept
Return const reference to name.
void writeOnce()
Write the objects once (one shot) and continue the run.
Adjust endTime to stop immediately w/o writing.
word findInstancePath(const fileName &directory, const instant &t) const
Search the case for the time directory path corresponding to the given instance.
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name...
const fileName & rootPath() const noexcept
Return root path.
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.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Stop when Time reaches prescribed endTime.
virtual Time & operator+=(const dimensionedScalar &deltaT)
Set deltaT to that specified and increment time via operator++()
sigWriteNow sigWriteNow_
Signal handler for one-shot writing upon signal.
virtual void setDeltaT(const dimensionedScalar &deltaT, const bool adjust=true)
Reset time step, normally also calling adjustDeltaT()
const dictionary & controlDict() const
Return read access to the controlDict dictionary.
versionNumber version() const noexcept
Get the stream version.
streamFormat
Data format (ascii | binary)
virtual void endSubCycle()
Reset time after sub-cycling back to previous TimeState.
fmtflags
Supported time directory name formats.
Signal handler to write and stop the job. The interrupt is defined by OptimisationSwitches::stopAtWri...
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
stop at the next data write interval
stopAtControls
Stop-run control options, which are primarily used when altering the stopAt condition.
Registry of regIOobjects.
Switch runTimeModifiable() const noexcept
Supports re-reading.
Foam::argList args(argc, argv)
virtual label startTimeIndex() const
Return start time index.
TimeState()
Construct a zero time state, using the current time formatting.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
streamFormat format() const noexcept
Get the current stream format.
autoPtr< TimeState > prevTimeState_
If time is being sub-cycled this is the previous TimeState.
bool writeNow()
Write the objects immediately (not at end of iteration) and continue the run.
dimensionedScalar deltaT() const
Return time step.
const fileName & caseName() const noexcept
Return case name.
void setControls()
Set the controls from the current controlDict.
IOstream & scientific(IOstream &io)
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
Starts timing CPU usage and return elapsed time from start.
readOption
Enumeration defining read preferences.