47 const labelList& fEdges = pp_.faceEdges()[facei];
56 const edge& e = edges[fEdges[fp]];
58 if ((e[0] == v0 && e[1] == v1) || (e[0] == v1 && e[1] == v0))
61 nbrEdgeI = fEdges[fp];
68 label edgeI = fEdges[i];
70 const edge& e = edges[edgeI];
74 (e[0] == v0 && e[1] == v1)
75 || (e[0] == v1 && e[1] == v0)
90 <<
"Did not find edge on face " << facei <<
" that uses vertices" 97 const labelList& eFaces = pp_.edgeFaces()[nbrEdgeI];
99 if (eFaces.size() == 1)
103 else if (eFaces.size() == 2)
105 label nbrFacei = eFaces[0];
107 if (nbrFacei == facei)
109 nbrFacei = eFaces[1];
117 <<
"Illegal surface on patch. Face " << facei
118 <<
" at vertices " << v0 <<
',' << v1
119 <<
" has fewer than 1 or more than 2 neighbours" 126 void Foam::walkPatch::faceToFace
135 nbrFaces.setSize(pp_.size());
136 nbrEnterVerts.setSize(pp_.size());
141 label facei = changedFaces[i];
142 label enterVertI = enterVerts[i];
144 if (!visited_[facei])
147 visited_[facei] =
true;
148 visitOrder_.append(facei);
150 const face& f = pp_.localFaces()[facei];
154 indexInFace_.append(fp);
159 label fp1 = reverse_ ? f.rcIndex(fp) : f.fcIndex(fp);
160 label nbr = getNeighbour(facei, fp, f[fp], f[fp1]);
166 && faceZone_[nbr] == faceZone_[facei]
169 nbrFaces[changedI] = nbr;
170 nbrEnterVerts[changedI] = f[fp];
179 nbrFaces.setSize(changedI);
180 nbrEnterVerts.setSize(changedI);
186 Foam::walkPatch::walkPatch
192 const label enterVertI,
200 visitOrder_(pp.size()),
201 indexInFace_(pp.size())
223 if (nbrFaces.
empty())
228 changedFaces = nbrFaces;
229 enterVerts = nbrEnterVerts;
232 visitOrder_.shrink();
233 indexInFace_.shrink();
#define forAll(list, i)
Loop across all elements in list.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
intWM_LABEL_SIZE_t 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.
A topoSetSource to select faces based on usage in another faceSet.
Various functions to operate on Lists.
A list of faces which address into the list of points.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.