Go to the documentation of this file.
35 template<
class>
class FaceList,
48 bool foundError =
false;
53 const labelList& edgeLabels =
p.faceEdges()[facei];
56 if (edgeLabels.size() < 3)
60 Info<<
"Face[" << facei <<
"] " <<
p[facei]
61 <<
" has fewer than 3 edges. Edges: " << edgeLabels
70 if (edgeLabels[i] < 0 || edgeLabels[i] >=
p.nEdges())
74 Info<<
"edge number " << edgeLabels[i]
75 <<
" on face " << facei
77 <<
"This usually means the input surface has "
78 <<
"edges with more than 2 faces connected."
96 const Face&
f =
p[facei];
98 const point& p1 =
p.points()[
f[1]];
99 const point& p2 =
p.points()[
f.last()];
101 const vector pointNormal((p1 -
p0) ^ (p2 -
p0));
102 if ((pointNormal &
p.faceNormals()[facei]) < 0)
109 <<
"Normal calculated from points inconsistent"
110 <<
" with faceNormal" <<
nl
111 <<
"face: " <<
f <<
nl
112 <<
"points: " <<
p0 <<
' ' << p1 <<
' ' << p2 <<
nl
113 <<
"pointNormal:" << pointNormal <<
nl
114 <<
"faceNormal:" <<
p.faceNormals()[facei] <<
endl;
122 const edge&
e =
p.edges()[edgeI];
123 const labelList& neighbouringFaces =
p.edgeFaces()[edgeI];
125 if (neighbouringFaces.size() == 2)
129 const Face& faceA =
p.localFaces()[neighbouringFaces[0]];
130 const Face& faceB =
p.localFaces()[neighbouringFaces[1]];
134 if (faceA.edgeDirection(
e) == faceB.edgeDirection(
e))
138 Info<<
"face orientation incorrect." <<
nl
139 <<
"localEdge[" << edgeI <<
"] " <<
e
140 <<
" between faces:" <<
nl
141 <<
" face[" << neighbouringFaces[0] <<
"] "
142 <<
p[neighbouringFaces[0]]
143 <<
" localFace: " << faceA
145 <<
" face[" << neighbouringFaces[1] <<
"] "
146 <<
p[neighbouringFaces[1]]
147 <<
" localFace: " << faceB
158 else if (neighbouringFaces.size() != 1)
163 <<
"Wrong number of edge neighbours." <<
nl
164 <<
"edge[" << edgeI <<
"] " <<
e
165 <<
" with points:" <<
p.localPoints()[
e.start()]
166 <<
' ' <<
p.localPoints()[
e.end()]
167 <<
" has neighbouringFaces:" << neighbouringFaces <<
endl;
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Ostream & endl(Ostream &os)
Add newline and flush stream.
#define forAll(list, i)
Loop across all elements in list.
messageStream Info
Information stream (uses stdout - output is on the master only)
const dimensionedScalar e
Elementary charge.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
const volScalarField & p0
A list of faces which address into the list of points.