Go to the documentation of this file.
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()
129 return mesh.facesInstance()/
mesh.dbDir()/polyMesh::meshSubDir/
"sets"/
name;
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,
356 if (readStream(wantedType).good())
358 readStream(wantedType) >>
static_cast<labelHashSet&
>(*this);
457 for (
label cellI = 0; cellI < maxLen; cellI++)
459 if (!currentSet.
found(cellI))
516 if (size() <= maxLen)
518 writeDebug(os, maxLen, iter,
n);
522 label halfLen = maxLen/2;
524 os <<
"Size larger than " << maxLen <<
". Printing first and last "
525 << halfLen <<
" elements:" <<
endl <<
endl;
527 writeDebug(os, halfLen, iter,
n);
531 for (;
n < size() - halfLen; ++
n)
536 writeDebug(os, halfLen, iter,
n);
543 return (os << *
this).good();
void writeDebug(Ostream &os, const label maxElem, topoSet::const_iterator &iter, label &elemI) const
Write part of contents nicely formatted. Prints labels only.
static fileName localPath(const polyMesh &mesh, const word &name)
Name of file set will use.
vectorField pointField
pointField is a vectorField.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void operator=(const HashTable< T, Key, Hash > &)
Assignment.
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
A class for handling words, derived from string.
A class for handling file names.
const point & max() const
Maximum describing the bounding box.
void operator=(const topoSet &)
Copy labelHashSet part only.
void transfer(HashTable< T, Key, Hash > &)
Transfer the contents of the argument table into this table.
topoSet(const topoSet &)
Disallow default bitwise copy construct.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
virtual const fileName & dbDir() const
Override the objectRegistry dbDir for a single-region case.
triSurfaceToAgglom resize(surfacesMesh.size())
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh")
An STL-conforming const_iterator.
const fileName & facesInstance() const
Return the current instance directory for faces.
virtual void deleteSet(const topoSet &set)
Delete elements present in set.
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
virtual void invert(const label maxLen)
Invert contents. (insert all members 0..maxLen-1 which were not in.
Mesh consisting of general polyhedral cells.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
virtual void addSet(const topoSet &set)
Add elements present in set.
bool headerOk()
Read and check header info.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
void check(const label maxLabel)
Check validity of contents.
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels. Not implemented.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
readOption readOpt() const
writeOption
Enumeration defining the write options.
const word & name() const
Return name.
General set of labels of mesh quantity (points, cells, faces).
const point & min() const
Minimum describing the bounding box.
label size() const
Return number of elements in table.
bool found(const Key &) const
Return true if hashedEntry is found in table.
errorManip< error > abort(error &err)
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".
errorManipArg< error, int > exit(error &err, const int errNo=1)
const Key & key() const
Return the Key corresponding to the iterator.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
void updateLabels(const labelList &map)
Update map from map. Used to update cell/face labels.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Istream & readStream()
Return Istream.
void close()
Close Istream.
virtual bool writeData(Ostream &) const
Write contents.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool insert(const Key &key)
Insert a new entry.
static const word null
An empty word.
A bounding box defined in terms of the points at its extremities.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const Time & time() const
Return the top-level database.
readOption
Enumeration defining the read options.
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual void sync(const polyMesh &mesh)
Sync set across coupled patches.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
defineTypeNameAndDebug(combustionModel, 0)
virtual ~topoSet()
Destructor.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
timeIndices insert(timeIndex, timeDirs[timeI].value())