60 template<
class TrackingData>
63 return regions_.size() && !regions_.found(
labelMax);
67 template<
class Patch,
class TrackingData>
79 template<
class Patch,
class TrackingData>
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;
123 regions_.setSize(orientedInfo.size(),
labelMax);
126 if (orientedInfo[i] != -1 && orientedInfo[i] < regions_[i])
128 regions_[i] = orientedInfo[i];
136 template<
class Patch,
class TrackingData>
139 const polyMesh&
mesh,
141 const patchEdgeFaceRegions& edgeInfo,
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;
170 regions_.setSize(orientedInfo.size(),
labelMax);
173 if (orientedInfo[i] != -1 && orientedInfo[i] < regions_[i])
175 regions_[i] = orientedInfo[i];
183 template<
class Patch,
class TrackingData>
186 const polyMesh&
mesh,
190 const patchEdgeFaceRegions& edgeInfo,
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];
248 template<
class TrackingData>
261 inline bool Foam::patchEdgeFaceRegions::operator==
266 return regions_ == rhs.regions_;
270 inline bool Foam::patchEdgeFaceRegions::operator!=
275 return !(*
this == rhs);
void size(const label n)
Older name for setAddressableSize.
bool valid(TrackingData &td) const
Changed or contains original (invalid) value.
A face is a list of labels corresponding to mesh vertices.
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.
void flip()
Flip the Pair in-place.
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.
#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...
Transport of regions for use in PatchEdgeFaceWave.
patchEdgeFaceRegions()
Default construct.
const dimensionedScalar e
Elementary charge.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
void transform(const polyMesh &mesh, const Patch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
errorManip< error > abort(error &err)
const labelList & regions() const
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Test for equality, with TrackingData.
const std::string patch
OpenFOAM patch number as a std::string.
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.
Mesh consisting of general polyhedral cells.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
Tensor of scalars, i.e. Tensor<scalar>.