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-2019 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);
42  defineRunTimeSelectionTable(topoSet, set);
43 
45  (
46  debug::debugSwitch("disallowGenericSets", 0)
47  );
48 }
49 
50 
51 // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
52 
54 (
55  const word& setType,
56  const polyMesh& mesh,
57  const word& name,
58  readOption r,
59  writeOption w
60 )
61 {
62  auto cstrIter = wordConstructorTablePtr_->cfind(setType);
63 
64  if (!cstrIter.found())
65  {
67  (
68  "set",
69  setType,
70  *wordConstructorTablePtr_
71  ) << exit(FatalError);
72  }
73 
74  return autoPtr<topoSet>(cstrIter()(mesh, name, r, w));
75 }
76 
77 
79 (
80  const word& setType,
81  const polyMesh& mesh,
82  const word& name,
83  const label size,
84  writeOption w
85 )
86 {
87  auto cstrIter = sizeConstructorTablePtr_->cfind(setType);
88 
89  if (!cstrIter.found())
90  {
92  (
93  "set",
94  setType,
95  *sizeConstructorTablePtr_
96  ) << exit(FatalError);
97  }
98 
99  return autoPtr<topoSet>(cstrIter()(mesh, name, size, w));
100 }
101 
102 
104 (
105  const word& setType,
106  const polyMesh& mesh,
107  const word& name,
108  const topoSet& set,
109  writeOption w
110 )
111 {
112  auto cstrIter = setConstructorTablePtr_->cfind(setType);
113 
114  if (!cstrIter.found())
115  {
117  (
118  "set",
119  setType,
120  *setConstructorTablePtr_
121  ) << exit(FatalError);
122  }
123 
124  return autoPtr<topoSet>(cstrIter()(mesh, name, set, w));
125 }
126 
127 
128 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
129 
131 (
132  const polyMesh& mesh,
133  const word& name
134 )
135 {
136  return mesh.facesInstance()/mesh.dbDir()/polyMesh::meshSubDir/"sets"/name;
137 }
138 
139 
140 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
141 
142 // Update stored cell numbers using map.
143 // Do in two passes to prevent allocation if nothing changed.
145 {
146  labelHashSet& labels = *this;
147 
148  // Iterate over map to see if anything changed
149 
150  bool changed = false;
151 
152  for (const label oldId : labels)
153  {
154  if (oldId < 0 || oldId >= map.size())
155  {
157  << "Illegal content " << oldId << " of set:" << name()
158  << " of type " << type() << nl
159  << "Value should be between [0," << map.size() << ')'
160  << endl
161  << abort(FatalError);
162  }
163 
164  const label newId = map[oldId];
165 
166  if (newId != oldId)
167  {
168  changed = true;
169  #ifdef FULLDEBUG
170  continue; // Check all elements in FULLDEBUG mode
171  #endif
172  break;
173  }
174  }
175 
176  if (!changed)
177  {
178  return;
179  }
180 
181 
182  // Relabel. Use second labelHashSet to prevent overlapping.
183 
184  labelHashSet newLabels(2*labels.size());
185 
186  for (const label oldId : labels)
187  {
188  const label newId = map[oldId];
189 
190  if (newId >= 0)
191  {
192  newLabels.set(newId);
193  }
194  }
195 
196  labels.transfer(newLabels);
197 }
198 
199 
200 void Foam::topoSet::check(const label maxSize)
201 {
202  const labelHashSet& labels = *this;
203 
204  for (const label oldId : labels)
205  {
206  if (oldId < 0 || oldId >= maxSize)
207  {
209  << "Illegal content " << oldId << " of set:" << name()
210  << " of type " << type() << nl
211  << "Value should be between [0," << maxSize << ')'
212  << endl
213  << abort(FatalError);
214  }
215  }
216 }
217 
218 
219 // Write maxElem elements, starting at iter. Updates iter and elemI.
221 (
222  Ostream& os,
223  const label maxElem,
225  label& elemI
226 ) const
227 {
228  label n = 0;
229 
230  for (; (iter != cend()) && (n < maxElem); ++iter)
231  {
232  if (n && ((n % 10) == 0))
233  {
234  os << nl;
235  }
236  os << iter.key() << ' ';
237 
238  ++n;
239  ++elemI;
240  }
241 }
242 
243 
244 // Write maxElem elements, starting at iter. Updates iter and elemI.
246 (
247  Ostream& os,
248  const pointField& coords,
249  const label maxElem,
251  label& elemI
252 ) const
253 {
254  label n = 0;
255 
256  for (; (iter != cend()) && (n < maxElem); ++iter)
257  {
258  if (n && ((n % 3) == 0))
259  {
260  os << nl;
261  }
262  os << iter.key() << coords[iter.key()] << ' ';
263 
264  ++n;
265  ++elemI;
266  }
267 }
268 
269 
271 (
272  Ostream& os,
273  const pointField& coords,
274  const label maxLen
275 ) const
276 {
277  // Bounding box of contents.
278  boundBox bb(pointField(coords, toc()), true);
279 
280  os << "Set bounding box: min = "
281  << bb.min() << " max = " << bb.max() << " metres." << nl << endl;
282 
283  label n = 0;
284 
285  topoSet::const_iterator iter = this->cbegin();
286 
287  if (size() <= maxLen)
288  {
289  writeDebug(os, coords, maxLen, iter, n);
290  }
291  else
292  {
293  label halfLen = maxLen/2;
294 
295  os << "Size larger than " << maxLen << ". Printing first and last "
296  << halfLen << " elements:" << nl << endl;
297 
298  writeDebug(os, coords, halfLen, iter, n);
299 
300  os << nl << " .." << nl << endl;
301 
302  for (; n < size() - halfLen; ++n)
303  {
304  ++iter;
305  }
306 
307  writeDebug(os, coords, halfLen, iter, n);
308  }
309 }
310 
311 
312 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
313 
315 (
316  const polyMesh& mesh,
317  const word& name,
318  readOption r,
319  writeOption w
320 )
321 {
322  IOobject io
323  (
324  name,
326  (
328  word::null,
331  ),
332  polyMesh::meshSubDir/"sets",
333  mesh,
334  r,
335  w
336  );
337 
338  if (!io.typeHeaderOk<topoSet>(false) && disallowGenericSets != 0)
339  {
340  DebugInfo<< "Setting no read for set " << name << endl;
341  io.readOpt() = IOobject::NO_READ;
342  }
343 
344  return io;
345 }
346 
347 
349 (
350  const Time& runTime,
351  const word& name,
352  readOption r,
353  writeOption w
354 )
355 {
356  return IOobject
357  (
358  name,
360  (
361  polyMesh::meshSubDir/"sets",
362  word::null,
365  (
367  "faces",
369  )
370  ),
371  polyMesh::meshSubDir/"sets",
372  runTime,
373  r,
374  w
375  );
376 }
377 
378 
379 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
380 
381 Foam::topoSet::topoSet(const IOobject& obj, const word& wantedType)
382 :
383  regIOobject(obj)
384 {
385  if
386  (
389  || (
391  && headerOk()
392  )
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  || (
421  readOpt() == IOobject::READ_IF_PRESENT
422  && headerOk()
423  )
424  )
425  {
426  if (readStream(wantedType).good())
427  {
428  readStream(wantedType) >> static_cast<labelHashSet&>(*this);
429 
430  close();
431  }
432  }
433 }
434 
435 
437 (
438  const polyMesh& mesh,
439  const word& name,
440  const label size,
441  writeOption w
442 )
443 :
444  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
445  labelHashSet(size)
446 {}
447 
448 
450 (
451  const polyMesh& mesh,
452  const word& name,
453  const labelHashSet& labels,
454  writeOption w
455 )
456 :
457  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
458  labelHashSet(labels)
459 {}
460 
461 
463 (
464  const polyMesh& mesh,
465  const word& name,
466  labelHashSet&& labels,
467  writeOption w
468 )
469 :
470  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
471  labelHashSet(std::move(labels))
472 {}
473 
474 
476 (
477  const polyMesh& mesh,
478  const word& name,
479  const labelUList& labels,
480  writeOption w
481 )
482 :
483  regIOobject(findIOobject(mesh, name, IOobject::NO_READ, w)),
484  labelHashSet(labels)
485 {}
486 
487 
488 Foam::topoSet::topoSet(const IOobject& io, const label size)
489 :
490  regIOobject(io),
491  labelHashSet(size)
492 {}
493 
494 
496 :
497  regIOobject(io),
498  labelHashSet(labels)
499 {}
500 
501 
503 :
504  regIOobject(io),
505  labelHashSet(std::move(labels))
506 {}
507 
508 
509 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
510 
511 bool Foam::topoSet::found(const label id) const
512 {
513  return static_cast<const labelHashSet&>(*this).found(id);
514 }
515 
516 
517 bool Foam::topoSet::set(const label id)
518 {
519  return static_cast<labelHashSet&>(*this).set(id);
520 }
521 
522 
524 {
525  return static_cast<labelHashSet&>(*this).unset(id);
526 }
527 
528 
529 void Foam::topoSet::set(const labelUList& labels)
530 {
531  static_cast<labelHashSet&>(*this).set(labels);
532 }
533 
534 
535 void Foam::topoSet::unset(const labelUList& labels)
536 {
537  static_cast<labelHashSet&>(*this).unset(labels);
538 }
539 
540 
541 void Foam::topoSet::invert(const label maxLen)
542 {
543  // Retain a copy of the original (current) set.
544  labelHashSet original
545  (
546  std::move(static_cast<labelHashSet&>(*this))
547  );
548 
549  clear(); // Maybe don't trust the previous move operation
550  resize(2*max(64, (maxLen - original.size())));
551 
552  for (label id=0; id < maxLen; ++id)
553  {
554  if (!original.found(id))
555  {
556  this->set(id);
557  }
558  }
559 }
560 
561 
563 {
564  // Only retain entries found in both sets
565  static_cast<labelHashSet&>(*this) &= set;
566 }
567 
568 
570 {
571  // Add entries to the set
572  static_cast<labelHashSet&>(*this) |= set;
573 }
574 
575 
577 {
578  // Subtract entries from the set
579  static_cast<labelHashSet&>(*this) -= set;
580 }
581 
582 
584 {
585  this->subtractSet(set);
586 }
587 
588 
590 {
592 }
593 
594 
595 void Foam::topoSet::writeDebug(Ostream& os, const label maxLen) const
596 {
597  label n = 0;
598 
599  topoSet::const_iterator iter = this->cbegin();
600 
601  if (size() <= maxLen)
602  {
603  writeDebug(os, maxLen, iter, n);
604  }
605  else
606  {
607  label halfLen = maxLen/2;
608 
609  os << "Size larger than " << maxLen << ". Printing first and last "
610  << halfLen << " elements:" << nl << endl;
611 
612  writeDebug(os, halfLen, iter, n);
613 
614  os << nl << " .." << nl << endl;
615 
616  for (; n < size() - halfLen; ++n)
617  {
618  ++iter;
619  }
620 
621  writeDebug(os, halfLen, iter, n);
622  }
623 }
624 
625 
627 {
628  return (os << *this).good();
629 }
630 
631 
633 {
635 }
636 
637 
639 {
640  IOobject io
641  (
642  "dummy",
644  mesh.meshSubDir/"sets",
645  mesh
646  );
647  fileName setsDir(io.path());
648 
649  if (debug) DebugVar(setsDir);
650 
651  if (isDir(setsDir))
652  {
653  rmDir(setsDir);
654  }
655 }
656 
657 
658 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
659 
661 {
663 }
664 
665 
666 // ************************************************************************* //
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:221
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:131
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::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:46
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:660
Foam::HashSet::operator=
void operator=(const this_type &rhs)
Copy assignment.
Definition: HashSet.H:324
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:798
mapPolyMesh.H
Foam::polyMesh::meshSubDir
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
Definition: polyMesh.H:315
Foam::polyMesh::facesInstance
const fileName & facesInstance() const
Return the current instance directory for faces.
Definition: polyMesh.C:821
Foam::topoSet::deleteSet
virtual void deleteSet(const topoSet &set)
Deprecated(2018-10) subtract elements present in set.
Definition: topoSet.C:583
Foam::topoSet::disallowGenericSets
static int disallowGenericSets
Debug switch to disallow the use of generic sets.
Definition: topoSet.H:123
Foam::topoSet::subset
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
Definition: topoSet.C:562
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:337
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:54
polyMesh.H
Foam::HashSet< label, Hash< label > >
Foam::topoSet::invert
virtual void invert(const label maxLen)
Invert contents.
Definition: topoSet.C:541
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:315
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:112
Foam::topoSet::addSet
virtual void addSet(const topoSet &set)
Add elements present in set.
Definition: topoSet.C:569
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:419
Foam::topoSet::found
virtual bool found(const label id) const
Has the given index?
Definition: topoSet.C:511
Foam::topoSet::updateMesh
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels. Not implemented.
Definition: topoSet.C:632
Foam::label
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:62
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:517
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:576
Foam::topoSet
General set of labels of mesh quantity (points, cells, faces).
Definition: topoSet.H:66
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:195
Foam::FatalError
error FatalError
FatalErrorInLookup
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
Definition: error.H:359
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:137
stdFoam::cend
constexpr auto cend(const C &c) -> decltype(c.end())
Return const_iterator to the end of the container c.
Definition: stdFoam.H:131
Foam::IOobject::good
bool good() const
Definition: IOobjectI.H:193
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:781
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:67
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:355
DebugInfo
#define DebugInfo
Report an information message using Foam::Info.
Definition: messageStream.H:350
clear
patchWriters clear()
Foam::nl
constexpr char nl
Definition: Ostream.H:372
stdFoam::cbegin
constexpr auto cbegin(const C &c) -> decltype(c.begin())
Return const_iterator to the beginning of the container c.
Definition: stdFoam.H:107
Foam::rmDir
bool rmDir(const fileName &directory, const bool silent=false)
Remove a dirctory 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:626
Foam::IOobject::readOpt
readOption readOpt() const
The read option.
Definition: IOobjectI.H:141
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:523
Foam::topoSet::check
virtual void check(const label maxSize)
Check limits on addressable range.
Definition: topoSet.C:200
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:160
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:246
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:589
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:415
Foam::topoSet::updateLabels
virtual void updateLabels(const labelUList &map)
Update map from map.
Definition: topoSet.C:144
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:638
DebugVar
#define DebugVar(var)
Report a variable name and value.
Definition: messageStream.H:372
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::regIOobject::headerOk
bool headerOk()
Read and check header info.
Definition: regIOobject.C:449
Foam::HashSet::set
bool set(const Key &key)
Same as insert (no value to overwrite)
Definition: HashSet.H:188
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