functionObjectList.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 | Copyright (C) 2011-2017 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "functionObjectList.H"
27 #include "Time.H"
28 #include "mapPolyMesh.H"
29 #include "argList.H"
31 //#include "IFstream.H"
32 #include "dictionaryEntry.H"
33 #include "stringOps.H"
34 #include "Tuple2.H"
35 #include "etcFiles.H"
36 #include "IOdictionary.H"
37 
38 /* * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * */
39 
41 (
42  "caseDicts/postProcessing"
43 );
44 
45 
46 // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
47 
48 Foam::functionObject* Foam::functionObjectList::remove
49 (
50  const word& key,
51  label& oldIndex
52 )
53 {
54  functionObject* ptr = 0;
55 
56  // Find index of existing functionObject
57  HashTable<label>::iterator fnd = indices_.find(key);
58 
59  if (fnd != indices_.end())
60  {
61  oldIndex = fnd();
62 
63  // Retrieve the pointer and remove it from the old list
64  ptr = this->set(oldIndex, 0).ptr();
65  indices_.erase(fnd);
66  }
67  else
68  {
69  oldIndex = -1;
70  }
71 
72  return ptr;
73 }
74 
75 
76 void Foam::functionObjectList::listDir
77 (
78  const fileName& dir,
79  HashSet<word>& foMap
80 )
81 {
82  // Search specified directory for functionObject configuration files
83  {
84  fileNameList foFiles(fileHandler().readDir(dir));
85  forAll(foFiles, f)
86  {
87  if (foFiles[f].ext().empty())
88  {
89  foMap.insert(foFiles[f]);
90  }
91  }
92  }
93 
94  // Recurse into sub-directories
95  {
97  forAll(foDirs, fd)
98  {
99  listDir(dir/foDirs[fd], foMap);
100  }
101  }
102 }
103 
104 
106 {
107  HashSet<word> foMap;
108 
110 
111  forAll(etcDirs, ed)
112  {
113  listDir(etcDirs[ed], foMap);
114  }
115 
116  Info<< nl
117  << "Available configured functionObjects:"
118  << foMap.sortedToc()
119  << nl;
120 }
121 
122 
124 {
125  // First check if there is a functionObject dictionary file in the
126  // case system directory
127  fileName dictFile = stringOps::expand("$FOAM_CASE")/"system"/funcName;
128 
129  if (isFile(dictFile))
130  {
131  return dictFile;
132  }
133  else
134  {
136 
137  forAll(etcDirs, i)
138  {
139  dictFile = search(funcName, etcDirs[i]);
140  if (!dictFile.empty())
141  {
142  return dictFile;
143  }
144  }
145  }
146 
147  return fileName::null;
148 }
149 
150 
152 (
153  const string& funcNameArgs,
154  dictionary& functionsDict,
155  HashSet<word>& requiredFields,
156  const word& region
157 )
158 {
159  // Parse the optional functionObject arguments:
160  // 'Q(U)' -> funcName = Q; args = (U); field = U
161  //
162  // Supports named arguments:
163  // 'patchAverage(patch=inlet, p)' -> funcName = patchAverage;
164  // args = (patch=inlet, p); field = p
165 
166  word funcName(funcNameArgs);
167 
168  int argLevel = 0;
169  wordList args;
170 
171  List<Tuple2<word, string>> namedArgs;
172  bool namedArg = false;
173  word argName;
174 
176  word::size_type i = 0;
177 
178  for
179  (
180  word::const_iterator iter = funcNameArgs.begin();
181  iter != funcNameArgs.end();
182  ++iter
183  )
184  {
185  char c = *iter;
186 
187  if (c == '(')
188  {
189  if (argLevel == 0)
190  {
191  funcName = funcNameArgs(start, i - start);
192  start = i+1;
193  }
194  ++argLevel;
195  }
196  else if (c == ',' || c == ')')
197  {
198  if (argLevel == 1)
199  {
200  if (namedArg)
201  {
202  namedArgs.append
203  (
205  (
206  argName,
207  funcNameArgs(start, i - start)
208  )
209  );
210  namedArg = false;
211  }
212  else
213  {
214  args.append
215  (
216  string::validate<word>(funcNameArgs(start, i - start))
217  );
218  }
219  start = i+1;
220  }
221 
222  if (c == ')')
223  {
224  if (argLevel == 1)
225  {
226  break;
227  }
228  --argLevel;
229  }
230  }
231  else if (c == '=')
232  {
233  argName = string::validate<word>(funcNameArgs(start, i - start));
234  start = i+1;
235  namedArg = true;
236  }
237 
238  ++i;
239  }
240 
241  // Search for the functionObject dictionary
242  fileName path = findDict(funcName);
243 
244  if (path == fileName::null)
245  {
247  << "Cannot find functionObject file " << funcName << endl;
248  return false;
249  }
250 
251  // Read the functionObject dictionary
252  //IFstream fileStream(path);
253  autoPtr<ISstream> fileStreamPtr(fileHandler().NewIFstream(path));
254  ISstream& fileStream = fileStreamPtr();
255 
256  dictionary funcsDict(fileStream);
257  dictionary* funcDictPtr = &funcsDict;
258 
259  if (funcsDict.found(funcName) && funcsDict.isDict(funcName))
260  {
261  funcDictPtr = &funcsDict.subDict(funcName);
262  }
263 
264  dictionary& funcDict = *funcDictPtr;
265 
266  // Insert the 'field' and/or 'fields' entry corresponding to the optional
267  // arguments or read the 'field' or 'fields' entry and add the required
268  // fields to requiredFields
269  if (args.size() == 1)
270  {
271  funcDict.set("field", args[0]);
272  funcDict.set("fields", args);
273  requiredFields.insert(args[0]);
274  }
275  else if (args.size() > 1)
276  {
277  funcDict.set("fields", args);
278  requiredFields.insert(args);
279  }
280  else if (funcDict.found("field"))
281  {
282  requiredFields.insert(word(funcDict.lookup("field")));
283  }
284  else if (funcDict.found("fields"))
285  {
286  requiredFields.insert(wordList(funcDict.lookup("fields")));
287  }
288 
289  // Insert named arguments
290  forAll(namedArgs, i)
291  {
292  IStringStream entryStream
293  (
294  namedArgs[i].first() + ' ' + namedArgs[i].second() + ';'
295  );
296  funcDict.set(entry::New(entryStream).ptr());
297  }
298 
299  // Insert the region name if specified
300  if (region != word::null)
301  {
302  funcDict.set("region", region);
303  }
304 
305  // Merge this functionObject dictionary into functionsDict
306  dictionary funcArgsDict;
307  funcArgsDict.add(string::validate<word>(funcNameArgs), funcDict);
308  functionsDict.merge(funcArgsDict);
309 
310  return true;
311 }
312 
313 
314 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
315 
316 Foam::functionObjectList::functionObjectList
317 (
318  const Time& t,
319  const bool execution
320 )
321 :
323  digests_(),
324  indices_(),
325  time_(t),
326  parentDict_(t.controlDict()),
327  execution_(execution),
328  updated_(false)
329 {}
330 
331 
332 Foam::functionObjectList::functionObjectList
333 (
334  const Time& t,
335  const dictionary& parentDict,
336  const bool execution
337 )
338 :
340  digests_(),
341  indices_(),
342  time_(t),
343  parentDict_(parentDict),
344  execution_(execution),
345  updated_(false)
346 {}
347 
348 
350 (
351  const argList& args,
352  const Time& runTime,
353  dictionary& controlDict,
354  HashSet<word>& requiredFields
355 )
356 {
357  autoPtr<functionObjectList> functionsPtr;
358 
359  controlDict.add
360  (
361  dictionaryEntry("functions", controlDict, dictionary::null)
362  );
363 
364  dictionary& functionsDict = controlDict.subDict("functions");
365 
366  word region = word::null;
367 
368  // Set the region name if specified
369  if (args.optionFound("region"))
370  {
371  region = args["region"];
372  }
373 
374  if
375  (
376  args.optionFound("dict")
377  || args.optionFound("func")
378  || args.optionFound("funcs")
379  )
380  {
381  if (args.optionFound("dict"))
382  {
383  controlDict.merge
384  (
386  (
387  IOobject
388  (
389  args["dict"],
390  runTime,
392  )
393  )
394  );
395  }
396 
397  if (args.optionFound("func"))
398  {
400  (
401  args["func"],
402  functionsDict,
403  requiredFields,
404  region
405  );
406  }
407 
408  if (args.optionFound("funcs"))
409  {
410  wordList funcs(args.optionLookup("funcs")());
411 
412  forAll(funcs, i)
413  {
415  (
416  funcs[i],
417  functionsDict,
418  requiredFields,
419  region
420  );
421  }
422  }
423 
424  functionsPtr.reset(new functionObjectList(runTime, controlDict));
425  }
426  else
427  {
428  functionsPtr.reset(new functionObjectList(runTime));
429  }
430 
431  functionsPtr->start();
432 
433  return functionsPtr;
434 }
435 
436 
437 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
438 
440 {}
441 
442 
443 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
444 
446 {
448  digests_.clear();
449  indices_.clear();
450  updated_ = false;
451 }
452 
453 
455 {
456  forAll(*this, objectI)
457  {
458  if (operator[](objectI).name() == name)
459  {
460  return objectI;
461  }
462  }
463 
464  return -1;
465 }
466 
467 
469 {
470  execution_ = true;
471 }
472 
473 
475 {
476  // For safety, also force a read() when execution is turned back on
477  updated_ = execution_ = false;
478 }
479 
480 
482 {
483  return execution_;
484 }
485 
486 
488 {
489  return read();
490 }
491 
492 
494 {
495  bool ok = true;
496 
497  if (execution_)
498  {
499  if (!updated_)
500  {
501  read();
502  }
503 
504  forAll(*this, objectI)
505  {
506  ok = operator[](objectI).execute() && ok;
507  ok = operator[](objectI).write() && ok;
508  }
509  }
510 
511  return ok;
512 }
513 
514 
516 {
517  bool ok = true;
518 
519  if (execution_)
520  {
521  if (!updated_)
522  {
523  read();
524  }
525 
526  forAll(*this, objectI)
527  {
528  ok = operator[](objectI).end() && ok;
529  }
530  }
531 
532  return ok;
533 }
534 
535 
537 {
538  bool ok = true;
539 
540  if (execution_)
541  {
542  if (!updated_)
543  {
544  read();
545  }
546 
547  forAll(*this, objectI)
548  {
549  ok = operator[](objectI).adjustTimeStep() && ok;
550  }
551  }
552 
553  return ok;
554 }
555 
556 
558 {
559  bool ok = true;
560  updated_ = execution_;
561 
562  // Avoid reading/initializing if execution is off
563  if (!execution_)
564  {
565  return true;
566  }
567 
568  // Update existing and add new functionObjects
569  const entry* entryPtr = parentDict_.lookupEntryPtr
570  (
571  "functions",
572  false,
573  false
574  );
575 
576  if (entryPtr)
577  {
578  PtrList<functionObject> newPtrs;
579  List<SHA1Digest> newDigs;
580  HashTable<label> newIndices;
581 
582  label nFunc = 0;
583 
584  if (!entryPtr->isDict())
585  {
586  FatalIOErrorInFunction(parentDict_)
587  << "'functions' entry is not a dictionary"
588  << exit(FatalIOError);
589  }
590 
591  const dictionary& functionsDict = entryPtr->dict();
592 
593  const_cast<Time&>(time_).libs().open
594  (
595  functionsDict,
596  "libs",
597  functionObject::dictionaryConstructorTablePtr_
598  );
599 
600  newPtrs.setSize(functionsDict.size());
601  newDigs.setSize(functionsDict.size());
602 
603  forAllConstIter(dictionary, functionsDict, iter)
604  {
605  const word& key = iter().keyword();
606 
607  if (!iter().isDict())
608  {
609  if (key != "libs")
610  {
611  IOWarningInFunction(parentDict_)
612  << "Entry " << key << " is not a dictionary" << endl;
613  }
614 
615  continue;
616  }
617 
618  const dictionary& dict = iter().dict();
619  bool enabled = dict.lookupOrDefault("enabled", true);
620 
621  newDigs[nFunc] = dict.digest();
622 
623  label oldIndex;
624  functionObject* objPtr = remove(key, oldIndex);
625 
626  if (objPtr)
627  {
628  if (enabled)
629  {
630  // Dictionary changed for an existing functionObject
631  if (newDigs[nFunc] != digests_[oldIndex])
632  {
633  ok = objPtr->read(dict) && ok;
634  }
635  }
636  else
637  {
638  // Delete the disabled functionObject
639  delete objPtr;
640  objPtr = nullptr;
641  continue;
642  }
643  }
644  else if (enabled)
645  {
647 
650  try
651  {
652  if
653  (
654  dict.found("writeControl")
655  || dict.found("outputControl")
656  )
657  {
658  foPtr.set
659  (
660  new functionObjects::timeControl(key, time_, dict)
661  );
662  }
663  else
664  {
665  foPtr = functionObject::New(key, time_, dict);
666  }
667  }
668  catch (Foam::IOerror& ioErr)
669  {
670  Info<< ioErr << nl << endl;
671  ::exit(1);
672  }
673  catch (Foam::error& err)
674  {
676  << "Caught FatalError " << err << nl << endl;
677  }
680 
681  if (foPtr.valid())
682  {
683  objPtr = foPtr.ptr();
684  }
685  else
686  {
687  ok = false;
688  }
689  }
690 
691  // Insert active functionObjects into the list
692  if (objPtr)
693  {
694  newPtrs.set(nFunc, objPtr);
695  newIndices.insert(key, nFunc);
696  nFunc++;
697  }
698  }
699 
700  newPtrs.setSize(nFunc);
701  newDigs.setSize(nFunc);
702 
703  // Updating the PtrList of functionObjects deletes any
704  // existing unused functionObjects
706  digests_.transfer(newDigs);
707  indices_.transfer(newIndices);
708  }
709  else
710  {
712  digests_.clear();
713  indices_.clear();
714  }
715 
716  return ok;
717 }
718 
719 
721 {
722  if (execution_)
723  {
724  forAll(*this, objectI)
725  {
726  operator[](objectI).updateMesh(mpm);
727  }
728  }
729 }
730 
731 
733 {
734  if (execution_)
735  {
736  forAll(*this, objectI)
737  {
738  operator[](objectI).movePoints(mesh);
739  }
740  }
741 }
742 
743 
744 // ************************************************************************* //
bool read()
Read and set the function objects if their data have changed.
A HashTable with keys but without contents.
Definition: HashSet.H:59
dictionary dict
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Definition: dictionary.C:431
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:428
string expand(const string &, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
Expand occurences of variables according to the mapping.
Definition: stringOps.C:75
static bool readFunctionObject(const string &funcNameArgs0, dictionary &functionsDict, HashSet< word > &requiredFields, const word &region=word::null)
Read the specified functionObject configuration dictionary parsing.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
A class for handling file names.
Definition: fileName.H:69
const entry * lookupEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
Definition: dictionary.C:470
bool set(const label) const
Is element set.
Definition: PtrListI.H:65
SHA1Digest digest() const
Return the SHA1 digest of the dictionary contents.
Definition: dictionary.C:397
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
Definition: HashTable.H:110
void off()
Switch the function objects off.
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A 2-tuple for storing two objects of different types.
Definition: HashTable.H:66
static void list()
Print a list of functionObject configuration files in.
void size(const label)
Override size to be inconsistent with allocated storage.
Definition: ListI.H:163
static const dictionary null
Null dictionary.
Definition: dictionary.H:202
static const fileName null
An empty fileName.
Definition: fileName.H:97
static bool New(dictionary &parentDict, Istream &)
Construct from Istream and insert into dictionary.
Definition: entryIO.C:107
const T & operator[](const label) const
Return element const reference.
Definition: UPtrListI.H:103
bool empty() const
Return true if the UPtrList is empty (ie, size() is zero)
Definition: UPtrListI.H:36
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:253
bool optionFound(const word &opt) const
Return true if the named option is found.
Definition: argListI.H:108
virtual const dictionary & dict() const =0
Return dictionary if this entry is a dictionary.
void on()
Switch the function objects on.
void transfer(HashTable< T, Key, Hash > &)
Transfer the contents of the argument table into this table.
Definition: HashTable.C:513
bool adjustTimeStep()
Called at the end of Time::adjustDeltaT() if adjustTime is true.
T * ptr()
Return object pointer for reuse.
Definition: autoPtrI.H:90
Abstract base-class for Time/database function objects.
bool insert(const Key &key)
Insert a new entry.
Definition: HashSet.H:116
A keyword and a list of tokens is a &#39;dictionaryEntry&#39;.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
bool start()
Called at the start of the time-loop.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
bool isDict(const word &) const
Check if entry is a sub-dictionary.
Definition: dictionary.C:646
bool add(entry *, bool mergeEntry=false)
Add a new entry.
Definition: dictionary.C:814
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
Definition: HashTable.C:371
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:52
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Definition: dictionary.C:692
Class to handle errors and exceptions in a simple, consistent stream-based manner.
Definition: error.H:66
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
Definition: HashTableI.H:80
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
Definition: HashTable.C:142
bool execute()
Called at each ++ or += of the time-loop.
void reset(T *=0)
If object pointer already set, delete object and set to given.
Definition: autoPtrI.H:114
dynamicFvMesh & mesh
void throwExceptions()
Definition: error.H:122
A class for handling words, derived from string.
Definition: word.H:59
Functions to search &#39;etc&#39; directories for configuration files etc.
Extract command arguments and options from the supplied argc and argv parameters. ...
Definition: argList.H:102
void clear()
Clear all entries from table.
Definition: HashTable.C:468
void append(const T &)
Append an element at the end of the list.
Definition: ListI.H:184
static fileName findDict(const word &funcName)
Search for functionObject dictionary file in.
static const word null
An empty word.
Definition: word.H:77
const fileOperation & fileHandler()
Get current file handler.
List of function objects with start(), execute() and end() functions that is called for each object...
graph_traits< Graph >::vertices_size_type size_type
Definition: SloanRenumber.C:73
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
Definition: autoPtrI.H:83
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Definition: pEqn.H:29
Report an I/O error.
Definition: error.H:196
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
Definition: PtrList.C:131
virtual bool isDict() const
Return true if this entry is a dictionary.
Definition: entry.H:156
bool isFile(const fileName &, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
Definition: POSIX.C:551
virtual bool read(const dictionary &)
Read and set the function object if its data have changed.
static const char nl
Definition: Ostream.H:262
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
void set(T *)
Set pointer to that given.
Definition: autoPtrI.H:99
labelList f(nPoints)
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
void clear()
Clear the list of function objects.
List< word > wordList
A List of words.
Definition: fileName.H:54
void setSize(const label)
Reset size of List.
Definition: List.C:281
bool status() const
Return the execution status (on/off) of the function objects.
Generic input stream.
Definition: ISstream.H:51
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Definition: error.H:331
Input from memory buffer stream.
Definition: IStringStream.H:49
List< Key > sortedToc() const
Return the table of contents as a sorted list.
Definition: HashTable.C:217
const dimensionedScalar c
Speed of light in a vacuum.
void transfer(PtrList< T > &)
Transfer the contents of the argument PtrList into this PtrList.
Definition: PtrList.C:189
static autoPtr< functionObject > New(const word &name, const Time &, const dictionary &)
Select from dictionary, based on its "type" entry.
const dictionary & controlDict() const
Definition: Time.H:274
void set(entry *)
Assign a new entry, overwrite any existing entry.
Definition: dictionary.C:941
void clear()
Clear the PtrList, i.e. set size to zero deleting all the.
Definition: PtrList.C:174
fileNameList readDir(const fileName &, const fileName::Type=fileName::FILE, const bool filtergz=true, const bool followLink=true)
Read a directory and return the entries as a string list.
Definition: POSIX.C:641
messageStream Info
bool merge(const dictionary &)
Merge entries from the given dictionary.
Definition: dictionary.C:1090
fileName search(const word &file, const fileName &directory)
Recursively search the given directory for the file.
Definition: fileName.C:402
#define IOWarningInFunction(ios)
Report an IO warning using Foam::Warning.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
label findObjectID(const word &name) const
Find the ID of a given function object by name.
void updateMesh(const mapPolyMesh &mpm)
Update for changes of mesh.
static autoPtr< functionObjectList > New(const argList &args, const Time &runTime, dictionary &controlDict, HashSet< word > &requiredFields)
Construct and return a functionObjectList for an application.
friend class iterator
Declare friendship with the iterator.
Definition: HashTable.H:194
Foam::argList args(argc, argv)
void movePoints(const polyMesh &mesh)
Update for changes of mesh.
List< fileName > fileNameList
A List of fileNames.
Definition: fileNameList.H:50
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
static fileName functionObjectDictPath
Default relative path to the directory structure.
bool end()
Called when Time::run() determines that the time-loop exits.
A keyword and a list of tokens is an &#39;entry&#39;.
Definition: entry.H:65
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:576
void dontThrowExceptions()
Definition: error.H:127
IStringStream optionLookup(const word &opt) const
Return an IStringStream from the named option.
Definition: argListI.H:114
IOerror FatalIOError
fileNameList findEtcDirs(const fileName &local=fileName::null)
Search for directories from user/group/shipped directories.
Definition: etcFiles.C:32
T & first()
Return reference to the first element of the list.
Definition: UPtrListI.H:43