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;
void size(const label n)
Older name for setAddressableSize.
void sort()
Forward (stable) sort the list (if changed after construction).
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
scalar pseudoAngle(const vector &e0, const vector &e1, const vector &vec)
Estimate angle of vec in coordinate system (e0, e1, e0^e1).
A list that is sorted upon construction or when explicitly requested with the sort() method...
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
#define forAll(list, i)
Loop across all elements in list.
A list of faces which address into the list of points.
const dimensionedScalar e
Elementary charge.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
UIndirectList< label > labelUIndList
UIndirectList of labels.
const labelList & indices() const noexcept
Return the list of sorted indices. Updated every sort.