Time.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2016-2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::Time
29
30Description
31 Class to control time during OpenFOAM simulations that is also the
32 top-level objectRegistry.
33
34SourceFiles
35 Time.C
36 TimeIO.C
37 findInstance.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_Time_H
42#define Foam_Time_H
43
44#include "TimePaths.H"
45#include "objectRegistry.H"
47#include "FIFOStack.H"
48#include "clock.H"
49#include "cpuTime.H"
50#include "TimeState.H"
51#include "Switch.H"
52#include "instantList.H"
53#include "Enum.H"
54#include "typeInfo.H"
55#include "dlLibraryTable.H"
56#include "functionObjectList.H"
57#include "sigWriteNow.H"
58#include "sigStopAtWriteNow.H"
59
60// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61
62namespace Foam
63{
64
65// Forward Declarations
66class argList;
67class profilingTrigger;
68class OSstream;
69
70/*---------------------------------------------------------------------------*\
71 Class Time Declaration
72\*---------------------------------------------------------------------------*/
74class Time
75:
76 public clock,
77 public cpuTime,
78 public TimePaths,
79 public objectRegistry,
80 public TimeState
81{
82public:
83
84 //- Write control options
85 enum writeControls
86 {
92 wcCpuTime,
94 };
95
96 //- Stop-run control options, which are primarily used when
97 //- altering the stopAt condition.
99 {
105 };
106
107 //- Supported time directory name formats
108 enum fmtflags
111 fixed = ios_base::fixed,
112 scientific = ios_base::scientific
113 };
114
115
116 //- Names for writeControls
118
119 //- Names for stopAtControls
121
122
123 //- Style for "ExecutionTime = " output
124 // 0 = seconds (with trailing 's')
125 // 1 = day-hh:mm:ss
126 //
127 // \note this is public so registered info switches can modify it.
128 static int printExecutionFormat_;
129
130
131private:
132
133 // Private Data
134
135 //- Profiling trigger for time-loop (for run, loop)
136 mutable std::unique_ptr<profilingTrigger> loopProfiling_;
137
138 //- Any loaded dynamic libraries
139 // Construct before reading controlDict
140 mutable dlLibraryTable libs_;
141
142 //- The controlDict
143 unwatchedIOdictionary controlDict_;
144
145
146protected:
147
148 // Protected Data
150 label startTimeIndex_;
152 scalar startTime_;
154 mutable scalar endTime_;
156 mutable stopAtControls stopAt_;
160 scalar writeInterval_;
162 label purgeWrite_;
165
166 //- The total number of sub-cycles, the current sub-cycle index,
167 //- or 0 if time is not being sub-cycled
168 label subCycling_;
169
170 // One-shot writing
171 bool writeOnce_;
172
173 //- If time is being sub-cycled this is the previous TimeState
175
176 //- Signal handler for one-shot writing upon signal
178
179 //- Signal handler for write and clean exit upon signal
181
182
183 //- Time directory name format
184 static fmtflags format_;
185
186 //- Time directory name precision
187 static int precision_;
188
189 //- Maximum time directory name precision
190 static const int maxPrecision_;
191
192
193 //- Adjust the time step so that writing occurs at the specified time
194 void adjustDeltaT();
195
196 //- Set the controls from the current controlDict
197 void setControls();
198
199 //- Set file monitoring, profiling, etc
200 // Optionally force profiling without inspecting the controlDict
201 void setMonitoring(const bool forceProfiling=false);
202
203 //- Read the control dictionary and set the write controls etc.
204 virtual void readDict();
205
206
207private:
208
209 //- The write stream option (format, compression, version)
210 IOstreamOption writeStreamOption_;
211
212 //- Default graph format
213 word graphFormat_;
214
215 //- Is runtime modification of dictionaries allowed?
216 Switch runTimeModifiable_;
217
218 //- Function objects executed at start and on ++, +=
219 mutable functionObjectList functionObjects_;
220
221
222public:
223
224 // Static Data Members
225
226 //- The default control dictionary name (normally "controlDict")
227 static word controlDictName;
228
229
230 //- Runtime type information
231 TypeName("time");
232
233
234 // Constructors
235
236 //- Construct from dictionary name to read and argument list.
237 // Uses "system" and "constant" for its directories.
238 inline Time
239 (
240 const word& ctrlDictName,
241 const argList& args,
242 const bool enableFunctionObjects = true,
243 const bool enableLibs = true
244 );
245
246 //- Construct given name of dictionary to read and root/case paths.
247 // Uses "system" and "constant" for its directories.
248 inline Time
249 (
250 const word& ctrlDictName,
251 const fileName& rootPath,
252 const fileName& caseName,
253 const bool enableFunctionObjects = true,
254 const bool enableLibs = true
255 );
256
257 //- Construct given dictionary and root/case paths.
258 // Uses "system" and "constant" for its directories.
259 inline Time
260 (
261 const dictionary& dict,
262 const fileName& rootPath,
263 const fileName& caseName,
264 const bool enableFunctionObjects = true,
265 const bool enableLibs = true
266 );
267
268 //- Construct at endTime and root/case paths.
269 // Uses "system" and "constant" for its directories.
270 inline Time
271 (
272 const fileName& rootPath,
273 const fileName& caseName,
274 const bool enableFunctionObjects = true,
275 const bool enableLibs = true
276 );
277
278 //- Construct from dictionary name to read and argument list.
279 // Use specified system/constant directory names.
280 Time
281 (
282 const word& ctrlDictName,
283 const argList& args,
284 const word& systemName,
285 const word& constantName,
286 const bool enableFunctionObjects = true,
287 const bool enableLibs = true
288 );
289
290 //- Construct given name of dictionary to read and root/case paths.
291 // Use specified system/constant directory names.
292 Time
293 (
294 const word& ctrlDictName,
295 const fileName& rootPath,
296 const fileName& caseName,
297 const word& systemName,
298 const word& constantName,
299 const bool enableFunctionObjects = true,
300 const bool enableLibs = true
301 );
302
303 //- Construct given dictionary and root/case paths.
304 // Use specified system/constant directory names.
305 Time
306 (
307 const dictionary& dict,
308 const fileName& rootPath,
309 const fileName& caseName,
310 const word& systemName,
311 const word& constantName,
312 const bool enableFunctionObjects = true,
313 const bool enableLibs = true
314 );
315
316 //- Construct given endTime and root/case paths.
317 // Use specified system/constant directory names.
318 Time
319 (
320 const fileName& rootPath,
321 const fileName& caseName,
322 const word& systemName,
323 const word& constantName,
324 const bool enableFunctionObjects = true,
325 const bool enableLibs = true
326 );
327
328
329 // Selectors
330
331 //- Construct (dummy) Time - no functionObjects or libraries
332 static autoPtr<Time> New();
333
334 //- Construct (dummy) Time - no functionObjects or libraries
335 static autoPtr<Time> New(const fileName& caseDir);
336
337 //- Construct (dummy) Time - no functionObjects or libraries
338 static autoPtr<Time> New(const argList& args);
339
340
341 //- Destructor
342 virtual ~Time();
343
344
345 // Member Functions
346
347 // Database functions
348
349 //- Return name from objectRegistry and not TimePaths
351
352 //- Return root path
354
355 //- Return case name
357
358 //- Return path
359 fileName path() const
360 {
361 return rootPath()/caseName();
362 }
363
364 //- Return read access to the controlDict dictionary
365 const dictionary& controlDict() const
366 {
367 return controlDict_;
368 }
370 virtual const fileName& dbDir() const
371 {
372 return fileName::null;
373 }
374
375 //- Return current time path
376 fileName timePath() const
377 {
378 return path()/timeName();
379 }
380
381 //- The write stream option (format, compression, version)
383 {
384 return writeStreamOption_;
385 }
386
387 //- The write stream format
389 {
390 return writeStreamOption_.format();
391 }
392
393 //- The write stream compression
395 {
396 return writeStreamOption_.compression();
397 }
398
399 //- The write stream version
401 {
402 return writeStreamOption_.version();
403 }
404
405 //- Default graph format
406 const word& graphFormat() const
407 {
408 return graphFormat_;
409 }
410
411 //- Supports re-reading
412 const Switch& runTimeModifiable() const
413 {
414 return runTimeModifiable_;
415 }
416
417 //- Read control dictionary, update controls and time
418 virtual bool read();
419
420 //- Read the objects that have been modified
421 void readModifiedObjects();
422
423 //- Return time instance (location) of \em dir that contains
424 //- the file \em name (eg, used in reading mesh data).
425 // When \em is empty, searches for directory \em dir only.
426 // Does not search beyond stopInstance (if set) or \em constant.
427 //
428 // \note If the instance cannot be found, returns the
429 // stopInstance (if set and reached) or \em constant.
430 // FatalError if it cannot be found and readOpt is
431 // (MUST_READ or MUST_READ_IF_MODIFIED).
433 (
434 const fileName& dir,
435 const word& name = word::null,
437 const word& stopInstance = word::null
438 ) const;
439
440 //- Search the case for the time directory path
441 //- corresponding to the given instance
443 (
444 const fileName& directory,
445 const instant& t
446 ) const;
447
448 //- Search the case for the time directory path
449 //- corresponding to the given instance
450 word findInstancePath(const instant& t) const;
451
452 //- Write time dictionary to the <time>/uniform directory
453 virtual bool writeTimeDict() const;
454
455 //- Write using stream options
456 virtual bool writeObject
457 (
458 IOstreamOption streamOpt,
459 const bool valid
460 ) const;
461
462 //- Write the objects immediately (not at end of iteration)
463 //- and continue the run
464 bool writeNow();
465
466 //- Write the objects now (not at end of iteration) and end the run
467 bool writeAndEnd();
468
469 //- Write the objects once (one shot) and continue the run
470 void writeOnce();
471
472 //- Print the elapsed ExecutionTime (cpu-time), ClockTime
474
475
476 // Access
477
478 //- Return time name of given scalar time
479 //- formatted with the given precision
480 static word timeName
481 (
482 const scalar t,
483 const int precision = precision_
484 );
485
486 //- Return current time name
487 virtual word timeName() const;
488
489 //- Return start time index
490 virtual label startTimeIndex() const;
491
492 //- Return start time
493 virtual dimensionedScalar startTime() const;
494
495 //- Return end time
496 virtual dimensionedScalar endTime() const;
497
498 //- Return the stop control information
499 virtual stopAtControls stopAt() const;
500
501 //- Return true if adjustTimeStep is true
502 virtual bool isAdjustTimeStep() const;
503
504 //- Return the list of function objects
506 {
507 return functionObjects_;
508 }
509
510 //- Mutable access to the loaded dynamic libraries
511 dlLibraryTable& libs() const
512 {
513 return libs_;
514 }
515
516 //- Zero (tests as false) if time is not being sub-cycled,
517 //- otherwise the current sub-cycle index or the total number of
518 //- sub-cycles.
519 // The interpretation of non-zero values is dependent on the
520 // routine.
521 label subCycling() const
522 {
523 return subCycling_;
524 }
525
526 //- Return previous TimeState if time is being sub-cycled
527 const TimeState& prevTimeState() const
528 {
529 return *prevTimeState_;
530 }
531
532
533 // Check
534
535 //- Return true if run should continue,
536 // also invokes the functionObjectList::end() method
537 // when the time goes out of range
538 // \note
539 // For correct behaviour, the following style of time-loop
540 // is recommended:
541 // \code
542 // while (runTime.run())
543 // {
544 // ++runTime;
545 // solve;
546 // runTime.write();
547 // }
548 // \endcode
549 virtual bool run() const;
550
551 //- Return true if run should continue and if so increment time
552 // also invokes the functionObjectList::end() method
553 // when the time goes out of range
554 // \note
555 // For correct behaviour, the following style of time-loop
556 // is recommended:
557 // \code
558 // while (runTime.loop())
559 // {
560 // solve;
561 // runTime.write();
562 // }
563 // \endcode
564 virtual bool loop();
565
566 //- Return true if end of run,
567 // does not invoke any functionObject methods
568 // \note
569 // The rounding heuristics near endTime mean that
570 // \code run() \endcode and \code !end() \endcode may
571 // not yield the same result
572 virtual bool end() const;
573
574
575 // Edit
576
577 //- Adjust the current stopAtControl.
578 // \param stopCtrl the new stop control, whereby
579 // stopAtControls::saUnknown is treated as a no-op.
580 // \note this value only persists until the next time the
581 // dictionary is read.
582 // \return true if the stopAt() value was changed.
583 virtual bool stopAt(const stopAtControls stopCtrl) const;
584
585 //- Reset the time and time-index to those of the given time
586 virtual void setTime(const Time& t);
587
588 //- Reset the time and time-index
589 virtual void setTime(const instant& inst, const label newIndex);
590
591 //- Reset the time and time-index
592 virtual void setTime
593 (
594 const dimensionedScalar& newTime,
595 const label newIndex
596 );
597
598 //- Reset the time and time-index
599 virtual void setTime(const scalar newTime, const label newIndex);
600
601 //- Reset end time
602 virtual void setEndTime(const dimensionedScalar& endTime);
603
604 //- Reset end time
605 virtual void setEndTime(const scalar endTime);
606
607 //- Reset time step, normally also calling adjustDeltaT()
608 virtual void setDeltaT
609 (
611 const bool adjust = true
612 );
613
614 //- Reset time step, normally also calling adjustDeltaT()
615 virtual void setDeltaT
616 (
617 const scalar deltaT,
618 const bool adjust = true
619 );
620
621 //- Set time to sub-cycle for the given number of steps
622 virtual TimeState subCycle(const label nSubCycles);
623
624 //- Adjust the reported sub-cycle index.
625 // \param index is the sub-cycle index.
626 // This index is ignored sub-cycling was
627 // not already registered, or if the index is zero or
628 // negative.
629 virtual void subCycleIndex(const label index);
630
631 //- Reset time after sub-cycling back to previous TimeState
632 virtual void endSubCycle();
633
634 //- Return non-const access to the list of function objects
636 {
637 return functionObjects_;
638 }
639
640
641 // Member operators
642
643 //- Set deltaT to that specified and increment time via operator++()
644 virtual Time& operator+=(const dimensionedScalar& deltaT);
645
646 //- Set deltaT to that specified and increment time via operator++()
647 virtual Time& operator+=(const scalar deltaT);
648
649 //- Prefix increment,
650 // also invokes the functionObjectList::start() or
651 // functionObjectList::execute() method, depending on the time-index
652 virtual Time& operator++();
653
654 //- Postfix increment, this is identical to the prefix increment
655 virtual Time& operator++(int);
656};
657
658
659// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
660
661} // End namespace Foam
662
663// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
664
665#include "TimeI.H"
666
667// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
668
669#endif
670
671// ************************************************************************* //
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Definition: Enum.H:61
A FIFO stack based on a singly-linked list.
Definition: FIFOStack.H:54
readOption
Enumeration defining the read options.
Definition: IOobject.H:177
Representation of a major/minor version number.
The IOstreamOption is a simple container for options an IOstream can normally have.
versionNumber version() const noexcept
Get the stream version.
compressionType compression() const noexcept
Get the stream compression.
streamFormat format() const noexcept
Get the current stream format.
streamFormat
Data format (ascii | binary)
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
Generic output stream using a standard (STL) stream.
Definition: OSstream.H:57
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
Address the time paths without using the Time class.
Definition: TimePaths.H:57
const fileName & caseName() const
Return case name.
Definition: TimePathsI.H:62
const fileName & rootPath() const
Return root path.
Definition: TimePathsI.H:50
The time value with time-stepping information, user-defined remapping, etc.
Definition: TimeState.H:54
dimensionedScalar deltaT() const
Return time step.
Definition: TimeStateI.H:55
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
const fileName & caseName() const
Return case name.
Definition: TimePathsI.H:62
virtual bool isAdjustTimeStep() const
Return true if adjustTimeStep is true.
Definition: Time.C:991
virtual bool run() const
Return true if run should continue,.
Definition: Time.C:879
virtual void readDict()
Read the control dictionary and set the write controls etc.
Definition: TimeIO.C:90
static int precision_
Time directory name precision.
Definition: Time.H:186
virtual void setDeltaT(const dimensionedScalar &deltaT, const bool adjust=true)
Reset time step, normally also calling adjustDeltaT()
Definition: Time.C:1061
virtual bool writeTimeDict() const
Write time dictionary to the <time>/uniform directory.
Definition: TimeIO.C:513
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
Definition: TimeIO.C:603
static const Enum< stopAtControls > stopAtControlNames
Names for stopAtControls.
Definition: Time.H:119
virtual dimensionedScalar startTime() const
Return start time.
Definition: Time.C:861
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Definition: Time.C:717
writeControls
Write control options.
Definition: Time.H:85
@ wcTimeStep
"timeStep"
Definition: Time.H:87
@ wcUnknown
Dummy no-op.
Definition: Time.H:92
@ wcCpuTime
"cpuTime"
Definition: Time.H:91
@ wcAdjustableRunTime
"adjustable" / "adjustableRunTime"
Definition: Time.H:89
@ wcNone
"none"
Definition: Time.H:86
@ wcRunTime
"runTime"
Definition: Time.H:88
@ wcClockTime
"clockTime"
Definition: Time.H:90
stopAtControls stopAt_
Definition: Time.H:155
sigStopAtWriteNow sigStopAtWriteNow_
Signal handler for write and clean exit upon signal.
Definition: Time.H:179
bool writeNow()
Definition: TimeIO.C:596
void setMonitoring(const bool forceProfiling=false)
Set file monitoring, profiling, etc.
Definition: Time.C:349
functionObjectList & functionObjects()
Return non-const access to the list of function objects.
Definition: Time.H:634
void adjustDeltaT()
Adjust the time step so that writing occurs at the specified time.
Definition: Time.C:99
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
Definition: Time.H:369
fileName path() const
Return path.
Definition: Time.H:358
scalar writeInterval_
Definition: Time.H:159
TypeName("time")
Runtime type information.
static int printExecutionFormat_
Style for "ExecutionTime = " output.
Definition: Time.H:127
FIFOStack< word > previousWriteTimes_
Definition: Time.H:163
void writeOnce()
Write the objects once (one shot) and continue the run.
Definition: TimeIO.C:612
static const int maxPrecision_
Maximum time directory name precision.
Definition: Time.H:189
word findInstancePath(const fileName &directory, const instant &t) const
Definition: Time.C:821
autoPtr< TimeState > prevTimeState_
If time is being sub-cycled this is the previous TimeState.
Definition: Time.H:173
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
Definition: Time.C:797
fmtflags
Supported time directory name formats.
Definition: Time.H:108
@ scientific
scientific notation
Definition: Time.H:111
@ fixed
fixed-point notation
Definition: Time.H:110
static fmtflags format_
Time directory name format.
Definition: Time.H:183
const dictionary & controlDict() const
Return read access to the controlDict dictionary.
Definition: Time.H:364
IOstream::versionNumber writeVersion() const
The write stream version.
Definition: Time.H:399
label purgeWrite_
Definition: Time.H:161
IOstream::streamFormat writeFormat() const
The write stream format.
Definition: Time.H:387
stopAtControls
Definition: Time.H:98
@ saNoWriteNow
Adjust endTime to stop immediately w/o writing.
Definition: Time.H:100
@ saWriteNow
adjust endTime to stop immediately w/ writing
Definition: Time.H:101
@ saUnknown
Dummy no-op. Do not change current value.
Definition: Time.H:103
@ saEndTime
Stop when Time reaches prescribed endTime.
Definition: Time.H:99
@ saNextWrite
stop at the next data write interval
Definition: Time.H:102
writeControls writeControl_
Definition: Time.H:157
sigWriteNow sigWriteNow_
Signal handler for one-shot writing upon signal.
Definition: Time.H:176
void setControls()
Set the controls from the current controlDict.
Definition: Time.C:143
virtual word timeName() const
Return current time name.
Definition: Time.C:790
static word controlDictName
The default control dictionary name (normally "controlDict")
Definition: Time.H:226
IOstreamOption writeStreamOption() const
The write stream option (format, compression, version)
Definition: Time.H:381
scalar endTime_
Definition: Time.H:153
virtual void setEndTime(const dimensionedScalar &endTime)
Reset end time.
Definition: Time.C:1048
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
Definition: TimeIO.C:548
static const Enum< writeControls > writeControlNames
Names for writeControls.
Definition: Time.H:116
bool writeOnce_
Definition: Time.H:170
const functionObjectList & functionObjects() const
Return the list of function objects.
Definition: Time.H:504
virtual stopAtControls stopAt() const
Return the stop control information.
Definition: Time.C:873
const word & graphFormat() const
Default graph format.
Definition: Time.H:405
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
Definition: TimeIO.C:618
virtual label startTimeIndex() const
Return start time index.
Definition: Time.C:855
label subCycling_
Definition: Time.H:167
label startTimeIndex_
Definition: Time.H:149
virtual void endSubCycle()
Reset time after sub-cycling back to previous TimeState.
Definition: Time.C:1119
virtual void subCycleIndex(const label index)
Adjust the reported sub-cycle index.
Definition: Time.C:1106
const fileName & rootPath() const
Return root path.
Definition: TimePathsI.H:50
IOstream::compressionType writeCompression() const
The write stream compression.
Definition: Time.H:393
virtual Time & operator++()
Prefix increment,.
Definition: Time.C:1146
const TimeState & prevTimeState() const
Return previous TimeState if time is being sub-cycled.
Definition: Time.H:526
scalar startTime_
Definition: Time.H:151
void readModifiedObjects()
Read the objects that have been modified.
Definition: TimeIO.C:467
fileName timePath() const
Return current time path.
Definition: Time.H:375
virtual bool loop()
Return true if run should continue and if so increment time.
Definition: Time.C:951
dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
Definition: Time.H:510
virtual dimensionedScalar endTime() const
Return end time.
Definition: Time.C:867
virtual void setTime(const Time &t)
Reset the time and time-index to those of the given time.
Definition: Time.C:997
virtual ~Time()
Destructor.
Definition: Time.C:758
virtual bool end() const
Return true if end of run,.
Definition: Time.C:964
virtual bool read()
Read control dictionary, update controls and time.
Definition: TimeIO.C:442
virtual Time & operator+=(const dimensionedScalar &deltaT)
Set deltaT to that specified and increment time via operator++()
Definition: Time.C:1133
label subCycling() const
Definition: Time.H:520
const Switch & runTimeModifiable() const
Supports re-reading.
Definition: Time.H:411
Extract command arguments and options from the supplied argc and argv parameters.
Definition: argList.H:124
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
Read access to the system clock with formatting.
Definition: clock.H:53
Starts timing CPU usage and return elapsed time from start.
Definition: cpuTimeCxx.H:54
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const
Return const reference to name.
A table of dynamically loaded libraries.
A class for handling file names.
Definition: fileName.H:76
static const fileName null
An empty fileName.
Definition: fileName.H:102
List of function objects with start(), execute() and end() functions that is called for each object.
General relative velocity model.
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name.
Definition: instant.H:56
Registry of regIOobjects.
Signal handler to write and stop the job. The interrupt is defined by OptimisationSwitches::stopAtWri...
Signal handler to write once and continue. The interrupt is defined by OptimisationSwitches::writeNow...
Definition: sigWriteNow.H:54
Perform a subCycleTime on a field.
Definition: subCycle.H:127
unwatchedIOdictionary is like IOdictionary but stores dependencies as files instead of fileMonitor wa...
A class for handling words, derived from Foam::string.
Definition: word.H:68
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
dictionary dict
Foam::argList args(argc, argv)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73