39 void Foam::edgeFaceCirculator::setEnd()
46 void Foam::edgeFaceCirculator::setFace
54 if (!isBoundaryEdge_ && !
mesh().isInternalFace(facei))
57 <<
"Edge is not defined as boundary edge but still walked to"
58 <<
" boundary face:" << facei <<
" on cell:" << celli
64 void Foam::edgeFaceCirculator::otherFace(
const label celli)
68 label v1 =
f.nextLabel(index_);
70 const cell& cFaces =
mesh().
cells()[celli];
74 label faceB = cFaces[i];
76 if (faceB != faceLabel_)
78 label fp = getMinIndex(
mesh().faces()[faceB], v0, v1);
83 setFace(faceB, celli);
90 <<
"Could not find next face stepping"
91 <<
" through cell along edge." <<
endl
92 <<
"face:" << faceLabel_ <<
" index in face:" << index_
100 Foam::edgeFaceCirculator::edgeFaceCirculator()
106 isBoundaryEdge_(false),
111 Foam::edgeFaceCirculator::edgeFaceCirculator
114 const label faceLabel,
115 const bool ownerSide,
117 const bool isBoundaryEdge
121 faceLabel_(faceLabel),
122 ownerSide_(ownerSide),
124 isBoundaryEdge_(isBoundaryEdge),
125 startFaceLabel_(faceLabel_)
131 meshPtr_(circ.meshPtr_),
132 faceLabel_(circ.faceLabel_),
133 ownerSide_(circ.ownerSide_),
135 isBoundaryEdge_(circ.isBoundaryEdge_),
136 startFaceLabel_(circ.startFaceLabel_)
149 label fp =
f.find(v0);
153 label fpMin1 =
f.rcIndex(fp);
161 label fpPlus1 =
f.fcIndex(fp);
163 if (
f[fpPlus1] != v1)
185 && meshPtr_->isInternalFace(faceLabel_)
208 else if (
mesh().isInternalFace(faceLabel_))
221 label fp = getMinIndex(
f, v0, v1);
226 <<
"v0:" << v1 <<
" and v1:" << v1
227 <<
" not on position:" << index_ <<
" on face:" << faceLabel_
233 return ownerSide_ != (
f[index_] == v0);
246 if (
mesh().isInternalFace(faceLabel_))
282 <<
"Walked " << i <<
" cells around edge "
285 <<
" without reaching a boundary face."
286 <<
" Are you sure this is a boundary edge?"
293 startFaceLabel_ = faceLabel_;
298 label minFacei = faceLabel_;
299 bool minOwnerSide = ownerSide_;
300 label minIndex = index_;
306 if (
operator==(
end()))
311 if (!
mesh().isInternalFace(faceLabel_))
316 <<
"Reached boundary face " << faceLabel_
317 <<
" when walking around internal edge "
321 <<
"Are you sure this is an internal edge?"
325 if (faceLabel_ < minFacei)
327 minFacei = faceLabel_;
328 minOwnerSide = ownerSide_;
333 faceLabel_ = minFacei;
334 ownerSide_ = minOwnerSide;
336 startFaceLabel_ = faceLabel_;
343 faceLabel_ = circ.faceLabel_;
344 ownerSide_ = circ.ownerSide_;
345 index_ = circ.index_;
346 isBoundaryEdge_ = circ.isBoundaryEdge_;
347 startFaceLabel_ = circ.startFaceLabel_;
353 return faceLabel_ == circ.faceLabel_ && index_ == circ.index_;
373 return !(*
this == circ);
381 if (faceLabel_ == -1)
384 <<
"Already reached end(). Cannot walk any further."
396 if (!isBoundaryEdge_ && faceLabel_ == startFaceLabel_)
401 else if (
mesh().isInternalFace(faceLabel_))
410 if (!isBoundaryEdge_ && faceLabel_ == startFaceLabel_)