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.
Definition at line 62 of file topoSet.H.
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.
| |
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.
| |
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.
|
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 | ||
) |
void updateLabels | ( | const labelList & | map ) | [protected]
|
Update map from map. Used to update cell/face labels.
after morphing
Referenced by pointSet::updateMesh(), faceSet::updateMesh(), and cellSet::updateMesh().
void check | ( | const label | maxLabel ) | [protected]
|
Check validity of contents.
void writeDebug | ( | Ostream & | os, |
const label | maxElem, | ||
topoSet::const_iterator & | iter, | ||
label & | elemI | ||
) | const [protected]
|
Write part of contents nicely formatted. Prints labels only.
Definition at line 232 of file topoSet.C.
References Foam::endl().
Referenced by topoSet::writeDebug(), pointSet::writeDebug(), faceSet::writeDebug(), and cellSet::writeDebug().
void writeDebug | ( | Ostream & | os, |
const pointField & | coords, | ||
const label | maxElem, | ||
topoSet::const_iterator & | iter, | ||
label & | elemI | ||
) | const [protected]
|
Write part of contents nicely formatted. Prints label.
and corresponding coordinate.
Definition at line 257 of file topoSet.C.
References Foam::endl().
void writeDebug | ( | Ostream & | os, |
const pointField & | coords, | ||
const label | maxLen | ||
) | const [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.
autoPtr< topoSet > New | ( | const word & | setType, |
const polyMesh & | mesh, | ||
const word & | name, | ||
readOption | r = MUST_READ ,
|
||
writeOption | w = NO_WRITE
|
||
) | [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().
autoPtr< topoSet > New | ( | const word & | setType, |
const polyMesh & | mesh, | ||
const word & | name, | ||
const label | size, | ||
writeOption | w = NO_WRITE
|
||
) | [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().
autoPtr< topoSet > New | ( | const word & | setType, |
const polyMesh & | mesh, | ||
const word & | name, | ||
const topoSet & | set, | ||
writeOption | w = NO_WRITE
|
||
) | [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().
void invert | ( | const label | maxLen ) | [virtual]
|
Invert contents. (insert all members 0..maxLen-1 which were not in.
set)
Reimplemented in cellZoneSet, faceZoneSet, and pointZoneSet.
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().
void subset | ( | const topoSet & | set ) | [virtual]
|
Subset contents. Only elements present in both sets remain.
Reimplemented in cellZoneSet, faceZoneSet, and pointZoneSet.
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().
void addSet | ( | const topoSet & | set ) | [virtual]
|
Add elements present in set.
Reimplemented in cellZoneSet, faceZoneSet, and pointZoneSet.
Definition at line 505 of file topoSet.C.
References HashTable< nil, label, Hash< label > >::begin(), and HashSet< label, Hash< label > >::insert().
void deleteSet | ( | const topoSet & | set ) | [virtual]
|
Delete elements present in set.
Reimplemented in cellZoneSet, faceZoneSet, and pointZoneSet.
Definition at line 519 of file topoSet.C.
References HashTable< nil, label, Hash< label > >::begin(), and HashTable< nil, label, Hash< label > >::erase().
void sync | ( | const polyMesh & | mesh ) | [virtual]
|
Sync set across coupled patches.
Reimplemented in cellSet, cellZoneSet, faceSet, faceZoneSet, pointSet, and pointZoneSet.
Definition at line 533 of file topoSet.C.
References notImplemented.
void writeDebug | ( | Ostream & | os, |
const label | maxLen | ||
) | const [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().
void writeDebug | ( | Ostream & | os, |
const primitiveMesh & | , | ||
const label | maxLen | ||
) | const [virtual]
|
Like above but also writes mesh related quantity.
(usually coordinate).
Reimplemented in cellSet, cellZoneSet, faceSet, faceZoneSet, pointSet, and pointZoneSet.
Definition at line 573 of file topoSet.C.
References notImplemented.
bool writeData | ( | Ostream & | os ) | const [virtual]
|
void updateMesh | ( | const mapPolyMesh & | morphMap ) | [virtual]
|
Update any stored data for new labels. Not implemented.
Reimplemented in cellSet, cellZoneSet, faceSet, faceZoneSet, pointSet, and pointZoneSet.
Definition at line 592 of file topoSet.C.
References notImplemented.
label maxSize | ( | const polyMesh & | mesh ) | const [virtual]
|
Return max allowable index (+1). Not implemented.
Return max index+1.
Reimplemented in cellSet, cellZoneSet, faceSet, faceZoneSet, pointSet, and pointZoneSet.
Definition at line 599 of file topoSet.C.
References notImplemented.
void operator= | ( | const topoSet & | rhs ) |