50 regions_[0] = regions[0];
51 regions_[1] = regions[1];
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],
104 faceInfo.regions_[f.
fcIndex(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==
273 inline bool Foam::patchEdgeFaceRegions::operator!=
278 return !(*
this == rhs);
#define forAll(list, i)
Loop across all elements in list.
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A face is a list of labels corresponding to mesh vertices.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
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.
Transport of regions for use in PatchEdgeFaceWave.
patchEdgeFaceRegions()
Construct null.
An ordered pair of two objects of type <T> with first() and second() elements.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void transform(const polyMesh &mesh, const Patch &patch, const tensor &rotTensor, const scalar tol, TrackingData &td)
Apply rotation matrix.
static const label labelMax
errorManip< error > abort(error &err)
bool operator==(const patchEdgeFaceRegions &) const
label size() const
Return the number of elements in the FixedList.
const labelList & regions() const
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurrence of given element and return index,.
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Same (like operator==)
void setSize(const label)
Reset size of List.
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 doubleScalar e
Elementary charge.
Mesh consisting of general polyhedral cells.
void flip()
Flip the edge in-place.
label start() const
Return start vertex label.