Go to the documentation of this file.
28 #include "primitiveMesh.H"
45 const primitiveMesh&
mesh,
69 const primitiveMesh&
mesh,
78 label freePointI =
e.otherVertex(pointI);
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:"
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);
144 sideOwner_.insert(faceI);
154 label edgeI = fEdges[fEdgeI];
156 if (!fenceEdges.found(edgeI))
166 label otherCellI = cellI;
170 while (!region.found(otherFaceI))
172 visitedFace.insert(otherFaceI);
176 Info<<
"visitConnectedFaces : cellI:" << cellI
177 <<
" found insideEdgeFace:" << otherFaceI
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:"
246 if (!regionEdges.found(edgeI))
248 if (!visitedEdges.found(edgeI))
250 visitedEdges.insert(edgeI);
254 Info<<
"Crossed face from "
255 <<
" edgeI:" << startEdgeI <<
" verts:"
257 <<
" to edge:" << edgeI <<
" verts:"
268 label faceI = eFaces[eFaceI];
270 walkPointConnectedFaces
289 const primitiveMesh&
mesh,
301 const label faceI = iter.key();
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))
353 label edgeI = fEdges[fEdgeI];
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);
regionSide(const primitiveMesh &mesh, const labelHashSet ®ion, const labelHashSet &fenceEdges, const label startCell, const label startFace)
Construct from components.
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
const labelListList & edgeFaces() const
static label otherFace(const primitiveMesh &mesh, const label cellI, const label excludeFaceI, const label edgeI)
Step across edge onto other face on cell.
void visitConnectedFaces(const primitiveMesh &mesh, const labelHashSet ®ion, const labelHashSet &fenceEdges, const label cellI, const label faceI, labelHashSet &visitedFace)
From faceI, side cellI, cross to other faces/cells by.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const edgeList & edges() const
Return mesh edges. Uses calcEdges.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
virtual const labelList & faceOwner() const
Return face owner.
const labelListList & faceEdges() const
void walkPointConnectedFaces(const primitiveMesh &mesh, const labelHashSet ®ionEdges, const label regionPointI, const label startFaceI, const label startEdgeI, labelHashSet &visitedEdges)
From edge on face connected to point on region (regionPointI) cross.
void walkAllPointConnectedFaces(const primitiveMesh &mesh, const labelHashSet ®ionFaces, const labelHashSet &fenceEdges)
Visits all internal points on region and marks edges reachable.
errorManip< error > abort(error &err)
const double e
Elementary charge.
virtual const faceList & faces() const
Return raw faces.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
static label otherEdge(const primitiveMesh &mesh, const label faceI, const label edgeI, const label pointI)
Step across point to other edge on face.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
defineTypeNameAndDebug(combustionModel, 0)
virtual const labelList & faceNeighbour() const
Return face neighbour.