Loading...
Searching...
No Matches
TimeIO.C
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-2024 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
27\*---------------------------------------------------------------------------*/
28
29#include "Time.H"
30#include "argList.H"
31#include "Pstream.H"
34#include "profiling.H"
35#include "IOdictionary.H"
36#include "fileOperation.H"
37#include "fstreamPointer.H"
38#include "Field.H" // Ugly handling of localBoundaryConsistency switches
39
40#include <iomanip>
42// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
43
44namespace Foam
45{
46
47// Output seconds as day-hh:mm:ss
48static std::ostream& printTimeHMS(std::ostream& os, double seconds)
49{
50 const unsigned long ss = seconds;
51
52 // days
53 const auto dd = (ss / 86400);
54
55 if (dd) os << dd << '-';
56
57 // hours
58 const int hh = ((ss / 3600) % 24);
59
60 if (dd || hh)
61 {
62 os << std::setw(2) << std::setfill('0')
63 << hh << ':';
64 }
65
66 // minutes
67 os << std::setw(2) << std::setfill('0')
68 << ((ss / 60) % 60) << ':';
69
70 // seconds
71 os << std::setw(2) << std::setfill('0')
72 << (ss % 60);
73
74
75 // 1/100th seconds. As none or 2 decimal places
76 const int hundredths = int(100 * (seconds - ss)) % 100;
77
78 if (hundredths)
79 {
80 os << '.' << std::setw(2) << std::setfill('0') << hundredths;
81 }
82
83 return os;
85
86} // End namespace Foam
87
88
89// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
90
92{
93 word application;
94 if (controlDict_.readIfPresent("application", application))
95 {
96 // Do not override if already set so external application can override
97 setEnv("FOAM_APPLICATION", application, false);
98 }
99
100 // Check for local switches and settings
101
102 const dictionary* localDict = nullptr;
103
104 // DebugSwitches
105 if
106 (
107 (localDict = controlDict_.findDict("DebugSwitches")) != nullptr
108 && localDict->size()
109 )
110 {
112 << "Overriding DebugSwitches according to "
113 << controlDict_.name() << nl;
114
115 debug::debugObjects().setValues(*localDict, true);
116 }
117
118
119 // InfoSwitches
120 if
121 (
122 (localDict = controlDict_.findDict("InfoSwitches")) != nullptr
123 && localDict->size()
124 )
125 {
127 << "Overriding InfoSwitches according to "
128 << controlDict_.name() << nl;
129
130 debug::infoObjects().setValues(*localDict, true);
131 }
132
133 // OptimisationSwitches
134 if
135 (
136 (localDict = controlDict_.findDict("OptimisationSwitches")) != nullptr
137 && localDict->size()
138 )
139 {
141 << "Overriding OptimisationSwitches according to "
142 << controlDict_.name() << nl;
143
144 debug::optimisationObjects().setValues(*localDict, true);
145
146 // Ugly handling of localBoundaryConsistency switches
148 }
149
150
151 // Handle fileHandler explicitly since it affects local dictionary
152 // monitoring.
153 word fileHandlerName;
154 if
155 (
156 localDict
157 && localDict->readIfPresent("fileHandler", fileHandlerName)
158 && fileHandler().type() != fileHandlerName
159 )
160 {
161 DetailInfo << "Overriding fileHandler to " << fileHandlerName << nl;
162
163 // Remove old watches since destroying the file
164 fileNameList oldWatched(controlDict_.watchIndices().size());
165 forAllReverse(controlDict_.watchIndices(), i)
166 {
167 const label watchi = controlDict_.watchIndices()[i];
168 oldWatched[i] = fileHandler().getFile(watchi);
169 fileHandler().removeWatch(watchi);
170 }
171 controlDict_.watchIndices().clear();
172
173 // Reporting verbosity corresponding to detail level
174 const bool verbose = (::Foam::infoDetailLevel > 0);
175
176 // The new handler
177 refPtr<fileOperation> newHandler
178 (
179 fileOperation::New(fileHandlerName, verbose)
180 );
181
182 // Install the new handler
183 (void) fileOperation::fileHandler(newHandler);
184
186 {
187 newHandler->distributed(true);
188 }
189
190 // Reinstall old watches
191 fileHandler().addWatches(controlDict_, oldWatched);
192 }
193
194
195 // DimensionedConstants.
196 // - special case since it may change both the 'unitSet' and the
197 // individual values
198 if
199 (
200
201 (localDict = controlDict_.findDict("DimensionedConstants")) != nullptr
202 && localDict->size()
203 )
204 {
206 << "Overriding DimensionedConstants according to "
207 << controlDict_.name() << nl;
208
209 simpleObjectRegistry& objs = debug::dimensionedConstantObjects();
210
211 // Change in-memory
212 dimensionedConstants().merge(*localDict);
213
214 ISpanStream dummyIs;
215
216 // Reporting verbosity corresponding to detail level
217 const bool verbose = (::Foam::infoDetailLevel > 0);
218
219 forAllConstIters(objs, iter)
220 {
221 const List<simpleRegIOobject*>& objects = *iter;
222
223 for (simpleRegIOobject* obj : objects)
224 {
225 obj->readData(dummyIs);
226
227 if (verbose)
228 {
229 Info<< " ";
230 obj->writeData(Info);
231 Info<< nl;
232 }
233 }
234 }
235 }
236
237
238 // DimensionSets
239 if
240 (
241 (localDict = controlDict_.findDict("DimensionSets")) != nullptr
242 && localDict->size()
243 )
244 {
246 << "Overriding DimensionSets according to "
247 << controlDict_.name() << nl;
248
249 simpleObjectRegistry& objs = debug::dimensionSetObjects();
250
252 dict.merge(*localDict);
253
254 simpleObjectRegistryEntry* objPtr = objs.find("DimensionSets");
255
256 if (objPtr)
257 {
258 DetailInfo << *localDict << nl;
259
260 const List<simpleRegIOobject*>& objects = *objPtr;
261
262 OCharStream os;
263
264 for (simpleRegIOobject* obj : objects)
265 {
266 os.rewind();
267 os << dict;
268
269 ISpanStream is(os.view());
270 obj->readData(is);
271 }
272 }
273 }
274
275
276 if (!deltaTchanged_)
277 {
278 controlDict_.readEntry("deltaT", deltaT_);
279 }
280
281 writeControlNames.readIfPresent
282 (
283 "writeControl",
284 controlDict_,
286 );
287
288 scalar oldWriteInterval = writeInterval_;
289
290 if (controlDict_.readIfPresent("writeInterval", writeInterval_))
291 {
292 if (writeControl_ == wcTimeStep && label(writeInterval_) < 1)
293 {
294 FatalIOErrorInFunction(controlDict_)
295 << "writeInterval < 1 for writeControl timeStep"
296 << exit(FatalIOError);
297 }
298 }
299 else
300 {
301 controlDict_.readEntry("writeFrequency", writeInterval_);
302 }
303
304
305 if (oldWriteInterval != writeInterval_)
306 {
307 switch (writeControl_)
308 {
309 case wcRunTime:
311 // Recalculate writeTimeIndex_ to be in units of current
312 // writeInterval.
313 writeTimeIndex_ = label
314 (
316 * oldWriteInterval
318 );
319 break;
320
321 default:
322 break;
323 }
324 }
325
326 if (controlDict_.readIfPresent("purgeWrite", purgeWrite_))
327 {
328 if (purgeWrite_ < 0)
329 {
331 << "invalid value for purgeWrite " << purgeWrite_
332 << ", should be >= 0, setting to 0"
333 << endl;
334
335 purgeWrite_ = 0;
336 }
337 }
338
339 format_ =
340 IOstreamOption::floatFormatEnum("timeFormat", controlDict_, format_);
341
342 controlDict_.readIfPresent("timePrecision", precision_);
343
344 // stopAt at 'endTime' or a specified value
345 // if nothing is specified, the endTime is zero
346 if (stopAtControlNames.readIfPresent("stopAt", controlDict_, stopAt_))
347 {
348 if (stopAt_ == saEndTime)
349 {
350 controlDict_.readEntry("endTime", endTime_);
351 }
352 else
353 {
354 endTime_ = GREAT;
355 }
356 }
357 else if (!controlDict_.readIfPresent("endTime", endTime_))
358 {
359 endTime_ = 0;
360 }
361
362 // Adjust the TimeState name
364
365 // Specifying the write version doesn't make sense (2023-10)
366 if (controlDict_.found("writeVersion"))
367 {
368 writeStreamOption_.version(controlDict_.get<token>("writeVersion"));
369 }
370
371 // FUTURE? optional control to support command-line option to
372 // set the write format and ignore this dictionary entry.
373
374 if (controlDict_.found("writeFormat"))
375 {
376 writeStreamOption_.format(controlDict_.get<word>("writeFormat"));
377 }
378
379 if (controlDict_.found("writePrecision"))
380 {
382 (
383 controlDict_.get<unsigned int>("writePrecision")
384 );
385
388
391
394 }
395
396 if (controlDict_.found("writeCompression"))
397 {
398 writeStreamOption_.compression
399 (
400 controlDict_.get<word>("writeCompression")
401 );
402
403 if (writeStreamOption_.compression() == IOstreamOption::COMPRESSED)
404 {
405 if (writeStreamOption_.format() != IOstreamOption::ASCII)
406 {
407 IOWarningInFunction(controlDict_)
408 << "Disabled output compression for non-ascii format"
409 << " (inefficient/ineffective)"
410 << endl;
411
412 writeStreamOption_.compression(IOstreamOption::UNCOMPRESSED);
413 }
415 {
416 IOWarningInFunction(controlDict_)
417 << "Disabled output compression"
418 << " (missing libz support)"
419 << endl;
420
421 writeStreamOption_.compression(IOstreamOption::UNCOMPRESSED);
422 }
423 }
424 }
425
426 controlDict_.readIfPresent("graphFormat", graphFormat_);
427 controlDict_.readIfPresent("runTimeModifiable", runTimeModifiable_);
428
429
430 if (!runTimeModifiable_ && controlDict_.watchIndices().size())
431 {
432 forAllReverse(controlDict_.watchIndices(), i)
433 {
434 fileHandler().removeWatch(controlDict_.watchIndices()[i]);
435 }
436 controlDict_.watchIndices().clear();
437 }
438}
439
440
441bool Foam::Time::read()
442{
443 if (controlDict_.regIOobject::read())
444 {
445 // Read contents
446 readDict();
447 functionObjects_.read();
448
449 if (runTimeModifiable_)
450 {
451 // For IOdictionary the call to regIOobject::read() would have
452 // already updated all the watchIndices via the addWatch but
453 // controlDict_ is an unwatchedIOdictionary so will only have
454 // stored the dependencies as files.
455 fileHandler().addWatches(controlDict_, controlDict_.files());
456 }
457 controlDict_.files().clear();
458
459 return true;
460 }
461
462 return false;
463}
464
465
467{
468 if (runTimeModifiable_)
469 {
470 // Get state of all monitored objects (=registered objects with a
471 // valid filePath).
472 // Note: requires same ordering in objectRegistries on different
473 // processors!
474 fileHandler().updateStates
475 (
478 );
479 // Time handling is special since controlDict_ is the one dictionary
480 // that is not registered to any database.
481
482 if (controlDict_.readIfModified())
483 {
484 readDict();
485 functionObjects_.read();
486
487 if (runTimeModifiable_)
488 {
489 // For IOdictionary the call to regIOobject::read() would have
490 // already updated all the watchIndices via the addWatch but
491 // controlDict_ is an unwatchedIOdictionary so will only have
492 // stored the dependencies as files.
493
494 fileHandler().addWatches(controlDict_, controlDict_.files());
495 }
496 controlDict_.files().clear();
497 }
498
499 bool registryModified = objectRegistry::modified();
500
501 if (registryModified)
504 }
505 }
506}
507
508
509bool Foam::Time::writeTimeDict() const
510{
511 addProfiling(writing, "objectRegistry::writeObject");
512
513 const word tmName(timeName());
514
515 IOdictionary timeDict
516 (
518 (
519 "time",
520 tmName,
521 "uniform",
522 *this,
526 )
527 );
528
529 timeDict.add("value", timeName(timeToUserTime(value()), maxPrecision_));
530 timeDict.add("name", string(tmName));
531 timeDict.add("index", timeIndex_);
532 timeDict.add("deltaT", timeToUserTime(deltaT_));
533 timeDict.add("deltaT0", timeToUserTime(deltaT0_));
534
535 return timeDict.regIOobject::writeObject
538 true
539 );
540}
541
542
544(
545 IOstreamOption streamOpt,
546 const bool writeOnProc
547) const
548{
549 if (writeTime())
550 {
551 bool writeOK = writeTimeDict();
552
553 if (writeOK)
554 {
555 writeOK = objectRegistry::writeObject(streamOpt, writeOnProc);
556 }
557
558 if (writeOK)
559 {
560 // Does the writeTime trigger purging?
561 if (writeTime_ && purgeWrite_)
562 {
563 if
564 (
565 previousWriteTimes_.empty()
566 || previousWriteTimes_.top() != timeName()
567 )
568 {
569 previousWriteTimes_.push(timeName());
570 }
571
572 while (previousWriteTimes_.size() > purgeWrite_)
573 {
574 fileHandler().rmDir
575 (
576 fileHandler().filePath
577 (
578 objectRegistry::path(previousWriteTimes_.pop()),
579 false // No .gz check (is directory)
580 )
581 );
582 }
583 }
584 }
585
586 return writeOK;
587 }
588
589 return false;
590}
591
592
594{
595 writeTime_ = true;
596 return write();
597}
598
599
601{
603 endTime_ = value();
604
605 return writeNow();
606}
607
610{
611 writeOnce_ = true;
612}
613
614
616{
617 switch (printExecutionFormat_)
618 {
619 case 1:
620 {
621 os << "ExecutionTime = ";
622 printTimeHMS(os.stdStream(), elapsedCpuTime());
623
624 os << " ClockTime = ";
625 printTimeHMS(os.stdStream(), elapsedClockTime());
626 }
627 break;
628
629 default:
630 {
631 os << "ExecutionTime = " << elapsedCpuTime() << " s"
632 << " ClockTime = " << elapsedClockTime() << " s";
633 }
634 break;
635 }
636
637 os << nl << endl;
638
639 return os;
640}
641
642
643// ************************************************************************* //
label size() const noexcept
The number of elements in list.
Definition DLListBase.H:194
T * find(const word &keyword)
Find and return an entry, nullptr on failure.
static void warnLocalBoundaryConsistencyCompat(const dictionary &)
Warn about keyword changes for local boundary consistency checks.
Definition FieldBase.C:77
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
static bool fileModificationChecking_masterOnly() noexcept
Test fileModificationChecking for master-only.
Definition IOobjectI.H:23
fileName path() const
The complete path for the object (with instance, local,...).
Definition IOobject.C:500
A simple container for options an IOstream can normally have.
compressionType compression() const noexcept
Get the stream compression.
static floatFormat floatFormatEnum(const word &fmtName, const floatFormat deflt=floatFormat::general)
Lookup floatFormat enum corresponding to the string (general | fixed | scientific).
@ ASCII
"ascii" (normal default)
@ UNCOMPRESSED
compression = false
@ COMPRESSED
compression = true
static unsigned int defaultPrecision() noexcept
Return the default precision.
Definition IOstream.H:437
Similar to IStringStream but using an externally managed buffer for its input. This allows the input ...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition List.H:72
void clear()
Clear the list, i.e. set size to zero.
Definition ListI.H:133
An OSstream with internal List storage.
Generic output stream using a standard (STL) stream.
Definition OSstream.H:53
virtual int precision() const override
Get precision of output field.
Definition OSstream.C:343
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
bool distributed() const noexcept
True if case running with parallel distributed directories (ie. not NFS mounted).
Definition TimePathsI.H:46
virtual scalar timeToUserTime(const scalar t) const
Convert the real-time (s) into user-time (e.g. CA deg).
Definition TimeState.C:48
bool deltaTchanged_
Definition TimeState.H:71
label writeTimeIndex_
Definition TimeState.H:65
bool writeTime() const noexcept
True if this is a write interval.
Definition TimeStateI.H:73
scalar deltaT0_
Definition TimeState.H:68
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write using stream options.
Definition TimeIO.C:537
virtual void readDict()
Read the control dictionary and set the write controls etc.
Definition TimeIO.C:84
static int precision_
Time directory name precision.
Definition Time.H:201
virtual bool writeTimeDict() const
Write time dictionary to the <time>/uniform directory.
Definition TimeIO.C:502
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
Definition TimeIO.C:593
static const Enum< stopAtControls > stopAtControlNames
Names for stopAtControls.
Definition Time.H:113
static IOstreamOption::floatFormat format_
Format for time directory names (general | fixed | scientific).
Definition Time.H:196
@ wcTimeStep
"timeStep"
Definition Time.H:84
@ wcAdjustableRunTime
"adjustable" / "adjustableRunTime"
Definition Time.H:86
@ wcRunTime
"runTime"
Definition Time.H:85
stopAtControls stopAt_
Definition Time.H:159
bool writeNow()
Write the objects immediately (not at end of iteration) and continue the run.
Definition TimeIO.C:586
scalar writeInterval_
Definition Time.H:163
static int printExecutionFormat_
Style for "ExecutionTime = " output.
Definition Time.H:124
FIFOStack< word > previousWriteTimes_
Definition Time.H:167
void writeOnce()
Write the objects once (one shot) and continue the run.
Definition TimeIO.C:602
static const int maxPrecision_
Maximum time directory name precision.
Definition Time.H:206
label purgeWrite_
Definition Time.H:165
@ saWriteNow
adjust endTime to stop immediately w/ writing
Definition Time.H:100
@ saEndTime
Stop when Time reaches prescribed endTime.
Definition Time.H:98
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Definition Time.C:714
writeControls writeControl_
Definition Time.H:161
scalar endTime_
Definition Time.H:157
static const Enum< writeControls > writeControlNames
Names for writeControls.
Definition Time.H:108
bool writeOnce_
Definition Time.H:176
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
Definition TimeIO.C:608
void readModifiedObjects()
Read the objects that have been modified.
Definition TimeIO.C:459
const word & timeName() const noexcept
The current time name.
Definition TimeStateI.H:30
virtual bool read()
Read control dictionary, update controls and time.
Definition TimeIO.C:434
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
Definition UPstream.H:1669
static bool & parRun() noexcept
Test if this a parallel run.
Definition UPstream.H:1681
double elapsedClockTime() const
Returns wall-clock time since clock instantiation.
Definition clock.C:115
double elapsedCpuTime() const
Return CPU time [seconds] from the start.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr...
bool merge(const dictionary &dict)
Merge entries from the given dictionary.
Definition dictionary.C:817
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
Definition dictionary.C:625
const word & name() const noexcept
const scalar & value() const noexcept
OSstream & stream()
Return OSstream for output operations.
Definition error.C:314
virtual void addWatches(regIOobject &, const fileNameList &) const
Helper: add watches for list of regIOobjects.
static const fileOperation & fileHandler()
Return the current file handler. Will create the default file handler if necessary.
static autoPtr< fileOperation > New(const word &handlerType, bool verbose=false)
Select fileHandler-type. Uses defaultFileHandler if the handlerType is empty.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write the objects using stream options.
virtual bool modified() const
Return true if any of the object's files have been modified.
UPtrList< Type > objects()
Return unsorted list of objects with a class satisfying isA<Type> or isType<Type> (with Strict).
void readModifiedObjects()
Read the objects that have been modified.
static bool supports_gz() noexcept
True if compiled with libz support.
A class for managing references or pointers (no reference counting).
Definition refPtr.H:54
virtual fileName filePath() const
Return complete path + object name if the file exists.
const labelList & watchIndices() const noexcept
Read access to file-monitoring handles.
Object registry for simpleRegIOobject. Maintains ordering.
void setValues(const dictionary &dict, bool verbose=false, bool dryrun=false)
Set values (invoke callbacks) from dictionary entries.
Abstract base class for registered object with I/O. Used in debug symbol registration.
A token holds an item read from Istream.
Definition token.H:70
A class for handling words, derived from Foam::string.
Definition word.H:66
Dictionary reading and supplying the dimensioned constants used within OpenFOAM, particularly for the...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition error.H:629
#define DetailInfo
Definition evalEntry.C:30
OBJstream os(runTime.globalPath()/outputName)
word timeName
Definition getTimeIndex.H:3
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
#define WarningInFunction
Report a warning using Foam::Warning.
simpleObjectRegistry & infoObjects()
Access to registered InfoSwitch objects.
Definition debug.C:299
simpleObjectRegistry & dimensionSetObjects()
Access to registered DimensionSets objects.
Definition debug.C:321
simpleObjectRegistry & dimensionedConstantObjects()
Access to registered DimensionedConstants objects.
Definition debug.C:332
simpleObjectRegistry & optimisationObjects()
Access to registered OptimisationSwitch objects.
Definition debug.C:310
simpleObjectRegistry & debugObjects()
Access to registered DebugSwitch objects.
Definition debug.C:288
Namespace for OpenFOAM.
bool setEnv(const word &name, const std::string &value, const bool overwrite)
Set an environment variable, return true on success.
Definition POSIX.C:358
prefixOSstream Perr
OSstream wrapped stderr (std::cerr) with parallel prefix.
List< fileName > fileNameList
List of fileName.
refPtr< fileOperation > fileHandler(std::nullptr_t)
Delete current file handler - forwards to fileOperation::handler().
messageStream Info
Information stream (stdout output on master, null elsewhere).
dictionary & dimensionSystems()
Top level dictionary.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition POSIX.C:801
OSstream Sout
OSstream wrapped stdout (std::cout).
static std::ostream & printTimeHMS(std::ostream &os, double seconds)
Definition TimeIO.C:41
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition Ostream.H:519
OSstream Serr
OSstream wrapped stderr (std::cerr).
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
int infoDetailLevel
Global for selective suppression of Info output.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
dictionary & dimensionedConstants()
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition errorManip.H:125
constexpr char nl
The newline '\n' character (0x0a).
Definition Ostream.H:50
runTime write()
#define addProfiling(Name,...)
Define profiling trigger with specified name and description string. The description is generated by ...
dictionary dict
#define forAllReverse(list, i)
Reverse loop across all elements in list.
Definition stdFoam.H:315
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
Definition stdFoam.H:235