Go to the documentation of this file.
28 #include "primitiveMesh.H"
46 Pout<<
"Checking layer collapse for object " <<
name() <<
endl;
55 label nBoundaryHits = 0;
61 !
mesh.isInternalFace(mf[faceI])
62 && !
mesh.isInternalFace(ftc[faceI])
72 Pout<<
"Finished checking layer collapse for object "
73 <<
name() <<
". Number of boundary-on-boundary hits: "
74 << nBoundaryHits <<
endl;
103 Pout<<
"Removing the cell layer for object " <<
name() <<
endl;
120 label slaveSideCell = own[ftc[faceI]];
126 slaveSideCell = nei[ftc[faceI]];
148 != faceZoneID_.index()
151 facesToRemoveMap.
insert(curCell[faceI]);
181 removedPointMap.insert(ptc[pointI], meshPoints[pointI]);
193 const labelList& curFaces = pf[ptc[pointI]];
197 if (!facesToRemoveMap.
found(curFaces[faceI]))
199 facesToModify.
insert(curFaces[faceI]);
208 Pout<<
"faces to modify: " << ftm <<
endl;
216 label curFaceID = ftm[faceI];
218 face newFace(faces[curFaceID]);
223 removedPointMap.find(newFace[pointI]);
225 if (rpmIter != removedPointMap.end())
228 newFace[pointI] = rpmIter();
234 Pout<<
"face label: " << curFaceID
235 <<
" old face: " << faces[curFaceID]
236 <<
" new face: " << newFace <<
endl;
241 bool modifiedFaceZoneFlip =
false;
243 if (modifiedFaceZone >= 0)
249 label newNeighbour = -1;
253 newNeighbour = nei[curFaceID];
283 label masterSideCell = own[mf[faceI]];
285 if (masterSideCell == mc[faceI])
291 masterSideCell = nei[mf[faceI]];
299 label slaveSideCell = own[ftc[faceI]];
301 if (slaveSideCell == mc[faceI])
307 slaveSideCell = nei[ftc[faceI]];
317 label newNeighbour = -1;
318 bool flipFace =
false;
319 label newPatchID = -1;
320 label newZoneID = -1;
329 newOwner = slaveSideCell;
338 newOwner = slaveSideCell;
342 if (own[mf[faceI]] == slaveSideCell)
360 newOwner =
min(masterSideCell, slaveSideCell);
361 newNeighbour =
max(masterSideCell, slaveSideCell);
363 if (newOwner == own[mf[faceI]] || newNeighbour == nei[mf[faceI]])
379 face newFace = faces[mf[faceI]];
380 bool zoneFlip = mfFlip[faceI];
385 zoneFlip = !zoneFlip;
390 Pout<<
"Modifying face " << mf[faceI]
391 <<
" newFace: " << newFace <<
nl
392 <<
" newOwner: " << newOwner
393 <<
" newNeighbour: " << newNeighbour
394 <<
" flipFace: " << flipFace
395 <<
" newPatchID: " << newPatchID
396 <<
" newZoneID: " << newZoneID <<
nl
397 <<
" oldOwn: " << own[mf[faceI]]
398 <<
" oldNei: " << nei[mf[faceI]] <<
endl;
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Class containing data for point removal.
List< Key > toc() const
Return the table of contents.
#define forAll(list, i)
Loop across all elements in list.
const polyTopoChanger & topoChanger() const
Return reference to morph engine.
static const unsigned facesPerCell_
Estimated number of faces per cell.
const labelListList & pointFaces() const
const cellList & cells() const
Direct mesh changes based on v1.3 polyTopoChange syntax.
Class describing modification of a face.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Mesh consisting of general polyhedral cells.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
const faceZoneMesh & faceZones() const
Return face zone mesh.
void removeCellLayer(polyTopoChange &) const
Remove a layer of cells.
Class containing data for cell removal.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const labelList & facesPairing() const
Return faces pairing in a layer (not automatic!)
A subset of mesh faces organised as a primitive patch.
virtual const labelList & faceOwner() const
Return face owner.
faceZoneID faceZoneID_
Master face zone ID.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
void flip()
Flip the face in-place.
label nInternalFaces() const
bool found(const Key &) const
Return true if hashedEntry is found in table.
label whichFace(const label globalCellID) const
Helper function to re-direct to zone::localID(...)
bool validCollapse() const
Check for valid layer.
const word & name() const
Return name of this modifier.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual const faceList & faces() const
Return raw faces.
label setAction(const topoAction &action)
For compatibility with polyTopoChange: set topological action.
prefixOSstream Pout(cout, "Pout")
const polyMesh & mesh() const
Return the mesh reference.
static const unsigned facesPerPoint_
Estimated number of faces per point.
Class containing data for face removal.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
bool insert(const Key &key)
Insert a new entry.
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.
const boolList & flipMap() const
Return face flip map.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
A cell is defined as a list of faces with extra functionality.
word name(const complex &)
Return a string representation of a complex.
virtual const labelList & faceNeighbour() const
Return face neighbour.
label index() const
Return index of first matching zone.