92 const faceZone& fz = faceZones[zoneID];
150 for (
label facei = 0; facei < maxLen; facei++)
163 for (
label facei = 0; facei < maxLen; facei++)
167 addressing_[
n] = facei;
186 faceToIndex.
insert(addressing_[i], i);
197 if (iter != faceToIndex.
end())
199 label index = iter();
201 if (fSet.
flipMap()[i] != flipMap_[index])
205 newAddressing.
append(facei);
206 newFlipMap.
append(flipMap_[index]);
213 <<
"subset : there are " << nConflict
214 <<
" faces with different orientation in faceZonesSets "
218 addressing_.
transfer(newAddressing);
234 faceToIndex.
insert(addressing_[i], i);
245 if (iter != faceToIndex.
end())
247 label index = iter();
249 if (fSet.
flipMap()[i] != flipMap_[index])
256 newAddressing.
append(facei);
264 <<
"addSet : there are " << nConflict
265 <<
" faces with different orientation in faceZonesSets "
269 addressing_.
transfer(newAddressing);
292 label facei = addressing_[i];
296 if (iter != faceToIndex.
end())
298 label index = iter();
300 if (fSet.
flipMap()[index] != flipMap_[i])
308 newAddressing.
append(facei);
316 <<
"deleteSet : there are " << nConflict
317 <<
" faces with different orientation in faceZonesSets "
321 addressing_.
transfer(newAddressing);
348 <<
" faces that are in the faceZone but not"
349 <<
" in the faceSet or vice versa."
350 <<
" The faceZoneSet should only be manipulated"
351 <<
" using " << setsToFaceZone::typeName
352 <<
" or " << setToFaceZone::typeName <<
endl;
364 const label UNFLIPPED = 1;
365 const label FLIPPED = -1;
376 myZoneFace[bFacei] = FLIPPED;
380 myZoneFace[bFacei] = UNFLIPPED;
400 label facei = addressing_[i];
403 newAddressing.
append(facei);
404 newFlipMap.
append(flipMap_[i]);
415 if (neiStat == UNFLIPPED)
418 newAddressing.
append(facei);
421 else if (neiStat == FLIPPED)
423 newAddressing.
append(facei);
429 if (myStat == neiStat)
432 newAddressing.
append(facei);
433 if (isMasterFace[facei])
435 newFlipMap.
append(myStat == FLIPPED);
439 newFlipMap.
append(neiStat == UNFLIPPED);
444 newAddressing.
append(facei);
445 newFlipMap.
append(myStat == FLIPPED);
450 addressing_.
transfer(newAddressing);
471 word oldTypeName = typeName;
472 const_cast<word&
>(
type()) = faceSet::typeName;
474 const_cast<word&
>(
type()) = oldTypeName;
482 zoneID = faceZones.
size();
499 faceZones[zoneID].resetAddressing(addressing_, flipMap_);
515 label facei = addressing_[i];
519 newAddressing[
n] = newFacei;
520 newFlipMap[
n] = flipMap_[i];
527 addressing_.
transfer(newAddressing);
#define forAll(list, i)
Loop across all elements in list.
Macros for easy insertion into run-time selection tables.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
bool insert(const label &key)
Insert a new entry.
bool set(const label &key)
Same as insert (cannot overwrite nil content)
label size() const
Return number of elements in table.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
void clearStorage()
Clear the table entries and the table itself.
bool found(const Key &) const
Return true if hashedEntry is found in table.
void resize(const label newSize)
Resize the hash table for efficiency.
readOption
Enumeration defining the read options.
const word & name() const
Return name.
writeOption
Enumeration defining the write options.
streamFormat
Enumeration for the format of data in the stream.
compressionType
Enumeration for the format of data in the stream.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
void size(const label)
Override size to be inconsistent with allocated storage.
void setSize(const label)
Reset size of List.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
autoPtr< T > set(const label, const word &key, T *)
Set element to pointer provided and return old element.
label findIndex(const word &key) const
Return the index of the given the key or -1 if not found.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
A List with indirect addressing.
label size() const
Return the number of elements in the UPtrList.
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const
Write maxLen items with label and coordinates.
Like faceSet but -reads data from faceZone -updates faceZone when writing.
const boolList & flipMap() const
virtual label maxSize(const polyMesh &mesh) const
Return max index+1.
virtual void invert(const label maxLen)
Invert contents. (insert all members 0..maxLen-1 which were not in.
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool write=true) const
Write faceZone.
virtual void deleteSet(const topoSet &set)
Delete elements present in set.
virtual void sync(const polyMesh &mesh)
Sync faceZoneSet across coupled patches.
virtual void addSet(const topoSet &set)
Add elements present in set.
const labelList & addressing() const
virtual void writeDebug(Ostream &os, const primitiveMesh &, const label maxLen) const
Write maxLen items with label and coordinates.
virtual void subset(const topoSet &set)
Subset contents. Only elements present in both sets remain.
faceZoneSet(const polyMesh &mesh, const word &name, readOption r=MUST_READ, writeOption w=NO_WRITE)
Construct from objectRegistry and name.
virtual ~faceZoneSet()
Destructor.
virtual void topoChange(const polyTopoChangeMap &map)
Update any stored data for new labels.
void updateSet()
Sort addressing and make faceSet part consistent with addressing.
A subset of mesh faces organised as a primitive patch.
const boolList & flipMap() const
Return face flip map.
Mesh consisting of general polyhedral cells.
const faceZoneList & faceZones() const
Return face zones.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const labelList & reverseFaceMap() const
Reverse face map.
Cell-face mesh analysis engine.
label nInternalFaces() const
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool write) const
Write using given format, version and compression.
virtual bool write(const bool write=true) const
Write using setting from DB.
General set of labels of mesh quantity (points, cells, faces).
void check(const label maxLabel)
Check validity of contents.
A class for handling words, derived from string.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionedScalar c
Speed of light in a vacuum.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
addToRunTimeSelectionTable(polyPatch, mergedCyclicPolyPatch, word)
To & refCast(From &r)
Reference type cast template function.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
int order(const scalar s)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
defineTypeNameAndDebug(combustionModel, 0)
void sortedOrder(const UList< T > &, labelList &order)
Generate the (stable) sort order for the list.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable