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-2020 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 cstrIter = wordConstructorTablePtr_->cfind(setType);
64 
65  if (!cstrIter.found())
66  {
68  (
69  "set",
70  setType,
71  *wordConstructorTablePtr_
72  ) << exit(FatalError);
73  }
74 
75  return autoPtr<topoSet>(cstrIter()(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 cstrIter = sizeConstructorTablePtr_->cfind(setType);
90 
91  if (!cstrIter.found())
92  {
94  (
95  "set",
96  setType,
97  *sizeConstructorTablePtr_
98  ) << exit(FatalError);
99  }
100 
101  return autoPtr<topoSet>(cstrIter()(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 cstrIter = setConstructorTablePtr_->cfind(setType);
116 
117  if (!cstrIter.found())
118  {
120  (
121  "set",
122  setType,
123  *setConstructorTablePtr_
124  ) << exit(FatalError);
125  }
126 
127  return autoPtr<topoSet>(cstrIter()(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;
344  io.readOpt() = IOobject::NO_READ;
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  (
392  || (
394  && headerOk()
395  )
396  )
397  {
398  if (readStream(wantedType).good())
399  {
400  readStream(wantedType) >> static_cast<labelHashSet&>(*this);
401 
402  close();
403  }
404  }
405 }
406 
407 
409 (
410  const polyMesh& mesh,
411  const word& wantedType,
412  const word& name,
413  readOption r,
414  writeOption w
415 )
416 :
417  regIOobject(findIOobject(mesh, name, r, w))
418 {
419  if
420  (
421  readOpt() == IOobject::MUST_READ
422  || readOpt() == IOobject::MUST_READ_IF_MODIFIED
423  || (
424  readOpt() == IOobject::READ_IF_PRESENT
425  && headerOk()
426  )
427  )
428  {
429  if (readStream(wantedType).good())
430  {
431  readStream(wantedType) >> static_cast<labelHashSet&>(*this);
432 
433  close();
434  }
435  }
436 }
437 
438 
440 (
441  const polyMesh& mesh,
442  const word& name,
443  const label size,
444  writeOption w
445 )
446 :
447  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
448  labelHashSet(size)
449 {}
450 
451 
453 (
454  const polyMesh& mesh,
455  const word& name,
456  const labelHashSet& labels,
457  writeOption w
458 )
459 :
460  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
461  labelHashSet(labels)
462 {}
463 
464 
466 (
467  const polyMesh& mesh,
468  const word& name,
469  labelHashSet&& labels,
470  writeOption w
471 )
472 :
473  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
474  labelHashSet(std::move(labels))
475 {}
476 
477 
479 (
480  const polyMesh& mesh,
481  const word& name,
482  const labelUList& labels,
483  writeOption w
484 )
485 :
486  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
487  labelHashSet(labels)
488 {}
489 
490 
491 Foam::topoSet::topoSet(const IOobject& io, const label size)
492 :
493  regIOobject(io),
494  labelHashSet(size)
495 {}
496 
497 
499 :
500  regIOobject(io),
501  labelHashSet(labels)
502 {}
503 
504 
506 :
507  regIOobject(io),
508  labelHashSet(std::move(labels))
509 {}
510 
511 
512 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
513 
514 bool Foam::topoSet::found(const label id) const
515 {
516  return static_cast<const labelHashSet&>(*this).found(id);
517 }
518 
519 
520 bool Foam::topoSet::set(const label id)
521 {
522  return static_cast<labelHashSet&>(*this).set(id);
523 }
524 
525 
526 bool Foam::topoSet::unset(const label id)
527 {
528  return static_cast<labelHashSet&>(*this).unset(id);
529 }
530 
531 
532 void Foam::topoSet::set(const labelUList& labels)
533 {
534  static_cast<labelHashSet&>(*this).set(labels);
535 }
536 
537 
538 void Foam::topoSet::unset(const labelUList& labels)
539 {
540  static_cast<labelHashSet&>(*this).unset(labels);
541 }
542 
543 
544 void Foam::topoSet::invert(const label maxLen)
545 {
546  // Retain a copy of the original (current) set.
547  labelHashSet original
548  (
549  std::move(static_cast<labelHashSet&>(*this))
550  );
551 
552  clear(); // Maybe don't trust the previous move operation
553  resize(2*max(64, (maxLen - original.size())));
554 
555  for (label id=0; id < maxLen; ++id)
556  {
557  if (!original.found(id))
558  {
559  this->set(id);
560  }
561  }
562 }
563 
564 
566 {
567  // Only retain entries found in both sets
568  static_cast<labelHashSet&>(*this) &= set;
569 }
570 
571 
573 {
574  // Add entries to the set
575  static_cast<labelHashSet&>(*this) |= set;
576 }
577 
578 
580 {
581  // Subtract entries from the set
582  static_cast<labelHashSet&>(*this) -= set;
583 }
584 
585 
587 {
588  this->subtractSet(set);
589 }
590 
591 
593 {
595 }
596 
597 
598 void Foam::topoSet::writeDebug(Ostream& os, const label maxLen) const
599 {
600  label n = 0;
601 
602  topoSet::const_iterator iter = this->cbegin();
603 
604  if (size() <= maxLen)
605  {
606  writeDebug(os, maxLen, iter, n);
607  }
608  else
609  {
610  label halfLen = maxLen/2;
611 
612  os << "Size larger than " << maxLen << ". Printing first and last "
613  << halfLen << " elements:" << nl << endl;
614 
615  writeDebug(os, halfLen, iter, n);
616 
617  os << nl << " .." << nl << endl;
618 
619  for (; n < size() - halfLen; ++n)
620  {
621  ++iter;
622  }
623 
624  writeDebug(os, halfLen, iter, n);
625  }
626 }
627 
628 
630 {
631  return (os << *this).good();
632 }
633 
634 
636 {
638 }
639 
640 
642 {
643  IOobject io
644  (
645  "dummy",
647  mesh.meshSubDir/"sets",
648  mesh
649  );
650  fileName setsDir(io.path());
651 
652  if (debug) DebugVar(setsDir);
653 
654  if (isDir(setsDir))
655  {
656  rmDir(setsDir);
657  }
658 }
659 
660 
661 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
662 
664 {
666 }
667 
668 
669 // ************************************************************************* //
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
Foam::HashTable::size
label size() const noexcept
The number of elements in table.
Definition: HashTableI.H:52
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:104
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::IOobject::name
const word & name() const
Return name.
Definition: IOobjectI.H:70
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::topoSet::operator=
void operator=(const topoSet &)
Copy labelHashSet part only.
Definition: topoSet.C:663
Foam::HashSet< label, Hash< label > >::operator=
void operator=(const this_type &rhs)
Copy assign.
Definition: HashSet.H:322
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:586
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:565
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:350
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:544
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< label, Hash< label > >::const_iterator
typename parent_type::const_key_iterator const_iterator
A const_iterator, returning reference to the key.
Definition: HashSet.H:111
Foam::topoSet::addSet
virtual void addSet(const topoSet &set)
Add elements present in set.
Definition: topoSet.C:572
Foam::IOobject::writeOption
writeOption
Enumeration defining the write options.
Definition: IOobject.H:127
n
label n
Definition: TABSMDCalcMethod2.H:31
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:445
Foam::topoSet::found
virtual bool found(const label id) const
Has the given index?
Definition: topoSet.C:514
Foam::topoSet::updateMesh
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels. Not implemented.
Definition: topoSet.C:635
resize
patchWriters resize(patchIds.size())
Foam::Field< vector >
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::topoSet::set
virtual bool set(const label id)
Set an index.
Definition: topoSet.C:520
Foam::IOobject::READ_IF_PRESENT
Definition: IOobject.H:122
Foam::topoSet::subtractSet
virtual void subtractSet(const topoSet &set)
Subtract elements present in set.
Definition: topoSet.C:579
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:194
Foam::FatalError
error FatalError
FatalErrorInLookup
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
Definition: error.H:385
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::IOobject::good
bool good() const
Definition: IOobjectI.H:217
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
boundBox.H
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:71
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:381
DebugInfo
#define DebugInfo
Report an information message using Foam::Info.
Definition: messageStream.H:359
clear
patchWriters clear()
Foam::nl
constexpr char nl
Definition: Ostream.H:385
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:1018
Foam::regIOobject::close
void close()
Close Istream.
Definition: regIOobjectRead.C:182
Foam::topoSet::writeData
virtual bool writeData(Ostream &) const
Write contents.
Definition: topoSet.C:629
Foam::IOobject::readOpt
readOption readOpt() const
The read option.
Definition: IOobjectI.H:165
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:77
Foam::IOobject::MUST_READ_IF_MODIFIED
Definition: IOobject.H:121
Foam::topoSet::unset
virtual bool unset(const label id)
Unset an index.
Definition: topoSet.C:526
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::UList::size
void size(const label n) noexcept
Override size to be inconsistent with allocated storage.
Definition: UListI.H:360
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:275
Foam::IOobject::readOption
readOption
Enumeration defining the read options.
Definition: IOobject.H:118
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:140
Foam::topoSet::sync
virtual void sync(const polyMesh &mesh)
Sync set across coupled patches.
Definition: topoSet.C:592
Foam::HashTable::found
bool found(const Key &key) const
Return true if hashed entry is found in table.
Definition: HashTableI.H:100
Foam::labelHashSet
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
Definition: HashSet.H:409
Foam::topoSet::updateLabels
virtual void updateLabels(const labelUList &map)
Update map from map.
Definition: topoSet.C:147
Foam::IOobject::NO_READ
Definition: IOobject.H:123
Foam::topoSet::removeFiles
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
Definition: topoSet.C:641
DebugVar
#define DebugVar(var)
Report a variable name and value.
Definition: messageStream.H:381
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::regIOobject::headerOk
bool headerOk()
Read and check header info.
Definition: regIOobject.C:453
Foam::HashSet::set
bool set(const Key &key)
Same as insert (no value to overwrite)
Definition: HashSet.H:187
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:120