60template<
class TrackingData>
63 return regions_.size() && !regions_.found(
labelMax);
67template<
class Patch,
class TrackingData>
79template<
class Patch,
class TrackingData>
91 const face&
f = patch.localFaces()[facei];
92 const edge&
e = patch.edges()[edgeI];
94 label index = patch.faceEdges()[facei].find(edgeI);
95 bool sameOrientation = (
f[index] ==
e.start());
100 faceInfo.regions_[index],
103 if (!sameOrientation)
108 if (!faceInfo.
valid(td))
114 if (orientedInfo.
found(-1) || regions_.found(-1))
121 bool changed =
false;
126 if (orientedInfo[i] != -1 && orientedInfo[i] < regions_[i])
128 regions_[i] = orientedInfo[i];
136template<
class Patch,
class TrackingData>
142 const bool sameOrientation,
148 edge orientedInfo(edgeInfo.regions_[0], edgeInfo.regions_[1]);
149 if (!sameOrientation)
155 if (!edgeInfo.
valid(td))
161 if (orientedInfo.
found(-1) || regions_.found(-1))
168 bool changed =
false;
173 if (orientedInfo[i] != -1 && orientedInfo[i] < regions_[i])
175 regions_[i] = orientedInfo[i];
183template<
class Patch,
class TrackingData>
195 const face&
f = patch.localFaces()[facei];
196 const edge&
e = patch.edges()[edgeI];
199 label index0 = patch.faceEdges()[facei].find(edgeI);
201 bool sameOrientation = (
f[index0] ==
e.start());
207 edgeInfo.regions_[0],
210 if (!sameOrientation)
215 if (!edgeInfo.
valid(td))
221 if (orientedInfo.
found(-1) || regions_.found(-1))
228 bool changed =
false;
233 if (orientedInfo[0] < regions_[index0])
235 regions_[index0] = orientedInfo[0];
238 if (orientedInfo[1] < regions_[index1])
240 regions_[index1] = orientedInfo[1];
248template<
class TrackingData>
266 return regions_ == rhs.regions_;
275 return !(*
this == rhs);
static constexpr label size() noexcept
Return the number of elements in the FixedList.
void flip()
Flip the Pair in-place.
void size(const label n)
Older name for setAddressableSize.
label fcIndex(const label i) const noexcept
bool valid() const
True if all internal ids are non-negative.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
bool found(const label pointLabel) const
Return true if point label is found in edge.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
A face is a list of labels corresponding to mesh vertices.
Transport of regions for use in PatchEdgeFaceWave.
bool updateEdge(const polyMesh &mesh, const Patch &patch, const label edgeI, const label facei, const patchEdgeFaceRegions &faceInfo, const scalar tol, TrackingData &td)
Influence of face on edge.
patchEdgeFaceRegions()
Default construct.
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
bool updateFace(const polyMesh &mesh, const Patch &patch, const label facei, const label edgeI, const patchEdgeFaceRegions &edgeInfo, const scalar tol, TrackingData &td)
Influence of edge on face.
const labelList & regions() const
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Test for equality, with TrackingData.
Mesh consisting of general polyhedral cells.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
errorManip< error > abort(error &err)
#define forAll(list, i)
Loop across all elements in list.