Go to the documentation of this file.
35 template<
class FaceList,
class Po
intField>
44 const auto& localFaces =
p.localFaces();
45 const auto& localPoints =
p.localPoints();
52 const labelList& faceNbs = edgeFaces[edgeI];
54 if (faceNbs.size() > 2)
58 const edge&
e = edges[edgeI];
60 const point& edgePt = localPoints[
e.start()];
62 const vector e2 =
e.unitVec(localPoints);
66 const auto& f0 = localFaces[faceNbs[0]];
68 scalar maxAngle = GREAT;
73 if (f0[fpI] !=
e.start())
78 localPoints[f0[fpI]] - edgePt
81 const scalar angle = e2 & faceEdgeDir;
83 if (
mag(angle) < maxAngle)
86 maxAngleEdgeDir = faceEdgeDir;
103 for (label nbI = 1; nbI < faceNbs.size(); nbI++)
107 const auto&
f = localFaces[faceNbs[nbI]];
114 if (
f[fpI] !=
e.start())
116 const vector faceEdgeDir =
119 localPoints[
f[fpI]] - edgePt
122 const scalar angle = e2 & faceEdgeDir;
124 if (
mag(angle) < maxAngle)
127 maxAngleEdgeDir = faceEdgeDir;
153 sortedEdgeFaces[edgeI] = faceNbs;
157 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.
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)
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.