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