24 typedef typename uindirectPrimitivePatch::surfaceTopo TopoType;
26 const polyBoundaryMesh&
pbm =
mesh.boundaryMesh();
33 meshDefDict.readIfPresent(
"polyMeshPatches", select)
50 for (
const label facei :
pbm[patchi].
range())
71 if (returnReduceAnd(
pp.empty()))
75 else if (UPstream::parRun())
77 const labelList meshEdges
88 labelList nEdgeConnections(
mesh.nEdges(), Zero);
90 const labelListList& edgeFaces =
pp.edgeFaces();
94 nEdgeConnections[meshEdges[edgei]] = edgeFaces[edgei].size();
98 syncTools::syncEdgeList
106 label labelTyp = TopoType::MANIFOLD;
109 const label meshEdgei = meshEdges[edgei];
110 const label numNbrs = nEdgeConnections[meshEdgei];
114 labelTyp =
Foam::max(labelTyp, TopoType::OPEN);
116 else if (numNbrs == 0 || numNbrs > 2)
120 labelTyp =
Foam::max(labelTyp, TopoType::ILLEGAL);
123 reduce(labelTyp, maxOp<label>());
136 edgeList dumpEdges(
pp.edges(),
badEdges.sortedToc());
144 mesh.time().globalPath()
145 / (
"faMesh-construct.illegalEdges")
157 <<
" bad edges: " <<
writer.output().name() << nl;
vtk::lineWriter writer(edgeCentres, edgeList::null(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edgesCentres")))
labelHashSet * pointSetPtr
labelList faceLabels(nFaceLabels)
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const polyBoundaryMesh & pbm
labelHashSet badEdges(pp.nEdges()/20)
labelHashSet * badEdgesPtr
return returnReduce(nRefine-oldNRefine, sumOp< label >())
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
List< label > labelList
A List of labels.
PrimitivePatch< UIndirectList< face >, const pointField & > uindirectPrimitivePatch
A PrimitivePatch with UIndirectList for the faces, const reference for the point field.
#define forAll(list, i)
Loop across all elements in list.