Go to the documentation of this file.
118 addressing_(refCast<const cellZoneSet>(set).addressing())
131 for (label celli = 0; celli < maxLen; ++celli)
140 addressing_.setSize(
n);
143 for (label celli = 0; celli < maxLen; ++celli)
147 addressing_[
n] = celli;
160 const cellZoneSet& zoneSet = refCast<const cellZoneSet>(set);
162 for (
const label celli : zoneSet.addressing())
166 newAddressing.append(celli);
170 addressing_.transfer(newAddressing);
179 const cellZoneSet& zoneSet = refCast<const cellZoneSet>(set);
181 for (
const label celli : zoneSet.
addressing())
185 newAddressing.
append(celli);
189 addressing_.transfer(newAddressing);
198 const cellZoneSet& zoneSet = refCast<const cellZoneSet>(set);
200 for (
const label celli : addressing_)
202 if (!zoneSet.found(celli))
205 newAddressing.append(celli);
209 addressing_.transfer(newAddressing);
219 addressing_ = sortedToc();
237 word oldTypeName = typeName;
238 const_cast<word&
>(
type()) = cellSet::typeName;
240 const_cast<word&
>(
type()) = oldTypeName;
248 zoneID = cellZones.size();
250 cellZones.setSize(
zoneID+1);
265 cellZones[
zoneID] = addressing_;
269 return ok && cellZones.write(valid);
276 labelList newAddressing(addressing_.size());
279 for (
const label celli : addressing_)
284 newAddressing[
n] = newCelli;
288 newAddressing.resize(
n);
290 addressing_.transfer(newAddressing);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
label size() const noexcept
The number of elements in table.
virtual void sync(const polyMesh &mesh)
Sync cellSet across coupled patches.
virtual label maxSize(const polyMesh &mesh) const
Return max index+1.
virtual void subtractSet(const topoSet &set)
Subtract elements present in set.
A class for handling words, derived from Foam::string.
void updateSet()
Sort addressing and make cellSet part consistent with addressing.
const cellZoneMesh & cellZones() const
Return cell zone mesh.
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const
Write maxLen items with label and coordinates.
Mesh consisting of general polyhedral cells.
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const
Write maxLen items with label and coordinates.
virtual void addSet(const topoSet &set)
Add elements present in set.
writeOption
Enumeration defining the write options.
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
label nCells() const
Number of mesh cells.
word name(const complex &c)
Return string representation of complex.
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
virtual bool set(const label id)
Set an index.
The IOstreamOption is a simple container for options an IOstream can normally have.
void resize(const label sz)
Resize the hash table for efficiency.
virtual void invert(const label maxLen)
Invert contents.
const labelList & addressing() const
Like cellSet but -reads data from cellZone -updates cellZone when writing.
General set of labels of mesh quantity (points, cells, faces).
virtual void sync(const polyMesh &mesh)
Sync cellSet across coupled patches; update cellZone from cellSet.
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write cellZone using stream options.
Macros for easy insertion into run-time selection tables.
const labelIOList & zoneID
virtual bool writeObject(IOstreamOption streamOpt, const bool valid) const
Write using stream options.
A collection of cell labels.
label findZoneID(const word &zoneName) const
Find zone index given a name, return -1 if not found.
cellZoneSet(const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
Construct from objectRegistry and name.
const labelList & reverseCellMap() const
Reverse cell map.
void clearStorage()
Clear the table entries and the table itself.
virtual void updateMesh(const mapPolyMesh &morphMap)
Update any stored data for new labels.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void inplaceReorder(const labelUList &oldToNew, ListType &input, const bool prune=false)
Inplace reorder the elements of a list.
labelList sortedOrder(const UList< T > &input)
Return the (stable) sort order for the list.
readOption
Enumeration defining the read options.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void clearAddressing()
Clear addressing.
defineTypeNameAndDebug(combustionModel, 0)
Cell-face mesh analysis engine.