41Foam::label Foam::walkPatch::getNeighbour
58 const edge&
e = edges[fEdges[fp]];
60 if ((
e[0] == v0 &&
e[1] == v1) || (
e[0] == v1 &&
e[1] == v0))
63 nbrEdgeI = fEdges[fp];
70 label edgeI = fEdges[i];
72 const edge&
e = edges[edgeI];
76 (
e[0] == v0 &&
e[1] == v1)
77 || (
e[0] == v1 &&
e[1] == v0)
92 <<
"Did not find edge on face " << facei <<
" that uses vertices"
101 if (eFaces.size() == 1)
105 else if (eFaces.size() == 2)
107 label nbrFacei = eFaces[0];
109 if (nbrFacei == facei)
111 nbrFacei = eFaces[1];
119 <<
"Illegal surface on patch. Face " << facei
120 <<
" at vertices " << v0 <<
',' << v1
121 <<
" has fewer than 1 or more than 2 neighbours"
137 nbrFaces.setSize(pp_.size());
138 nbrEnterVerts.setSize(pp_.size());
143 label facei = changedFaces[i];
144 label enterVertI = enterVerts[i];
146 if (!visited_[facei])
149 visited_[facei] =
true;
150 visitOrder_.append(facei);
152 const face&
f = pp_.localFaces()[facei];
154 label fp =
f.
find(enterVertI);
156 indexInFace_.append(fp);
162 label nbr = getNeighbour(facei, fp,
f[fp],
f[fp1]);
168 && faceZone_[nbr] == faceZone_[facei]
171 nbrFaces[changedI] = nbr;
172 nbrEnterVerts[changedI] =
f[fp];
182 nbrEnterVerts.setSize(changedI);
194 const label enterVertI,
202 visitOrder_(pp.size()),
203 indexInFace_(pp.size())
225 if (nbrFaces.
empty())
230 changedFaces = nbrFaces;
231 enterVerts = nbrEnterVerts;
Various functions to operate on Lists.
DynamicList< T, SizeMin > & shrink()
Shrink the allocated space to the number of elements used.
void setSize(const label n)
Alias for resize()
A list of faces which address into the list of points.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
const labelListList & edgeFaces() const
Return edge-face addressing.
const labelListList & faceEdges() const
Return face-edge addressing.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
label find(const T &val, label pos=0) const
Find index of the first occurrence of the value.
label rcIndex(const label i) const noexcept
label fcIndex(const label i) const noexcept
A topoSetFaceSource to select faces based on usage in another faceSet.
A subset of mesh faces organised as a primitive patch.
Collection of static functions to do various simple patch related things.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< label > labelList
A List of labels.
void reverse(UList< T > &list, const label n)
Reverse the first n elements of the list.
errorManip< error > abort(error &err)
List< edge > edgeList
A List of edges.
#define forAll(list, i)
Loop across all elements in list.