topoSet.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-2016 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 "topoSet.H"
30 #include "mapPolyMesh.H"
31 #include "polyMesh.H"
32 #include "boundBox.H"
33 #include "Time.H"
34 
35 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36 
37 namespace Foam
38 {
39  defineTypeNameAndDebug(topoSet, 0);
40  defineRunTimeSelectionTable(topoSet, word);
41  defineRunTimeSelectionTable(topoSet, size);
43 
45  (
46  debug::debugSwitch("disallowGenericSets", 0)
47  );
48 }
49 
50 
51 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
52 
55 (
56  const word& setType,
57  const polyMesh& mesh,
58  const word& name,
59  readOption r,
60  writeOption w
61 )
62 {
63  auto* ctorPtr = wordConstructorTable(setType);
64 
65  if (!ctorPtr)
66  {
68  (
69  "set",
70  setType,
71  *wordConstructorTablePtr_
72  ) << exit(FatalError);
73  }
74 
75  return autoPtr<topoSet>(ctorPtr(mesh, name, r, w));
76 }
77 
78 
81 (
82  const word& setType,
83  const polyMesh& mesh,
84  const word& name,
85  const label size,
86  writeOption w
87 )
88 {
89  auto* ctorPtr = sizeConstructorTable(setType);
90 
91  if (!ctorPtr)
92  {
94  (
95  "set",
96  setType,
97  *sizeConstructorTablePtr_
98  ) << exit(FatalError);
99  }
100 
101  return autoPtr<topoSet>(ctorPtr(mesh, name, size, w));
102 }
103 
104 
107 (
108  const word& setType,
109  const polyMesh& mesh,
110  const word& name,
111  const topoSet& set,
112  writeOption w
113 )
114 {
115  auto* ctorPtr = setConstructorTable(setType);
116 
117  if (!ctorPtr)
118  {
120  (
121  "set",
122  setType,
123  *setConstructorTablePtr_
124  ) << exit(FatalError);
125  }
126 
127  return autoPtr<topoSet>(ctorPtr(mesh, name, set, w));
128 }
129 
130 
131 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
132 
134 (
135  const polyMesh& mesh,
136  const word& name
137 )
138 {
139  return mesh.facesInstance()/mesh.dbDir()/polyMesh::meshSubDir/"sets"/name;
140 }
141 
142 
143 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
144 
145 // Update stored cell numbers using map.
146 // Do in two passes to prevent allocation if nothing changed.
148 {
149  labelHashSet& labels = *this;
150 
151  // Iterate over map to see if anything changed
152 
153  bool changed = false;
154 
155  for (const label oldId : labels)
156  {
157  if (oldId < 0 || oldId >= map.size())
158  {
160  << "Illegal content " << oldId << " of set:" << name()
161  << " of type " << type() << nl
162  << "Value should be between [0," << map.size() << ')'
163  << endl
164  << abort(FatalError);
165  }
166 
167  const label newId = map[oldId];
168 
169  if (newId != oldId)
170  {
171  changed = true;
172  #ifdef FULLDEBUG
173  continue; // Check all elements in FULLDEBUG mode
174  #endif
175  break;
176  }
177  }
178 
179  if (!changed)
180  {
181  return;
182  }
183 
184 
185  // Relabel. Use second labelHashSet to prevent overlapping.
186 
187  labelHashSet newLabels(2*labels.size());
188 
189  for (const label oldId : labels)
190  {
191  const label newId = map[oldId];
192 
193  if (newId >= 0)
194  {
195  newLabels.set(newId);
196  }
197  }
198 
199  labels.transfer(newLabels);
200 }
201 
202 
203 void Foam::topoSet::check(const label maxSize)
204 {
205  const labelHashSet& labels = *this;
206 
207  for (const label oldId : labels)
208  {
209  if (oldId < 0 || oldId >= maxSize)
210  {
212  << "Illegal content " << oldId << " of set:" << name()
213  << " of type " << type() << nl
214  << "Value should be between [0," << maxSize << ')'
215  << endl
216  << abort(FatalError);
217  }
218  }
219 }
220 
221 
222 // Write maxElem elements, starting at iter. Updates iter and elemI.
224 (
225  Ostream& os,
226  const label maxElem,
228  label& elemI
229 ) const
230 {
231  label n = 0;
232 
233  for (; (iter != cend()) && (n < maxElem); ++iter)
234  {
235  if (n && ((n % 10) == 0))
236  {
237  os << nl;
238  }
239  os << iter.key() << ' ';
240 
241  ++n;
242  ++elemI;
243  }
244 }
245 
246 
247 // Write maxElem elements, starting at iter. Updates iter and elemI.
249 (
250  Ostream& os,
251  const pointField& coords,
252  const label maxElem,
254  label& elemI
255 ) const
256 {
257  label n = 0;
258 
259  for (; (iter != cend()) && (n < maxElem); ++iter)
260  {
261  if (n && ((n % 3) == 0))
262  {
263  os << nl;
264  }
265  os << iter.key() << coords[iter.key()] << ' ';
266 
267  ++n;
268  ++elemI;
269  }
270 }
271 
272 
274 (
275  Ostream& os,
276  const pointField& coords,
277  const label maxLen
278 ) const
279 {
280  // Bounding box of contents.
281  boundBox bb(pointField(coords, toc()), true);
282 
283  os << "Set bounding box: min = "
284  << bb.min() << " max = " << bb.max() << " metres." << nl << endl;
285 
286  label n = 0;
287 
288  topoSet::const_iterator iter = this->cbegin();
289 
290  if (size() <= maxLen)
291  {
292  writeDebug(os, coords, maxLen, iter, n);
293  }
294  else
295  {
296  label halfLen = maxLen/2;
297 
298  os << "Size larger than " << maxLen << ". Printing first and last "
299  << halfLen << " elements:" << nl << endl;
300 
301  writeDebug(os, coords, halfLen, iter, n);
302 
303  os << nl << " .." << nl << endl;
304 
305  for (; n < size() - halfLen; ++n)
306  {
307  ++iter;
308  }
309 
310  writeDebug(os, coords, halfLen, iter, n);
311  }
312 }
313 
314 
315 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
316 
318 (
319  const polyMesh& mesh,
320  const word& name,
321  readOption r,
322  writeOption w
323 )
324 {
325  IOobject io
326  (
327  name,
329  (
331  word::null,
334  ),
335  polyMesh::meshSubDir/"sets",
336  mesh,
337  r,
338  w
339  );
340 
341  if (!io.typeHeaderOk<topoSet>(false) && disallowGenericSets != 0)
342  {
343  DebugInfo<< "Setting no read for set " << name << endl;
345  }
346 
347  return io;
348 }
349 
350 
352 (
353  const Time& runTime,
354  const word& name,
355  readOption r,
356  writeOption w
357 )
358 {
359  return IOobject
360  (
361  name,
363  (
364  polyMesh::meshSubDir/"sets",
365  word::null,
368  (
370  "faces",
372  )
373  ),
374  polyMesh::meshSubDir/"sets",
375  runTime,
376  r,
377  w
378  );
379 }
380 
381 
382 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
383 
384 Foam::topoSet::topoSet(const IOobject& obj, const word& wantedType)
385 :
386  regIOobject(obj)
387 {
388  if
389  (
393  )
394  {
395  if (readStream(wantedType).good())
396  {
397  readStream(wantedType) >> static_cast<labelHashSet&>(*this);
398 
399  close();
400  }
401  }
402 }
403 
404 
406 (
407  const polyMesh& mesh,
408  const word& wantedType,
409  const word& name,
410  readOption r,
411  writeOption w
412 )
413 :
414  regIOobject(findIOobject(mesh, name, r, w))
415 {
416  if
417  (
418  readOpt() == IOobject::MUST_READ
419  || readOpt() == IOobject::MUST_READ_IF_MODIFIED
420  || (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
421  )
422  {
423  if (readStream(wantedType).good())
424  {
425  readStream(wantedType) >> static_cast<labelHashSet&>(*this);
426 
427  close();
428  }
429  }
430 }
431 
432 
434 (
435  const polyMesh& mesh,
436  const word& name,
437  const label size,
438  writeOption w
439 )
440 :
441  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
442  labelHashSet(size)
443 {}
444 
445 
447 (
448  const polyMesh& mesh,
449  const word& name,
450  const labelHashSet& labels,
451  writeOption w
452 )
453 :
454  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
455  labelHashSet(labels)
456 {}
457 
458 
460 (
461  const polyMesh& mesh,
462  const word& name,
463  labelHashSet&& labels,
464  writeOption w
465 )
466 :
467  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
468  labelHashSet(std::move(labels))
469 {}
470 
471 
473 (
474  const polyMesh& mesh,
475  const word& name,
476  const labelUList& labels,
477  writeOption w
478 )
479 :
480  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
481  labelHashSet(labels)
482 {}
483 
484 
485 Foam::topoSet::topoSet(const IOobject& io, const label size)
486 :
487  regIOobject(io),
488  labelHashSet(size)
489 {}
490 
491 
493 :
494  regIOobject(io),
495  labelHashSet(labels)
496 {}
497 
498 
500 :
501  regIOobject(io),
502  labelHashSet(std::move(labels))
503 {}
504 
505 
506 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
507 
508 bool Foam::topoSet::found(const label id) const
509 {
510  return static_cast<const labelHashSet&>(*this).found(id);
511 }
512 
513 
514 bool Foam::topoSet::set(const label id)
515 {
516  return static_cast<labelHashSet&>(*this).set(id);
517 }
518 
519 
520 bool Foam::topoSet::unset(const label id)
521 {
522  return static_cast<labelHashSet&>(*this).unset(id);
523 }
524 
525 
526 void Foam::topoSet::set(const labelUList& labels)
527 {
528  static_cast<labelHashSet&>(*this).set(labels);
529 }
530 
531 
532 void Foam::topoSet::unset(const labelUList& labels)
533 {
534  static_cast<labelHashSet&>(*this).unset(labels);
535 }
536 
537 
538 void Foam::topoSet::invert(const label maxLen)
539 {
540  // Retain a copy of the original (current) set.
541  labelHashSet original
542  (
543  std::move(static_cast<labelHashSet&>(*this))
544  );
545 
546  clear(); // Maybe don't trust the previous move operation
547  resize(2*max(64, (maxLen - original.size())));
548 
549  for (label id=0; id < maxLen; ++id)
550  {
551  if (!original.found(id))
552  {
553  this->set(id);
554  }
555  }
556 }
557 
558 
560 {
561  // Only retain entries found in both sets
562  static_cast<labelHashSet&>(*this) &= set;
563 }
564 
565 
567 {
568  // Add entries to the set
569  static_cast<labelHashSet&>(*this) |= set;
570 }
571 
572 
574 {
575  // Subtract entries from the set
576  static_cast<labelHashSet&>(*this) -= set;
577 }
578 
579 
581 {
582  this->subtractSet(set);
583 }
584 
585 
587 {
589 }
590 
591 
592 void Foam::topoSet::writeDebug(Ostream& os, const label maxLen) const
593 {
594  label n = 0;
595 
596  topoSet::const_iterator iter = this->cbegin();
597 
598  if (size() <= maxLen)
599  {
600  writeDebug(os, maxLen, iter, n);
601  }
602  else
603  {
604  label halfLen = maxLen/2;
605 
606  os << "Size larger than " << maxLen << ". Printing first and last "
607  << halfLen << " elements:" << nl << endl;
608 
609  writeDebug(os, halfLen, iter, n);
610 
611  os << nl << " .." << nl << endl;
612 
613  for (; n < size() - halfLen; ++n)
614  {
615  ++iter;
616  }
617 
618  writeDebug(os, halfLen, iter, n);
619  }
620 }
621 
622 
624 {
625  return (os << *this).good();
626 }
627 
628 
630 {
632 }
633 
634 
636 {
637  IOobject io
638  (
639  "dummy",
641  mesh.meshSubDir/"sets",
642  mesh
643  );
644  fileName setsDir(io.path());
645 
646  if (debug) DebugVar(setsDir);
647 
648  if (isDir(setsDir))
649  {
650  rmDir(setsDir);
651  }
652 }
653 
654 
655 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
656 
658 {
660 }
661 
662 
663 // ************************************************************************* //
Foam::topoSet::writeDebug
void writeDebug(Ostream &os, const label maxElem, topoSet::const_iterator &iter, label &elemI) const
Write part of contents nicely formatted. Prints labels only.
Definition: topoSet.C:224
Foam::expressions::patchExpr::debug
int debug
Static debugging option.
Foam::topoSet::localPath
static fileName localPath(const polyMesh &mesh, const word &name)
Name of file set will use.
Definition: topoSet.C:134
Foam::topoSet::topoSet
topoSet(const topoSet &)=delete
No copy construct.
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:44
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:169
Foam::BitOps::set
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
Definition: BitOps.C:37
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fileName
A class for handling file names.
Definition: fileName.H:73
Foam::topoSet::operator=
void operator=(const topoSet &)
Copy labelHashSet part only.
Definition: topoSet.C:657
Foam::HashSet< label, Hash< label > >::operator=
void operator=(const this_type &rhs)
Copy assign.
Definition: HashSet.H:332
topoSet.H
Foam::debug::debugSwitch
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
Definition: debug.C:225
Foam::IOobject::typeHeaderOk
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
Read header (uses typeFilePath to find file) and check its info.
Definition: IOobjectTemplates.C:39
Foam::defineRunTimeSelectionTable
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
Foam::polyMesh::dbDir
virtual const fileName & dbDir() const
Override the objectRegistry dbDir for a single-region case.
Definition: polyMesh.C:829
mapPolyMesh.H
Foam::polyMesh::meshSubDir
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Definition: polyMesh.H:321
Foam::polyMesh::facesInstance
const fileName & facesInstance() const
Return the current instance directory for faces.
Definition: polyMesh.C:852
Foam::topoSet::deleteSet
virtual void deleteSet(const topoSet &set)
Deprecated(2018-10) subtract elements present in set.
Definition: topoSet.C:580
Foam::topoSet::disallowGenericSets
static int disallowGenericSets
Debug switch to disallow the use of generic sets.
Definition: topoSet.H:120
Foam::topoSet::subset
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
Definition: topoSet.C:559
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:369
Foam::boundBox::max
const point & max() const
Maximum describing the bounding box.
Definition: boundBoxI.H:97
Foam::topoSet::New
static autoPtr< topoSet > New(const word &setType, const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
Return a pointer to a toposet read from file.
Definition: topoSet.C:55
polyMesh.H
Foam::HashSet< label, Hash< label > >
Foam::topoSet::invert
virtual void invert(const label maxLen)
Invert contents.
Definition: topoSet.C:538
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::boundBox::min
const point & min() const
Minimum describing the bounding box.
Definition: boundBoxI.H:91
Foam::topoSet::findIOobject
static IOobject findIOobject(const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
Find IOobject in the polyMesh/sets (used as constructor helper)
Definition: topoSet.C:318
Foam::HashSet::const_iterator
typename parent_type::const_key_iterator const_iterator
A const_iterator, returning reference to the key.
Definition: HashSet.H:121
Foam::topoSet::addSet
virtual void addSet(const topoSet &set)
Add elements present in set.
Definition: topoSet.C:566
Foam::IOobject::writeOption
writeOption
Enumeration defining the write options.
Definition: IOobject.H:192
n
label n
Definition: TABSMDCalcMethod2.H:31
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::topoSet::found
virtual bool found(const label id) const
Has the given index?
Definition: topoSet.C:508
Foam::topoSet::updateMesh
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels. Not implemented.
Definition: topoSet.C:629
resize
patchWriters resize(patchIds.size())
Foam::Field< vector >
Foam::topoSet::set
virtual bool set(const label id)
Set an index.
Definition: topoSet.C:514
Foam::IOobject::READ_IF_PRESENT
Definition: IOobject.H:187
Foam::topoSet::subtractSet
virtual void subtractSet(const topoSet &set)
Subtract elements present in set.
Definition: topoSet.C:573
Foam::topoSet
General set of labels of mesh quantity (points, cells, faces).
Definition: topoSet.H:63
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::HashSet::unset
bool unset(const Key &key)
Unset the specified key - same as erase.
Definition: HashSet.H:204
Foam::FatalError
error FatalError
FatalErrorInLookup
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
Definition: error.H:457
os
OBJstream os(runTime.globalPath()/outputName)
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:144
stdFoam::cend
constexpr auto cend(const C &c) -> decltype(c.end())
Return const_iterator to the end of the container c.
Definition: stdFoam.H:137
Foam::Time::findInstance
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
Definition: Time.C:797
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::IOobject::readOpt
readOption readOpt() const noexcept
The read option.
Definition: IOobjectI.H:164
boundBox.H
Foam::IOobject::name
const word & name() const noexcept
Return name.
Definition: IOobjectI.H:65
Time.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:73
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
DebugInfo
#define DebugInfo
Report an information message using Foam::Info.
Definition: messageStream.H:382
clear
patchWriters clear()
Foam::nl
constexpr char nl
Definition: Ostream.H:404
stdFoam::cbegin
constexpr auto cbegin(const C &c) -> decltype(c.begin())
Return const_iterator to the beginning of the container c.
Definition: stdFoam.H:113
Foam::rmDir
bool rmDir(const fileName &directory, const bool silent=false)
Remove a directory and its contents (optionally silencing warnings)
Definition: MSwindows.C:1028
Foam::regIOobject::close
void close()
Close Istream.
Definition: regIOobjectRead.C:171
Foam::topoSet::writeData
virtual bool writeData(Ostream &) const
Write contents.
Definition: topoSet.C:623
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::UList< label >
Foam::word::null
static const word null
An empty word.
Definition: word.H:80
Foam::IOobject::MUST_READ_IF_MODIFIED
Definition: IOobject.H:186
Foam::topoSet::unset
virtual bool unset(const label id)
Unset an index.
Definition: topoSet.C:520
Foam::topoSet::check
virtual void check(const label maxSize)
Check limits on addressable range.
Definition: topoSet.C:203
Foam::boundBox
A bounding box defined in terms of min/max extrema points.
Definition: boundBox.H:63
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161
Foam::IOobject::good
bool good() const noexcept
Definition: IOobjectI.H:222
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:280
Foam::UList::size
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:114
Foam::IOobject::readOption
readOption
Enumeration defining the read options.
Definition: IOobject.H:183
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::regIOobject::readStream
Istream & readStream(const word &, const bool valid=true)
Return Istream and check object type against that given.
Definition: regIOobjectRead.C:129
Foam::topoSet::sync
virtual void sync(const polyMesh &mesh)
Sync set across coupled patches.
Definition: topoSet.C:586
Foam::labelHashSet
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition: HashSet.H:85
Foam::topoSet::updateLabels
virtual void updateLabels(const labelUList &map)
Update map from map.
Definition: topoSet.C:147
Foam::IOobject::NO_READ
Definition: IOobject.H:188
Foam::topoSet::removeFiles
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
Definition: topoSet.C:635
DebugVar
#define DebugVar(var)
Report a variable name and value.
Definition: messageStream.H:404
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::regIOobject::headerOk
bool headerOk()
Read and check header info.
Definition: regIOobject.C:436
Foam::HashSet::set
bool set(const Key &key)
Same as insert (no value to overwrite)
Definition: HashSet.H:197
Foam::isDir
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
Definition: MSwindows.C:643
Foam::IOobject::MUST_READ
Definition: IOobject.H:185