63 template<
class TrackingData>
70 template<
class Patch,
class TrackingData>
82 template<
class Patch,
class TrackingData>
94 const face&
f = patch.localFaces()[facei];
95 const edge&
e = patch.edges()[edgei];
98 bool sameOrientation = (
f[index] ==
e.start());
103 faceInfo.regions_[index],
106 if (!sameOrientation)
111 if (!faceInfo.
valid(td))
124 bool changed =
false;
129 if (orientedInfo[i] != -1 && orientedInfo[i] < regions_[i])
131 regions_[i] = orientedInfo[i];
139 template<
class Patch,
class TrackingData>
145 const bool sameOrientation,
151 edge orientedInfo(edgeInfo.regions_[0], edgeInfo.regions_[1]);
152 if (!sameOrientation)
158 if (!edgeInfo.
valid(td))
171 bool changed =
false;
176 if (orientedInfo[i] != -1 && orientedInfo[i] < regions_[i])
178 regions_[i] = orientedInfo[i];
186 template<
class Patch,
class TrackingData>
198 const face&
f = patch.localFaces()[facei];
199 const edge&
e = patch.edges()[edgei];
204 bool sameOrientation = (
f[index0] ==
e.start());
210 edgeInfo.regions_[0],
213 if (!sameOrientation)
218 if (!edgeInfo.
valid(td))
231 bool changed =
false;
236 if (orientedInfo[0] < regions_[index0])
238 regions_[index0] = orientedInfo[0];
241 if (orientedInfo[1] < regions_[index1])
243 regions_[index1] = orientedInfo[1];
251 template<
class TrackingData>
264 inline bool Foam::patchEdgeFaceRegions::operator==
269 return regions() == rhs.regions();
273 inline bool Foam::patchEdgeFaceRegions::operator!=
278 return !(*
this == rhs);
290 return os << wDist.regions_;
300 return is >> wDist.regions_;
#define forAll(list, i)
Loop across all elements in list.
label size() const
Return the number of elements in the FixedList.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void flip()
Flip the edge in-place.
A face is a list of labels corresponding to mesh vertices.
Transport of regions for use in PatchEdgeFaceWave. Set element to -1 to denote blocked.
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.
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.
patchEdgeFaceRegions()
Construct null.
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
const labelList & regions() const
void transform(const polyMesh &mesh, const Patch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Same (like operator==)
Mesh consisting of general polyhedral cells.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
errorManip< error > abort(error &err)
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
static const label labelMax