General set of labels of mesh quantity (points, cells, faces). More...
#include <meshTools/topoSet.H>
General set of labels of mesh quantity (points, cells, faces).
Contains various 'notImplemented' functions, but I do not want to make this class abstract since it is quite handy to work on topoSets.
Inheritance diagram for topoSet:
Collaboration diagram for topoSet:Public Member Functions | |
| TypeName ("topoSet") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, topoSet, word,(const polyMesh &mesh, const word &name, readOption r, writeOption w),(mesh, name, r, w)) | |
| declareRunTimeSelectionTable (autoPtr, topoSet, size,(const polyMesh &mesh, const word &name, const label size, writeOption w),(mesh, name, size, w)) | |
| declareRunTimeSelectionTable (autoPtr, topoSet, set,(const polyMesh &mesh, const word &name, const topoSet &set, writeOption w),(mesh, name, set, w)) | |
| topoSet (const IOobject &, const word &wantedType) | |
| Construct from IOobject as explicitly passed type. | |
| topoSet (const polyMesh &mesh, const word &wantedType, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE) | |
| Construct from polyMesh and name. | |
| topoSet (const polyMesh &mesh, const word &name, const label, writeOption w=NO_WRITE) | |
| Construct empty from additional size of labelHashSet. | |
| topoSet (const polyMesh &mesh, const word &name, const labelHashSet &, writeOption w=NO_WRITE) | |
| Construct empty from additional labelHashSet. | |
| topoSet (const IOobject &, const label size) | |
| Construct empty from IOobject and size. | |
| topoSet (const IOobject &, const labelHashSet &) | |
| Construct from IOobject and labelHashSet. | |
| autoPtr< topoSet > | clone () const |
| Clone. | |
| virtual | ~topoSet () |
| virtual void | invert (const label maxLen) |
| Invert contents. (insert all members 0..maxLen-1 which were not in. | |
| virtual void | subset (const topoSet &set) |
| Subset contents. Only elements present in both sets remain. | |
| virtual void | addSet (const topoSet &set) |
| Add elements present in set. | |
| virtual void | deleteSet (const topoSet &set) |
| Delete elements present in set. | |
| virtual void | sync (const polyMesh &mesh) |
| Sync set across coupled patches. | |
| virtual void | writeDebug (Ostream &os, const label maxLen) const |
| Write labels columnwise to os. Truncate to maxLen. | |
| virtual void | writeDebug (Ostream &os, const primitiveMesh &, const label maxLen) const |
| Like above but also writes mesh related quantity. | |
| virtual bool | writeData (Ostream &) const |
| Write contents. | |
| virtual void | updateMesh (const mapPolyMesh &morphMap) |
| Update any stored data for new labels. Not implemented. | |
| virtual label | maxSize (const polyMesh &mesh) const |
| Return max allowable index (+1). Not implemented. | |
| void | operator= (const topoSet &) |
| Copy labelHashSet part only. | |
Public Member Functions inherited from regIOobject | |
| TypeName ("regIOobject") | |
| Runtime type information. | |
| regIOobject (const IOobject &, const bool isTime=false) | |
| Construct from IOobject. Optional flag for if IOobject is the. | |
| regIOobject (const regIOobject &) | |
| Construct as copy. | |
| regIOobject (const regIOobject &, bool registerCopy) | |
| Construct as copy, and transferring registry registration to copy. | |
| virtual | ~regIOobject () |
| bool | checkIn () |
| Add object to registry. | |
| bool | checkOut () |
| Remove object from registry. | |
| bool | ownedByRegistry () const |
| Is this object owned by the registry? | |
| void | store () |
| Transfer ownership of this object to its registry. | |
| void | release () |
| Release ownership of this object from its registry. | |
| label | eventNo () const |
| Event number at last update. | |
| label & | eventNo () |
| Event number at last update. | |
| bool | upToDate (const word &) const |
| Am I uptodate with respect to other regIOobjects. | |
| bool | upToDate (const word &, const word &) const |
| bool | upToDate (const word &, const word &, const word &) const |
| bool | upToDate (const word &, const word &, const word &, const word &) const |
| void | setUpToDate () |
| Flag me as up to date. | |
| virtual void | rename (const word &newName) |
| Rename. | |
| Istream & | readStream (const word &) |
| Return Istream and check object type against that given. | |
| void | close () |
| Close Istream. | |
| virtual bool | readData (Istream &) |
| Virtual readData function. | |
| virtual bool | read () |
| Read object. | |
| virtual bool | modified () const |
| Return true if the object's file has been modified. | |
| virtual bool | readIfModified () |
| Read object if modified. | |
| virtual bool | writeObject (IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const |
| Write using given format, version and compression. | |
| virtual bool | write () const |
| Write using setting from DB. | |
| void | operator= (const IOobject &) |
Public Member Functions inherited from IOobject | |
| TypeName ("IOobject") | |
| Runtime type information. | |
| IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
| Construct from name, instance, registry, io options. | |
| IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
| Construct from name, instance, local, registry, io options. | |
| IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
| Construct from path, registry, io options. | |
| virtual | ~IOobject () |
| const Time & | time () const |
| Return time. | |
| const objectRegistry & | db () const |
| Return the local objectRegistry. | |
| const word & | name () const |
| Return name. | |
| const word & | headerClassName () const |
| Return name of the class name read from header. | |
| string & | note () |
| Return non-constant access to the optional note. | |
| const string & | note () const |
| Return the optional note. | |
| bool | registerObject () const |
| Register object created from this IOobject with registry if true. | |
| readOption | readOpt () const |
| readOption & | readOpt () |
| writeOption | writeOpt () const |
| writeOption & | writeOpt () |
| const fileName & | rootPath () const |
| const fileName & | caseName () const |
| const fileName & | instance () const |
| fileName & | instance () |
| const fileName & | local () const |
| fileName | path () const |
| Return complete path. | |
| fileName | path (const word &instance, const fileName &local="") const |
| Return complete path with alternative instance and local. | |
| fileName | objectPath () const |
| Return complete path + object name. | |
| fileName | filePath () const |
| Return complete path + object name if the file exists. | |
| bool | readHeader (Istream &) |
| Read header. | |
| bool | headerOk () |
| Read and check header info. | |
| bool | writeHeader (Ostream &) const |
| Write header. | |
| bool | good () const |
| bool | bad () const |
| InfoProxy< IOobject > | info () const |
| Return info proxy. | |
Public Member Functions inherited from HashSet< label, Hash< label > > | |
| HashSet (const label size=128) | |
| Construct given initial size. | |
| HashSet (Istream &is) | |
| Construct from Istream. | |
| HashSet (const UList< label > &lst) | |
| Construct from UList of Key. | |
| HashSet (const HashSet< label, Hash< label > > &hs) | |
| Construct as copy. | |
| HashSet (const Xfer< HashSet< label, Hash< label > > > &hs) | |
| Construct by transferring the parameter contents. | |
| HashSet (const Xfer< HashTable< nil, label, Hash< label > > > &hs) | |
| Construct by transferring the parameter contents. | |
| HashSet (const HashTable< AnyType, label, AnyHash > &) | |
| Construct from the keys of another HashTable,. | |
| bool | insert (const label &key) |
| Insert a new entry. | |
| bool | set (const label &key) |
| Same as insert (cannot overwrite nil content) | |
| bool | operator[] (const label &) const |
| Return true if the entry exists, same as found() | |
| bool | operator== (const HashSet< label, Hash< label > > &) const |
| Equality. Two hashtables are equal when their contents are equal. | |
| bool | operator!= (const HashSet< label, Hash< label > > &) const |
| The opposite of the equality operation. | |
| void | operator|= (const HashSet< label, Hash< label > > &) |
| Combine entries from HashSets. | |
| void | operator&= (const HashSet< label, Hash< label > > &) |
| Only retain entries found in both HashSets. | |
| void | operator^= (const HashSet< label, Hash< label > > &) |
| Only retain unique entries (xor) | |
| void | operator+= (const HashSet< label, Hash< label > > &rhs) |
| Add entries listed in the given HashSet to this HashSet. | |
| void | operator-= (const HashSet< label, Hash< label > > &) |
| Remove entries listed in the given HashSet from this HashSet. | |
Public Member Functions inherited from HashTable< nil, label, Hash< label > > | |
| bool | set (const label &, const nil &newElmt) |
| Assign a new hashedEntry, overwriting existing entries. | |
| HashTable (const label size=128) | |
| Construct given initial table size. | |
| HashTable (Istream &, const label size=128) | |
| Construct from Istream. | |
| HashTable (const HashTable< nil, label, Hash< label > > &) | |
| Construct as copy. | |
| HashTable (const Xfer< HashTable< nil, label, Hash< label > > > &) | |
| Construct by transferring the parameter contents. | |
| ~HashTable () | |
| label | size () const |
| Return number of elements in table. | |
| bool | empty () const |
| Return true if the hash table is empty. | |
| bool | found (const label &) const |
| Return true if hashedEntry is found in table. | |
| iterator | find (const label &) |
| Find and return an iterator set at the hashedEntry. | |
| const_iterator | find (const label &) const |
| Find and return an const_iterator set at the hashedEntry. | |
| List< label > | toc () const |
| Return the table of contents. | |
| List< label > | sortedToc () const |
| Return the table of contents as a sorted list. | |
| Ostream & | printInfo (Ostream &) const |
| Print information. | |
| bool | insert (const label &, const nil &newElmt) |
| Insert a new hashedEntry. | |
| bool | erase (const iterator &) |
| Erase an hashedEntry specified by given iterator. | |
| bool | erase (const label &) |
| Erase an hashedEntry specified by given key if in table. | |
| label | erase (const UList< label > &) |
| Remove entries given by the listed keys from this HashTable. | |
| label | erase (const HashTable< AnyType, label, AnyHash > &) |
| Remove entries given by the given keys from this HashTable. | |
| void | resize (const label newSize) |
| Resize the hash table for efficiency. | |
| void | clear () |
| Clear all entries from table. | |
| void | clearStorage () |
| Clear the table entries and the table itself. | |
| void | transfer (HashTable< nil, label, Hash< label > > &) |
| Transfer the contents of the argument table into this table. | |
| Xfer< HashTable< nil, label, Hash< label > > > | xfer () |
| Transfer contents to the Xfer container. | |
| nil & | operator[] (const label &) |
| Find and return an hashedEntry. | |
| nil & | operator() (const label &) |
| Find and return an hashedEntry, create it null if not present. | |
| void | operator= (const HashTable< nil, label, Hash< label > > &) |
| Assignment. | |
| bool | operator== (const HashTable< nil, label, Hash< label > > &) const |
| Equality. Two hash tables are equal if all contents of first are. | |
| bool | operator!= (const HashTable< nil, label, Hash< label > > &) const |
| The opposite of the equality operation. Takes linear time. | |
| iterator | begin () |
| iterator set to the begining of the HashTable | |
| const_iterator | begin () const |
| const_iterator set to the beginning of the HashTable | |
| const iterator & | end () |
| iterator set to beyond the end of the HashTable | |
| const const_iterator & | end () const |
| const_iterator set to beyond the end of the HashTable | |
| const_iterator | cbegin () const |
| const_iterator set to the beginning of the HashTable | |
| const const_iterator & | cend () const |
| const_iterator set to beyond the end of the HashTable | |
Static Public Member Functions | |
| static fileName | localPath (const polyMesh &mesh, const word &name) |
| Name of file set will use. | |
| 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. | |
| static autoPtr< topoSet > | New (const word &setType, const polyMesh &mesh, const word &name, const label size, writeOption w=NO_WRITE) |
| Return a pointer to a new toposet of given size. | |
| static autoPtr< topoSet > | New (const word &setType, const polyMesh &mesh, const word &name, const topoSet &set, writeOption w=NO_WRITE) |
| Return a pointer to a new toposet as copy of another toposet. | |
Static Public Member Functions inherited from regIOobject | |
| template<class Type > | |
| static Type & | store (Type *) |
| Transfer ownership of the given object pointer to its registry. | |
| template<class Type > | |
| static Type & | store (autoPtr< Type > &) |
| Transfer ownership of the given object pointer to its registry. | |
Static Public Member Functions inherited from IOobject | |
| static bool | fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name) |
| Split path into instance, local, name components. | |
| template<class Stream > | |
| static Stream & | writeBanner (Stream &os, bool noHint=false) |
| Write the standard OpenFOAM file/dictionary banner. | |
| template<class Stream > | |
| static Stream & | writeDivider (Stream &os) |
| Write the standard file section divider. | |
| template<class Stream > | |
| static Stream & | writeEndDivider (Stream &os) |
| Write the standard end file divider. | |
Protected Member Functions | |
| void | updateLabels (const labelList &map) |
| Update map from map. Used to update cell/face labels. | |
| void | check (const label maxLabel) |
| Check validity of contents. | |
| void | writeDebug (Ostream &os, const label maxElem, topoSet::const_iterator &iter, label &elemI) const |
| Write part of contents nicely formatted. Prints labels only. | |
| void | writeDebug (Ostream &os, const pointField &coords, const label maxElem, topoSet::const_iterator &iter, label &elemI) const |
| Write part of contents nicely formatted. Prints label. | |
| void | writeDebug (Ostream &os, const pointField &coords, const label maxLen) const |
| Write labels and coordinates columnwise to os. Truncate to maxLen. | |
| topoSet (const topoSet &) | |
| Disallow default bitwise copy construct. | |
Additional Inherited Members | |
Public Types inherited from HashSet< label, Hash< label > > | |
| typedef HashTable< nil, label, Hash< label > >::iterator | iterator |
| typedef HashTable< nil, label, Hash< label > >::const_iterator | const_iterator |
Public Types inherited from HashTable< nil, label, Hash< label > > | |
| typedef nil | value_type |
| Type of values the HashTable contains. | |
| typedef nil & | reference |
| Type that can be used for storing into HashTable::value_type. | |
| typedef const nil & | const_reference |
| Type that can be used for storing into constant. | |
| typedef label | size_type |
| The type that can represent the size of a HashTable. | |
Static Public Attributes inherited from regIOobject | |
| static int | fileModificationSkew |
Construct from IOobject as explicitly passed type.
Can't use typeName info here since subclasses not yet instantiated
Definition at line 327 of file topoSet.C.
References regIOobject::close(), IOobject::good(), IOobject::headerOk(), IOobject::MUST_READ, IOobject::READ_IF_PRESENT, IOobject::readOpt(), and regIOobject::readStream().
| topoSet | ( | const polyMesh & | mesh, |
| const word & | wantedType, | ||
| const word & | name, | ||
| readOption | r = MUST_READ, |
||
| writeOption | w = NO_WRITE |
||
| ) |
Construct from polyMesh and name.
Definition at line 351 of file topoSet.C.
References IOobject::MUST_READ, and IOobject::READ_IF_PRESENT.
| topoSet | ( | const polyMesh & | mesh, |
| const word & | name, | ||
| const label | size, | ||
| writeOption | w = NO_WRITE |
||
| ) |
| topoSet | ( | const polyMesh & | mesh, |
| const word & | name, | ||
| const labelHashSet & | set, | ||
| writeOption | w = NO_WRITE |
||
| ) |
| topoSet | ( | const IOobject & | obj, |
| const labelHashSet & | set | ||
| ) |
|
protected |
Update map from map. Used to update cell/face labels.
after morphing
Referenced by faceSet::updateMesh(), pointSet::updateMesh(), and cellSet::updateMesh().
|
protected |
Check validity of contents.
|
protected |
Write part of contents nicely formatted. Prints labels only.
Definition at line 232 of file topoSet.C.
References Foam::endl().
Referenced by faceSet::writeDebug(), pointSet::writeDebug(), cellSet::writeDebug(), and topoSet::writeDebug().
|
protected |
Write part of contents nicely formatted. Prints label.
and corresponding coordinate.
Definition at line 257 of file topoSet.C.
References Foam::endl().
|
protected |
Write labels and coordinates columnwise to os. Truncate to maxLen.
Definition at line 282 of file topoSet.C.
References Foam::endl(), boundBox::max(), and boundBox::min().
| TypeName | ( | "topoSet" | ) |
Runtime type information.
Name of file set will use.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| topoSet | , | ||
| word | , | ||
| (const polyMesh &mesh, const word &name, readOption r, writeOption w) | , | ||
| (mesh, name, r, w) | |||
| ) |
| declareRunTimeSelectionTable | ( | autoPtr | , |
| topoSet | , | ||
| size | , | ||
| (const polyMesh &mesh, const word &name, const label size, writeOption w) | , | ||
| (mesh, name, size, w) | |||
| ) |
| declareRunTimeSelectionTable | ( | autoPtr | , |
| topoSet | , | ||
| set | , | ||
| (const polyMesh &mesh, const word &name, const topoSet &set, writeOption w) | , | ||
| (mesh, name, set, w) | |||
| ) |
Clone.
Reimplemented from IOobject.
Definition at line 215 of file topoSet.H.
References notImplemented.
|
static |
Return a pointer to a toposet read from file.
Definition at line 46 of file topoSet.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, mesh, and Foam::name().
|
static |
Return a pointer to a new toposet of given size.
Definition at line 77 of file topoSet.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, mesh, and Foam::name().
|
static |
Return a pointer to a new toposet as copy of another toposet.
Definition at line 108 of file topoSet.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, mesh, and Foam::name().
|
virtual |
Invert contents. (insert all members 0..maxLen-1 which were not in.
set)
Reimplemented in faceZoneSet, pointZoneSet, and cellZoneSet.
Definition at line 462 of file topoSet.C.
References HashTable< nil, label, Hash< label > >::clear(), HashTable< T, Key, Hash >::found(), HashSet< label, Hash< label > >::insert(), HashTable< nil, label, Hash< label > >::resize(), and HashTable< T, Key, Hash >::size().
|
virtual |
Subset contents. Only elements present in both sets remain.
Reimplemented in faceZoneSet, pointZoneSet, and cellZoneSet.
Definition at line 481 of file topoSet.C.
References HashTable< T, Key, Hash >::begin(), HashTable< nil, label, Hash< label > >::clear(), HashTable< T, Key, Hash >::end(), HashTable< nil, label, Hash< label > >::found(), HashSet< label, Hash< label > >::insert(), Foam::min(), HashTable< nil, label, Hash< label > >::resize(), and HashTable< T, Key, Hash >::size().
|
virtual |
Add elements present in set.
Reimplemented in faceZoneSet, pointZoneSet, and cellZoneSet.
Definition at line 505 of file topoSet.C.
References HashTable< nil, label, Hash< label > >::begin(), and HashSet< label, Hash< label > >::insert().
|
virtual |
Delete elements present in set.
Reimplemented in faceZoneSet, pointZoneSet, and cellZoneSet.
Definition at line 519 of file topoSet.C.
References HashTable< nil, label, Hash< label > >::begin(), and HashTable< nil, label, Hash< label > >::erase().
|
virtual |
Sync set across coupled patches.
Reimplemented in cellSet, faceZoneSet, pointZoneSet, cellZoneSet, faceSet, and pointSet.
Definition at line 533 of file topoSet.C.
References notImplemented.
|
virtual |
Write labels columnwise to os. Truncate to maxLen.
Definition at line 539 of file topoSet.C.
References HashTable< nil, label, Hash< label > >::begin(), Foam::endl(), HashTable< nil, label, Hash< label > >::size(), and topoSet::writeDebug().
|
virtual |
Like above but also writes mesh related quantity.
(usually coordinate).
Reimplemented in cellSet, faceZoneSet, pointZoneSet, cellZoneSet, pointSet, and faceSet.
Definition at line 573 of file topoSet.C.
References notImplemented.
|
virtual |
|
virtual |
Update any stored data for new labels. Not implemented.
Reimplemented in faceZoneSet, cellSet, pointZoneSet, cellZoneSet, faceSet, and pointSet.
Definition at line 592 of file topoSet.C.
References notImplemented.
|
virtual |
Return max allowable index (+1). Not implemented.
Return max index+1.
Reimplemented in faceZoneSet, pointZoneSet, cellZoneSet, cellSet, faceSet, and pointSet.
Definition at line 599 of file topoSet.C.
References notImplemented.