45 const primitiveMesh& mesh,
69 const primitiveMesh& mesh,
75 const edge& e = mesh.edges()[edgeI];
78 label freePointi = e.otherVertex(pointi);
80 const labelList& fEdges = mesh.faceEdges()[facei];
84 const label otherEdgeI = fEdges[fEdgeI];
85 const edge& otherE = mesh.edges()[otherEdgeI];
90 otherE.start() == pointi
91 && otherE.end() != freePointi
94 otherE.end() == pointi
95 && otherE.start() != freePointi
105 <<
"Cannot find other edge on face " << facei <<
" that uses point " 106 << pointi <<
" but not point " << freePointi <<
endl 107 <<
"Edges on face:" << fEdges
108 <<
" verts:" << UIndirectList<edge>(mesh.edges(), fEdges)()
109 <<
" Vertices on face:" 110 << mesh.faces()[facei]
119 void Foam::regionSide::visitConnectedFaces
121 const primitiveMesh& mesh,
129 if (!visitedFace.found(facei))
133 Info<<
"visitConnectedFaces : celli:" << celli <<
" facei:" 134 << facei <<
" isOwner:" << (celli == mesh.faceOwner()[facei])
139 visitedFace.insert(facei);
142 if (celli == mesh.faceOwner()[facei])
144 sideOwner_.insert(facei);
150 const labelList& fEdges = mesh.faceEdges()[facei];
154 label edgeI = fEdges[fEdgeI];
156 if (!fenceEdges.found(edgeI))
164 if (mesh.isInternalFace(otherFacei))
166 label otherCelli = celli;
170 while (!region.found(otherFacei))
172 visitedFace.insert(otherFacei);
176 Info<<
"visitConnectedFaces : celli:" << celli
177 <<
" found insideEdgeFace:" << otherFacei
221 void Foam::regionSide::walkPointConnectedFaces
223 const primitiveMesh& mesh,
225 const label regionPointi,
226 const label startFacei,
227 const label startEdgeI,
232 insidePointFaces_.insert(startFacei);
236 Info<<
"walkPointConnectedFaces : regionPointi:" << regionPointi
237 <<
" facei:" << startFacei
238 <<
" edgeI:" << startEdgeI <<
" verts:" 239 << mesh.edges()[startEdgeI]
244 label edgeI =
otherEdge(mesh, startFacei, startEdgeI, regionPointi);
246 if (!regionEdges.found(edgeI))
248 if (!visitedEdges.found(edgeI))
250 visitedEdges.insert(edgeI);
254 Info<<
"Crossed face from " 255 <<
" edgeI:" << startEdgeI <<
" verts:" 256 << mesh.edges()[startEdgeI]
257 <<
" to edge:" << edgeI <<
" verts:" 258 << mesh.edges()[edgeI]
264 const labelList& eFaces = mesh.edgeFaces()[edgeI];
268 label facei = eFaces[eFacei];
270 walkPointConnectedFaces
287 void Foam::regionSide::walkAllPointConnectedFaces
289 const primitiveMesh& mesh,
301 const label facei = iter.key();
302 const labelList& fEdges = mesh.faceEdges()[facei];
306 regionEdges.insert(fEdges[fEdgeI]);
321 visitedPoint.insert(iter.key());
329 Info<<
"Excluding visit of points:" << visitedPoint <<
endl;
334 const label facei = iter.key();
339 if (sideOwner_.found(facei))
341 celli = mesh.faceOwner()[facei];
345 celli = mesh.faceNeighbour()[facei];
349 const labelList& fEdges = mesh.faceEdges()[facei];
353 label edgeI = fEdges[fEdgeI];
359 const edge& e = mesh.edges()[edgeI];
361 if (!visitedPoint.found(e.start()))
363 Info<<
"Determining visibility from point " << e.start()
366 visitedPoint.insert(e.start());
370 walkPointConnectedFaces
380 if (!visitedPoint.found(e.end()))
382 Info<<
"Determining visibility from point " << e.end()
385 visitedPoint.insert(e.end());
389 walkPointConnectedFaces
409 const primitiveMesh& mesh,
412 const label startCelli,
413 const label startFacei
416 sideOwner_(region.size()),
417 insidePointFaces_(region.size())
444 const edge& e = mesh.edges()[iter.key()];
446 fencePoints.insert(e.start());
447 fencePoints.insert(e.end());
450 walkAllPointConnectedFaces(mesh, region, fencePoints);
#define forAll(list, i)
Loop across all elements in list.
FvWallInfoData< WallInfo, label > label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Holds information (coordinate and normal) regarding nearest wall point.
static label otherFace(const primitiveMesh &mesh, const label celli, const label excludeFacei, const label edgeI)
Step across edge onto other face on cell.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
regionSide(const primitiveMesh &mesh, const labelHashSet ®ion, const labelHashSet &fenceEdges, const label startCell, const label startFace)
Construct from components.
defineTypeNameAndDebug(combustionModel, 0)