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);
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();
239 word oldTypeName = typeName;
240 const_cast<word&
>(
type()) = cellSet::typeName;
242 const_cast<word&
>(
type()) = oldTypeName;
250 zoneID = cellZones.size();
252 cellZones.setSize(
zoneID+1);
267 cellZones[
zoneID] = addressing_;
271 return ok && cellZones.write(valid);
278 labelList newAddressing(addressing_.size());
281 for (
const label celli : addressing_)
286 newAddressing[
n] = newCelli;
290 newAddressing.resize(
n);
292 addressing_.transfer(newAddressing);
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
label size() const noexcept
The number of elements in table.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool valid) const
Write using given format, version and compression.
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.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
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.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Representation of a major/minor version number.
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.
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.
streamFormat
Data format (ascii | binary)
Macros for easy insertion into run-time selection tables.
const labelIOList & zoneID
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.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool valid) const
Write cellZone.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const dimensionedScalar c
Speed of light in a vacuum.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
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.