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-2021 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  IStringStream 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 
247  dictionary dict(Foam::dimensionSystems());
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  for (simpleRegIOobject* obj : objects)
259  {
260  OStringStream os;
261  os << dict;
262  IStringStream is(os.str());
263  obj->readData(is);
264  }
265  }
266  }
267 
268 
269  if (!deltaTchanged_)
270  {
271  controlDict_.readEntry("deltaT", deltaT_);
272  }
273 
275  (
276  "writeControl",
277  controlDict_,
279  );
280 
281  scalar oldWriteInterval = writeInterval_;
282 
283  if (controlDict_.readIfPresent("writeInterval", writeInterval_))
284  {
285  if (writeControl_ == wcTimeStep && label(writeInterval_) < 1)
286  {
287  FatalIOErrorInFunction(controlDict_)
288  << "writeInterval < 1 for writeControl timeStep"
289  << exit(FatalIOError);
290  }
291  }
292  else
293  {
294  controlDict_.readEntry("writeFrequency", writeInterval_);
295  }
296 
297 
298  if (oldWriteInterval != writeInterval_)
299  {
300  switch (writeControl_)
301  {
302  case wcRunTime:
303  case wcAdjustableRunTime:
304  // Recalculate writeTimeIndex_ to be in units of current
305  // writeInterval.
306  writeTimeIndex_ = label
307  (
309  * oldWriteInterval
311  );
312  break;
313 
314  default:
315  break;
316  }
317  }
318 
319  if (controlDict_.readIfPresent("purgeWrite", purgeWrite_))
320  {
321  if (purgeWrite_ < 0)
322  {
324  << "invalid value for purgeWrite " << purgeWrite_
325  << ", should be >= 0, setting to 0"
326  << endl;
327 
328  purgeWrite_ = 0;
329  }
330  }
331 
332  if (controlDict_.found("timeFormat"))
333  {
334  const word formatName(controlDict_.get<word>("timeFormat"));
335 
336  if (formatName == "general")
337  {
338  format_ = general;
339  }
340  else if (formatName == "fixed")
341  {
342  format_ = fixed;
343  }
344  else if (formatName == "scientific")
345  {
347  }
348  else
349  {
351  << "unsupported time format " << formatName
352  << endl;
353  }
354  }
355 
356  controlDict_.readIfPresent("timePrecision", precision_);
357 
358  // stopAt at 'endTime' or a specified value
359  // if nothing is specified, the endTime is zero
360  if (stopAtControlNames.readIfPresent("stopAt", controlDict_, stopAt_))
361  {
362  if (stopAt_ == saEndTime)
363  {
364  controlDict_.readEntry("endTime", endTime_);
365  }
366  else
367  {
368  endTime_ = GREAT;
369  }
370  }
371  else if (!controlDict_.readIfPresent("endTime", endTime_))
372  {
373  endTime_ = 0;
374  }
375 
377 
378  if (controlDict_.found("writeVersion"))
379  {
380  writeStreamOption_.version(controlDict_.get<token>("writeVersion"));
381  }
382 
383  if (controlDict_.found("writeFormat"))
384  {
385  writeStreamOption_.format(controlDict_.get<word>("writeFormat"));
386  }
387 
388  if (controlDict_.found("writePrecision"))
389  {
391  (
392  controlDict_.get<unsigned int>("writePrecision")
393  );
394 
397 
400 
403  }
404 
405  if (controlDict_.found("writeCompression"))
406  {
407  writeStreamOption_.compression
408  (
409  controlDict_.get<word>("writeCompression")
410  );
411 
412  if (writeStreamOption_.compression() == IOstreamOption::COMPRESSED)
413  {
414  if (writeStreamOption_.format() == IOstreamOption::BINARY)
415  {
416  IOWarningInFunction(controlDict_)
417  << "Disabled binary format compression"
418  << " (inefficient/ineffective)"
419  << endl;
420 
421  writeStreamOption_.compression(IOstreamOption::UNCOMPRESSED);
422  }
423  else if (!ofstreamPointer::supports_gz())
424  {
425  IOWarningInFunction(controlDict_)
426  << "Disabled output compression"
427  << " (missing libz support)"
428  << endl;
429 
430  writeStreamOption_.compression(IOstreamOption::UNCOMPRESSED);
431  }
432  }
433  }
434 
435  controlDict_.readIfPresent("graphFormat", graphFormat_);
436  controlDict_.readIfPresent("runTimeModifiable", runTimeModifiable_);
437 
438 
439  if (!runTimeModifiable_ && controlDict_.watchIndices().size())
440  {
441  forAllReverse(controlDict_.watchIndices(), i)
442  {
443  fileHandler().removeWatch(controlDict_.watchIndices()[i]);
444  }
445  controlDict_.watchIndices().clear();
446  }
447 }
448 
449 
450 bool Foam::Time::read()
451 {
452  if (controlDict_.regIOobject::read())
453  {
454  // Read contents
455  readDict();
456  functionObjects_.read();
457 
458  if (runTimeModifiable_)
459  {
460  // For IOdictionary the call to regIOobject::read() would have
461  // already updated all the watchIndices via the addWatch but
462  // controlDict_ is an unwatchedIOdictionary so will only have
463  // stored the dependencies as files.
464  fileHandler().addWatches(controlDict_, controlDict_.files());
465  }
466  controlDict_.files().clear();
467 
468  return true;
469  }
470 
471  return false;
472 }
473 
474 
476 {
477  if (runTimeModifiable_)
478  {
479  // Get state of all monitored objects (=registered objects with a
480  // valid filePath).
481  // Note: requires same ordering in objectRegistries on different
482  // processors!
483  fileHandler().updateStates
484  (
485  (
488  ),
490  );
491  // Time handling is special since controlDict_ is the one dictionary
492  // that is not registered to any database.
493 
494  if (controlDict_.readIfModified())
495  {
496  readDict();
497  functionObjects_.read();
498 
499  if (runTimeModifiable_)
500  {
501  // For IOdictionary the call to regIOobject::read() would have
502  // already updated all the watchIndices via the addWatch but
503  // controlDict_ is an unwatchedIOdictionary so will only have
504  // stored the dependencies as files.
505 
506  fileHandler().addWatches(controlDict_, controlDict_.files());
507  }
508  controlDict_.files().clear();
509  }
510 
511  bool registryModified = objectRegistry::modified();
512 
513  if (registryModified)
514  {
516  }
517  }
518 }
519 
520 
521 bool Foam::Time::writeTimeDict() const
522 {
523  addProfiling(writing, "objectRegistry::writeObject");
524 
525  const word tmName(timeName());
526 
527  IOdictionary timeDict
528  (
529  IOobject
530  (
531  "time",
532  tmName,
533  "uniform",
534  *this,
538  )
539  );
540 
541  timeDict.add("value", timeName(timeToUserTime(value()), maxPrecision_));
542  timeDict.add("name", string(tmName));
543  timeDict.add("index", timeIndex_);
544  timeDict.add("deltaT", timeToUserTime(deltaT_));
545  timeDict.add("deltaT0", timeToUserTime(deltaT0_));
546 
547  return timeDict.regIOobject::writeObject
548  (
550  true
551  );
552 }
553 
554 
556 (
557  IOstreamOption streamOpt,
558  const bool writeOnProc
559 ) const
560 {
561  if (writeTime())
562  {
563  bool writeOK = writeTimeDict();
564 
565  if (writeOK)
566  {
567  writeOK = objectRegistry::writeObject(streamOpt, writeOnProc);
568  }
569 
570  if (writeOK)
571  {
572  // Does the writeTime trigger purging?
573  if (writeTime_ && purgeWrite_)
574  {
575  if
576  (
577  previousWriteTimes_.empty()
578  || previousWriteTimes_.top() != timeName()
579  )
580  {
581  previousWriteTimes_.push(timeName());
582  }
583 
584  while (previousWriteTimes_.size() > purgeWrite_)
585  {
586  fileHandler().rmDir
587  (
588  fileHandler().filePath
589  (
590  objectRegistry::path(previousWriteTimes_.pop()),
591  false // No .gz check (is directory)
592  )
593  );
594  }
595  }
596  }
597 
598  return writeOK;
599  }
600 
601  return false;
602 }
603 
604 
606 {
607  writeTime_ = true;
608  return write();
609 }
610 
611 
613 {
614  stopAt_ = saWriteNow;
615  endTime_ = value();
616 
617  return writeNow();
618 }
619 
622 {
623  writeOnce_ = true;
624 }
625 
626 
628 {
629  switch (printExecutionFormat_)
630  {
631  case 1:
632  {
633  os << "ExecutionTime = ";
634  printTimeHMS(os.stdStream(), elapsedCpuTime());
635 
636  os << " ClockTime = ";
637  printTimeHMS(os.stdStream(), elapsedClockTime());
638  }
639  break;
640 
641  default:
642  {
643  os << "ExecutionTime = " << elapsedCpuTime() << " s"
644  << " ClockTime = " << elapsedClockTime() << " s";
645  }
646  break;
647  }
648 
649  os << nl << endl;
650 
651  return os;
652 }
653 
654 
655 // ************************************************************************* //
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 Type & value() const noexcept
Return const reference to value.
dictionary dict
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:116
#define addProfiling(name, descr)
Define profiling trigger with specified name and description string.
scalar deltaT_
Definition: TimeState.H:56
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
Definition: TimeIO.C:605
stopAtControls stopAt_
Definition: Time.H:171
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:125
void readModifiedObjects()
Read the objects that have been modified.
virtual int precision() const
Get precision of output field.
Definition: OSstream.C:305
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:175
int infoDetailLevel
Global for selective suppression of Info output.
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:49
"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.
static fmtflags format_
Time directory name format.
Definition: Time.H:209
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:487
static bool & parRun() noexcept
Test if this a parallel run.
Definition: UPstream.H:1004
static bool supports_gz()
True if compiled with libz support.
static unsigned int defaultPrecision() noexcept
Return the default precision.
Definition: IOstream.H:423
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:125
A simple container for options an IOstream can normally have.
virtual std::ostream & stdStream()
Access to underlying std::ostream.
Definition: OFstream.C:110
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:173
virtual word timeName() const
Return current time name.
Definition: Time.C:780
"runTime"
Definition: Time.H:86
label writeTimeIndex_
Definition: TimeState.H:54
simpleObjectRegistry & optimisationObjects()
Access to registered OptimisationSwitch objects.
Definition: debug.C:310
fileName path() const
The complete path.
Definition: IOobject.C:449
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
Definition: dictionaryI.H:100
dictionary & dimensionedConstants()
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write using stream options.
Definition: TimeIO.C:549
virtual bool writeTimeDict() const
Write time dictionary to the <time>/uniform directory.
Definition: TimeIO.C:514
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write the objects using stream options.
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:177
word timeName
Definition: getTimeIndex.H:3
bool merge(const dictionary &dict)
Merge entries from the given dictionary.
Definition: dictionary.C:811
"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:214
void clear()
Clear the list, i.e. set size to zero.
Definition: ListI.H:109
static const Enum< writeControls > writeControlNames
Names for writeControls.
Definition: Time.H:120
OSstream Sout
OSstream wrapped stdout (std::cout)
scalar endTime_
Definition: Time.H:169
const word & name() const
Name function is needed to disambiguate those inherited from regIOobject and dictionary.
#define DetailInfo
Definition: evalEntry.C:30
fixed-point notation
Definition: Time.H:112
scientific notation
Definition: Time.H:113
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:55
const labelList & watchIndices() const noexcept
Read access to file-monitoring handles.
Definition: regIOobjectI.H:195
bool distributed() const noexcept
True if case running with parallel distributed directories (ie. not NFS mounted)
Definition: TimePathsI.H:23
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:326
compressionType compression() const noexcept
Get the stream compression.
default float notation
Definition: Time.H:111
Ostream & printExecutionTime(OSstream &os) const
Print the elapsed ExecutionTime (cpu-time), ClockTime.
Definition: TimeIO.C:620
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:468
simpleObjectRegistry & dimensionSetObjects()
Access to registered DimensionSets objects.
Definition: debug.C:321
bool deltaTchanged_
Definition: TimeState.H:60
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:614
dictionary & dimensionSystems()
Top level dictionary.
Definition: dimensionSets.C:86
virtual bool read()
Read control dictionary, update controls and time.
Definition: TimeIO.C:443
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:607
OSstream & stream()
Return OSstream for output operations.
Definition: error.C:300
Stop when Time reaches prescribed endTime.
Definition: Time.H:99
simpleObjectRegistry & dimensionedConstantObjects()
Access to registered DimensionedConstants objects.
Definition: debug.C:332
Nothing to be read.
versionNumber version() const noexcept
Get the stream version.
bool readIfPresent(const word &key, const dictionary &dict, EnumType &val) const
Find an entry if present, and assign to T val.
Definition: EnumI.H:125
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:430
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:598
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 a sub-dictionary) otherwise return nullptr...
Definition: dictionaryI.H:120
IOerror FatalIOError
Error stream (stdout output on all processes), with additional &#39;FOAM FATAL IO ERROR&#39; header text and ...