89 const faceZone& fz = faceZones[zoneID];
127 addressing_(refCast<const faceZoneSet>(
set).
addressing()),
128 flipMap_(refCast<const faceZoneSet>(
set).
flipMap())
147 for (
label faceI = 0; faceI < maxLen; faceI++)
160 for (
label faceI = 0; faceI < maxLen; faceI++)
164 addressing_[
n] = faceI;
183 faceToIndex.insert(addressing_[i], i);
186 const faceZoneSet& fSet = refCast<const faceZoneSet>(
set);
194 if (iter != faceToIndex.
end())
196 label index = iter();
198 if (fSet.
flipMap()[i] != flipMap_[index])
202 newAddressing.append(faceI);
203 newFlipMap.append(flipMap_[index]);
209 WarningIn(
" faceZoneSet::subset(const topoSet&)")
210 <<
"subset : there are " << nConflict
211 <<
" faces with different orientation in faceZonesSets " 212 <<
name() <<
" and " <<
set.name() <<
endl;
215 addressing_.
transfer(newAddressing);
231 faceToIndex.insert(addressing_[i], i);
234 const faceZoneSet& fSet = refCast<const faceZoneSet>(
set);
242 if (iter != faceToIndex.
end())
244 label index = iter();
246 if (fSet.
flipMap()[i] != flipMap_[index])
253 newAddressing.
append(faceI);
260 WarningIn(
"faceZoneSet::addSet(const topoSet&)")
261 <<
"addSet : there are " << nConflict
262 <<
" faces with different orientation in faceZonesSets " 263 <<
name() <<
" and " <<
set.name() <<
endl;
266 addressing_.
transfer(newAddressing);
279 const faceZoneSet& fSet = refCast<const faceZoneSet>(
set);
282 forAll(fSet.addressing(), i)
284 faceToIndex.insert(fSet.addressing()[i], i);
289 label faceI = addressing_[i];
293 if (iter != faceToIndex.
end())
295 label index = iter();
297 if (fSet.flipMap()[index] != flipMap_[i])
305 newAddressing.append(faceI);
306 newFlipMap.append(fSet.flipMap()[i]);
312 WarningIn(
"faceZoneSet::deleteSet(const topoSet&)")
313 <<
"deleteSet : there are " << nConflict
314 <<
" faces with different orientation in faceZonesSets " 315 <<
name() <<
" and " <<
set.name() <<
endl;
318 addressing_.
transfer(newAddressing);
343 word oldTypeName = typeName;
344 const_cast<word&
>(
type()) = faceSet::typeName;
346 const_cast<word&
>(
type()) = oldTypeName;
354 zoneID = faceZones.
size();
372 faceZones[zoneID].resetAddressing(addressing_, flipMap_);
376 return ok && faceZones.
write();
389 label faceI = addressing_[i];
393 newAddressing[
n] = newFaceI;
394 newFlipMap[
n] = flipMap_[i];
399 newFlipMap.setSize(n);
401 addressing_.
transfer(newAddressing);
const boolList & flipMap() const
Return face flip map.
const faceZoneMesh & faceZones() const
Return face zone mesh.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
virtual void invert(const label maxLen)
Invert contents. (insert all members 0..maxLen-1 which were not in.
label size() const
Return the number of elements in the PtrList.
const labelList & reverseFaceMap() const
Reverse face map.
bool set(const label) const
Is element set.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write using given format, version and compression.
General set of labels of mesh quantity (points, cells, faces).
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
A subset of mesh faces organised as a primitive patch.
virtual void sync(const polyMesh &mesh)
Sync faceZoneSet across coupled patches.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void resize(const label newSize)
Resize the hash table for efficiency.
virtual void addSet(const topoSet &set)
Add elements present in set.
void size(const label)
Override size to be inconsistent with allocated storage.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels.
const labelList & addressing() const
void clearStorage()
Clear the table entries and the table itself.
virtual bool write() const
Write using setting from DB.
void clearAddressing()
Clear addressing.
Cell-face mesh analysis engine.
void setSize(const label)
Reset size of List.
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define WarningIn(functionName)
Report a warning using Foam::Warning.
A List with indirect addressing.
streamFormat
Enumeration for the format of data in the stream.
virtual void deleteSet(const topoSet &set)
Delete elements present in set.
label size() const
Return the number of elements in the list.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write faceZone.
readOption
Enumeration defining the read options.
Macros for easy insertion into run-time selection tables.
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const
Write maxLen items with label and coordinates.
label size() const
Return number of elements in table.
const word & name() const
Return name.
void check(const label maxLabel)
Check validity of contents.
Like faceSet but updates faceZone when writing.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
compressionType
Enumeration for the format of data in the stream.
virtual ~faceZoneSet()
Destructor.
virtual label maxSize(const polyMesh &mesh) const
Return max index+1.
Mesh consisting of general polyhedral cells.
writeOption
Enumeration defining the write options.
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
label findZoneID(const word &zoneName) const
Find zone index given a name.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
const boolList & flipMap() const
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
faceZoneSet(const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
Construct from objectRegistry and name.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
bool found(const label &) const
Return true if hashedEntry is found in table.
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const
Write maxLen items with label and coordinates.
defineTypeNameAndDebug(combustionModel, 0)
faceSet(const IOobject &obj)
Construct from IOobject.
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
bool insert(const label &key)
Insert a new entry.