54 wordConstructorTable::iterator cstrIter =
55 wordConstructorTablePtr_->find(setType);
57 if (cstrIter == wordConstructorTablePtr_->end())
60 <<
"Unknown set type " << setType
62 <<
"Valid set types : " <<
endl 63 << wordConstructorTablePtr_->sortedToc()
80 sizeConstructorTable::iterator cstrIter =
81 sizeConstructorTablePtr_->find(setType);
83 if (cstrIter == sizeConstructorTablePtr_->end())
86 <<
"Unknown set type " << setType
88 <<
"Valid set types : " <<
endl 89 << sizeConstructorTablePtr_->sortedToc()
106 setConstructorTable::iterator cstrIter =
107 setConstructorTablePtr_->find(setType);
109 if (cstrIter == setConstructorTablePtr_->end())
112 <<
"Unknown set type " << setType
114 <<
"Valid set types : " <<
endl 115 << setConstructorTablePtr_->sortedToc()
140 bool changed =
false;
144 if ((iter.key() < 0) || (iter.key() > map.
size()))
147 <<
"Illegal content " << iter.key() <<
" of set:" <<
name()
149 <<
"Value should be between 0 and " << map.
size()-1
153 const label newCelli = map[iter.key()];
155 if (newCelli != iter.key())
170 const label newCelli = map[iter.key()];
187 if ((iter.key() < 0) || (iter.key() > maxLabel))
190 <<
"Illegal content " << iter.key() <<
" of set:" <<
name()
192 <<
"Value should be between 0 and " << maxLabel
210 for (; (iter != end()) && (n < maxElem); ++iter)
212 if ((n != 0) && ((n % 10) == 0))
216 os << iter.key() <<
' ';
236 for (; (iter != end()) && (n < maxElem); ++iter)
238 if ((n != 0) && ((n % 3) == 0))
242 os << iter.key() << coords[iter.key()] <<
' ';
260 os <<
"Set bounding box: min = " 261 << bb.
min() <<
" max = " << bb.
max() <<
" metres. " <<
endl <<
endl;
267 if (size() <= maxLen)
269 writeDebug(os, coords, maxLen, iter, n);
273 label halfLen = maxLen/2;
275 os <<
"Size larger than " << maxLen <<
". Printing first and last " 276 << halfLen <<
" elements:" << endl <<
endl;
278 writeDebug(os, coords, halfLen, iter, n);
282 for (; n < size() - halfLen; ++
n)
287 writeDebug(os, coords, halfLen, iter, n);
321 const word& wantedType,
457 for (
label celli = 0; celli < maxLen; celli++)
459 if (!currentSet.
found(celli))
477 if (
set.
found(iter.key()))
516 if (
size() <= maxLen)
522 label halfLen = maxLen/2;
524 os <<
"Size larger than " << maxLen <<
". Printing first and last " 525 << halfLen <<
" elements:" <<
endl <<
endl;
531 for (; n <
size() - halfLen; ++
n)
543 return (os << *
this).good();
const Time & time() const
Return time.
bool set(const label &key)
Same as insert (cannot overwrite nil content)
void operator=(const topoSet &)
Copy labelHashSet part only.
writeOption
Enumeration defining the write options.
HashTable< nil, label, Hash< label > >::const_iterator const_iterator
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const point & min() const
Minimum describing the bounding box.
const fileName & facesInstance() const
Return the current instance directory for faces.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
void size(const label)
Override size to be inconsistent with allocated storage.
void operator=(const HashTable< nil, label, Hash< label > > &)
Assignment.
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.
bool good() const
Return true if next operation might succeed.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const point & max() const
Maximum describing the bounding box.
A bounding box defined in terms of the points at its extremities.
label size() const
Return number of elements in table.
readOption
Enumeration defining the read options.
bool insert(const Key &key)
Insert a new entry.
void check(const label maxLabel)
Check validity of contents.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
regIOobject(const IOobject &, const bool isTime=false)
Construct from IOobject. Optional flag for if IOobject is the.
bool erase(const iterator &)
Erase a hashedEntry specified by given iterator.
virtual bool writeData(Ostream &) const
Write contents.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
void updateLabels(const labelList &map)
Update map from map. Used to update cell/face labels.
virtual ~topoSet()
Destructor.
word findInstance(const fileName &dir, const word &name=word::null, const IOobject::readOption rOpt=IOobject::MUST_READ, const word &stopInstance=word::null) const
Return the location of "dir" containing the file "name".
vectorField pointField
pointField is a vectorField.
Istream & readStream(const word &)
Return Istream and check object type against that given.
virtual void addSet(const topoSet &set)
Add elements present in set.
void writeDebug(Ostream &os, const label maxElem, topoSet::const_iterator &iter, label &elemI) const
Write part of contents nicely formatted. Prints labels only.
void close()
Close Istream.
A class for handling words, derived from string.
void clear()
Clear all entries from table.
virtual const fileName & dbDir() const
Override the objectRegistry dbDir for a single-region case.
static const word null
An empty word.
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
iterator begin()
Iterator set to the beginning of the HashTable.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
errorManip< error > abort(error &err)
bool found(const Key &) const
Return true if hashedEntry is found in table.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
General set of labels of mesh quantity (points, cells, faces).
word name(const complex &)
Return a string representation of a complex.
virtual void deleteSet(const topoSet &set)
Delete elements present in set.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
readOption readOpt() const
virtual void sync(const polyMesh &mesh)
Sync set across coupled patches.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual void invert(const label maxLen)
Invert contents. (insert all members 0..maxLen-1 which were not in.
bool headerOk()
Read and check header info.
void resize(const label newSize)
Resize the hash table for efficiency.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Mesh consisting of general polyhedral cells.
topoSet(const topoSet &)
Disallow default bitwise copy construct.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels. Not implemented.
static fileName localPath(const polyMesh &mesh, const word &name)
Name of file set will use.