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]);
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);
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]);
313 <<
"deleteSet : there are " << nConflict
314 <<
" faces with different orientation in faceZonesSets " 315 <<
name() <<
" and " <<
set.name() <<
endl;
318 addressing_.
transfer(newAddressing);
342 word oldTypeName = typeName;
343 const_cast<word&
>(
type()) = faceSet::typeName;
345 const_cast<word&
>(
type()) = oldTypeName;
353 zoneID = faceZones.
size();
371 faceZones[zoneID].resetAddressing(addressing_, flipMap_);
375 return ok && faceZones.
write();
388 label facei = addressing_[i];
392 newAddressing[
n] = newFacei;
393 newFlipMap[
n] = flipMap_[i];
398 newFlipMap.setSize(n);
400 addressing_.
transfer(newAddressing);
const labelList & addressing() const
faceZoneSet(const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
Construct from objectRegistry and name.
#define forAll(list, i)
Loop across all elements in list.
writeOption
Enumeration defining the write options.
void clearAddressing()
Clear addressing.
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 sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
const boolList & flipMap() const
Return face flip map.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const
Write maxLen items with label and coordinates.
Cell-face mesh analysis engine.
virtual void invert(const label maxLen)
Invert contents. (insert all members 0..maxLen-1 which were not in.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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 boolList & flipMap() const
readOption
Enumeration defining the read options.
bool insert(const label &key)
Insert a new entry.
virtual void deleteSet(const topoSet &set)
Delete elements present in set.
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels.
void check(const label maxLabel)
Check validity of contents.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Macros for easy insertion into run-time selection tables.
virtual ~faceZoneSet()
Destructor.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
label findZoneID(const word &zoneName) const
Find zone index given a name.
const labelList & reverseFaceMap() const
Reverse face map.
A class for handling words, derived from string.
label size() const
Return the number of elements in the list.
bool set(const label) const
Is element set.
streamFormat
Enumeration for the format of data in the stream.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write faceZone.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const
Write using given format, version and compression.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
bool found(const label &) const
Return true if hashedEntry is found in table.
compressionType
Enumeration for the format of data in the stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
faceSet(const IOobject &obj)
Construct from IOobject.
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
defineTypeNameAndDebug(combustionModel, 0)
virtual void sync(const polyMesh &mesh)
Sync faceZoneSet across coupled patches.
virtual label maxSize(const polyMesh &mesh) const
Return max index+1.
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
Like faceSet but updates faceZone when writing.
General set of labels of mesh quantity (points, cells, faces).
void setSize(const label)
Reset size of List.
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void addSet(const topoSet &set)
Add elements present in set.
A List with indirect addressing.
virtual bool write() const
Write using setting from DB.
void resize(const label newSize)
Resize the hash table for efficiency.
const faceZoneMesh & faceZones() const
Return face zone mesh.
Mesh consisting of general polyhedral cells.
A subset of mesh faces organised as a primitive patch.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
const word & name() const
Return name.
label size() const
Return the number of elements in the UPtrList.
void clearStorage()
Clear the table entries and the table itself.