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 point labels. The functionality it provides supports the discretisation on a...
static const complex max
complex (VGREAT,VGREAT)
const labelListList & sortedEdgeFaces() const
Return edge-face addressing sorted (for edges with more than.
scalar pseudoAngle(const vector &e0, const vector &e1, const vector &vec)
Estimate angle of vec in coordinate system (e0, e1, e0^e1).
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
UIndirectList< label > labelUIndList
UIndirectList of labels.
#define forAll(list, i)
Loop across all elements in list.