Go to the documentation of this file.
37 template<
class>
class FaceList,
58 const labelList& faceNbs = edgeFaces[edgeI];
60 if (faceNbs.size() > 2)
64 const edge&
e = edges[edgeI];
66 const point& edgePt = localPoints[
e.start()];
68 const vector e2 =
e.unitVec(localPoints);
72 const Face& f0 = localFaces[faceNbs[0]];
74 scalar maxAngle = GREAT;
79 if (f0[fpI] !=
e.start())
84 localPoints[f0[fpI]] - edgePt
87 const scalar angle = e2 & faceEdgeDir;
89 if (
mag(angle) < maxAngle)
92 maxAngleEdgeDir = faceEdgeDir;
102 const vector e1 = e2 ^ e0;
109 for (
label nbI = 1; nbI < faceNbs.size(); nbI++)
113 const Face&
f = localFaces[faceNbs[nbI]];
120 if (
f[fpI] !=
e.start())
122 const vector faceEdgeDir =
125 localPoints[
f[fpI]] - edgePt
128 const scalar angle = e2 & faceEdgeDir;
130 if (
mag(angle) < maxAngle)
133 maxAngleEdgeDir = faceEdgeDir;
159 sortedEdgeFaces[edgeI] = faceNbs;
163 return sortedEdgeFaces;
void sort()
Forward (stable) sort the list (if changed after construction).
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
#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.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
A list that is sorted upon construction or when explicitly requested with the sort() method.
scalar pseudoAngle(const vector &e0, const vector &e1, const vector &vec)
Estimate angle of vec in coordinate system (e0, e1, e0^e1).
VectorSpace< Form, Cmpt, Ncmpts > normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Elementary charge.
const labelList & indices() const
Return the list of sorted indices. Updated every sort.
A list of faces which address into the list of points.
UIndirectList< label > labelUIndList
UIndirectList of labels.