Go to the documentation of this file.
50 Info <<
"Checking topology of boundary faces" <<
endl;
54 usedPatches.
insert(patchLabels[i]);
58 std::set<std::pair<label, label> > terminatedPairs;
63 forAll(otherPatches, patchJ)
65 if( patchI == otherPatches[patchJ] )
68 terminatedPairs.insert
102 const face& bf = bFaces[bfI];
103 const label fPatch = facePatches[bfI];
105 if( !usedPatches.
found(fPatch) )
112 const label beI = faceEdges(bfI, eI);
116 label neiFace = edgeFaces(beI, 0);
118 neiFace = edgeFaces(beI, 1);
120 neiPatches[eI] = facePatches[neiFace];
125 neiPatches[eI] = otherProcPatch[beI];
131 bool storedFace(
false);
134 if( neiPatches[eI] == fPatch )
137 std::pair<label, label> pp
143 if( terminatedPairs.find(pp) == terminatedPairs.end() )
147 bool usePrev(
false), useNext(
false);
148 if( neiPatches[neiPatches.rcIndex(eI)] == fPatch )
154 std::pair<label, label> ppPrev
156 Foam::min(fPatch, neiPatches[neiPatches.rcIndex(eI)]),
157 Foam::max(fPatch, neiPatches[neiPatches.rcIndex(eI)])
160 if( terminatedPairs.find(ppPrev) == terminatedPairs.end() )
164 if( neiPatches[neiPatches.fcIndex(eI)] == fPatch )
170 std::pair<label, label> ppNext
172 Foam::min(fPatch, neiPatches[neiPatches.fcIndex(eI)]),
173 Foam::max(fPatch, neiPatches[neiPatches.fcIndex(eI)])
176 if( terminatedPairs.find(ppNext) == terminatedPairs.end() )
181 if( useNext && usePrev )
184 removeEdges[0] = bf.
faceEdge(neiPatches.rcIndex(eI));
186 removeEdges[2] = bf.
faceEdge(neiPatches.fcIndex(eI));
191 removeEdges[0] = bf.
faceEdge(neiPatches.fcIndex(eI));
197 removeEdges[0] = bf.
faceEdge(neiPatches.rcIndex(eI));
202 if( cutFace.
size() > 2 )
205 newBoundaryOwners.
append(faceOwner[bfI]);
206 newBoundaryPatches.
append(fPatch);
209 if( rFace.
size() > 2 )
212 newBoundaryOwners.
append(faceOwner[bfI]);
213 newBoundaryPatches.
append(fPatch);
216 if( (cutFace.
size() > 2) && (rFace.
size() > 2) )
218 decomposeCell[faceOwner[bfI]] =
true;
231 newBoundaryOwners.
append(faceOwner[bfI]);
232 newBoundaryPatches.
append(fPatch);
252 forAll(boundaries, patchI)
253 boundaries[patchI].patchType() =
patchTypes_[patchI];
263 if( nDecomposed != 0 )
273 Info <<
"Finished checking topology" <<
endl;
void append(const T &e)
Append an element at the end of the list.
wordList patchNames_
patch names
const meshSurfaceEngine & surfaceEngine() const
Return const reference to meshSurfaceEngine.
void decomposeMesh(const boolList &)
perform decomposition of selected cell into pyramids
#define forAll(list, i)
Loop across all elements in list.
polyMeshGen & mesh_
Reference to the mesh.
wordList patchTypes_
patch types
A List obtained as a section of another List.
edge faceEdge(const label n) const
Return n-th face edge.
const labelList & boundaryFacePatches() const
patch label for each boundary face
const VRWGraph & faceEdges() const
void replaceBoundary(const wordList &patchNames, const VRWGraph &boundaryFaces, const labelLongList &faceOwners, const labelLongList &facePatches)
replace the boundary with new boundary faces
Ostream & endl(Ostream &os)
Add newline and flush stream.
face createFaceFromRemovedPart(const face &fOrig, const face &fCut)
create a face from the removed part
PtrList< boundaryPatch > & boundariesAccess()
access to boundary data
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
const faceList::subList & boundaryFaces() const
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 cellListPMG & cells() const
access to cells
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
face removeEdgesFromFace(const face &fOrig, const DynList< edge > &removeEdges)
remove edges from face
label sizeOfRow(const label rowI) const
Returns the number of elements in the given row.
bool found(const Key &) const
Return true if hashedEntry is found in table.
const VRWGraph & edgeFaces() const
void checkTopologyOfBoundaryFaces(const labelList &patchLabels)
errorManipArg< error, int > exit(error &err, const int errNo=1)
void clearOut()
delete meshSurfaceEngine
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
List< DynList< label > > treatPatchesWithPatch_
extrude patches with patch
void appendList(const ListType &l)
Append a list as a row at the end of the graph.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(const label)
Reset size of List.
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 Map< label > & otherEdgeFacePatch() const
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
label size() const
return the number of used elements
const labelList & faceOwners() const