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.
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.
const double e
Elementary charge.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool valid(TrackingData &td) const
Check whether origin has been changed at all or.
void size(const label)
Override size to be inconsistent with allocated storage.
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.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
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.
const labelList & regions() const
static const label labelMax
errorManip< error > abort(error &err)
label size() const
Return the number of elements in the FixedList.
label start() const
Return start vertex label.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
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.
Mesh consisting of general polyhedral cells.
void flip()
Flip the edge in-place.
bool operator==(const patchEdgeFaceRegions &) const
bool equal(const patchEdgeFaceRegions &, TrackingData &) const
Same (like operator==)