41 Foam::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" 128 void Foam::walkPatch::faceToFace
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);
188 Foam::walkPatch::walkPatch
194 const label enterVertI,
202 visitOrder_(
pp.size()),
203 indexInFace_(
pp.size())
225 if (nbrFaces.
empty())
230 changedFaces = nbrFaces;
231 enterVerts = nbrEnterVerts;
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< edge > edgeList
List of edge.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
A topoSetFaceSource to select faces based on usage in another faceSet.
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
label fcIndex(const label i) const noexcept
The forward circular index. The next index in the list which returns to the first at the end of the l...
A list of faces which address into the list of points.
const dimensionedScalar e
Elementary charge.
void setSize(const label n)
Alias for resize()
const labelListList & edgeFaces() const
Return edge-face addressing.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
void reverse(UList< T > &list, const label n)
Reverse the first n elements of the list.
errorManip< error > abort(error &err)
label find(const T &val) const
Find index of the first occurrence of the value.
DynamicList< T, SizeMin > & shrink()
Calls shrink_to_fit() and returns a reference to the DynamicList.
defineTypeNameAndDebug(combustionModel, 0)
const labelListList & faceEdges() const
Return face-edge addressing.
A subset of mesh faces organised as a primitive patch.
List< label > labelList
A List of labels.
label rcIndex(const label i) const noexcept
The reverse circular index. The previous index in the list which returns to the last at the beginning...
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())