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"
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);
160 label nbr = getNeighbour(facei, fp,
f[fp],
f[fp1]);
166 && faceZone_[nbr] == faceZone_[facei]
169 nbrFaces[changedI] = nbr;
170 nbrEnterVerts[changedI] =
f[fp];
180 nbrEnterVerts.setSize(changedI);
192 const label enterVertI,
200 visitOrder_(pp.size()),
201 indexInFace_(pp.size())
223 if (nbrFaces.
empty())
228 changedFaces = nbrFaces;
229 enterVerts = nbrEnterVerts;
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & shrink()
Shrink the allocated space to the number of elements used.
void setSize(const label)
Reset size of List.
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.
label rcIndex(const label i) const
Return the reverse circular index, i.e. the previous index.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
A topoSetSource 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.
walkPatch(const primitivePatch &pp, const labelList &faceZone, const bool reverse, const label facei, const label enterVertI, boolList &visited)
Construct from components.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
void reverse(UList< T > &, const label n)
defineTypeNameAndDebug(combustionModel, 0)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.