Go to the documentation of this file.
52 cellSet::clearStorage();
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;
162 for (
const label celli : zoneSet.addressing())
166 newAddressing.append(celli);
170 addressing_.transfer(newAddressing);
181 for (
const label celli : zoneSet.
addressing())
185 newAddressing.
append(celli);
189 addressing_.transfer(newAddressing);
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)
virtual void sync(const polyMesh &mesh)
Sync cellSet across coupled patches.
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
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.
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.
label nCells() const noexcept
Number of mesh cells.
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
static void check(const int retVal, const char *what)
patchWriters resize(patchIds.size())
const cellZoneMesh & cellZones() const noexcept
Return cell zone mesh.
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.
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.
OBJstream os(runTime.globalPath()/outputName)
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 by 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.
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.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
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.