35template<
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;
A list of faces which address into the list of points.
A list that is sorted upon construction or when explicitly requested with the sort() method.
const labelList & indices() const noexcept
Return the list of sorted indices. Updated every sort.
void sort()
Forward (stable) sort the list (if changed after construction).
void size(const label n)
Older name for setAddressableSize.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
List< edge > edgeList
List of edge.
scalar pseudoAngle(const vector &e0, const vector &e1, const vector &vec)
Estimate angle of vec in coordinate system (e0, e1, e0^e1).
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
UIndirectList< label > labelUIndList
UIndirectList of labels.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
vector point
Point is a vector.
#define forAll(list, i)
Loop across all elements in list.