30 template<
class FaceList,
class Po
intField>
40 bool foundError =
false;
48 if (edgeLabels.
size() < 3)
52 Info<<
"Face[" << facei <<
"] " << p[facei]
53 <<
" has fewer than 3 edges. Edges: " << edgeLabels
62 if (edgeLabels[i] < 0 || edgeLabels[i] >= p.
nEdges())
66 Info<<
"edge number " << edgeLabels[i]
67 <<
" on face " << facei
69 <<
"This usually means the input surface has " 70 <<
"edges with more than 2 faces connected." 88 const FaceType&
f = p[facei];
93 const vector pointNormal((p1 - p0) ^ (p2 - p0));
101 <<
"Normal calculated from points inconsistent" 102 <<
" with faceNormal" <<
nl 103 <<
"face: " << f <<
nl 104 <<
"points: " << p0 <<
' ' << p1 <<
' ' << p2 <<
nl 105 <<
"pointNormal:" << pointNormal <<
nl 117 if (neighbouringFaces.
size() == 2)
121 const FaceType& faceA = p.
localFaces()[neighbouringFaces[0]];
122 const FaceType& faceB = p.
localFaces()[neighbouringFaces[1]];
126 if (faceA.edgeDirection(e) == faceB.edgeDirection(e))
130 Info<<
"face orientation incorrect." <<
nl 131 <<
"localEdge[" << edgeI <<
"] " << e
132 <<
" between faces:" <<
nl 133 <<
" face[" << neighbouringFaces[0] <<
"] " 134 << p[neighbouringFaces[0]]
135 <<
" localFace: " << faceA
137 <<
" face[" << neighbouringFaces[1] <<
"] " 138 << p[neighbouringFaces[1]]
139 <<
" localFace: " << faceB
150 else if (neighbouringFaces.
size() != 1)
155 <<
"Wrong number of edge neighbours." <<
nl 156 <<
"edge[" << edgeI <<
"] " << e
159 <<
" has neighbouringFaces:" << neighbouringFaces <<
endl;
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Field< PointType > & localPoints() const
Return pointField of points in patch.
bool insert(const Key &key)
Insert a new entry.
A list of faces which address into the list of points.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
const Field< PointType > & points() const
Return reference to global points.
const labelListList & edgeFaces() const
Return edge-face addressing.
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
const Field< PointType > & faceNormals() const
Return face normals for patch.
label nEdges() const
Return number of edges in patch.
std::remove_reference< FaceList >::type::value_type FaceType
label end() const
Return end vertex label.
const List< FaceType > & localFaces() const
Return patch faces addressing into local point list.
const labelListList & faceEdges() const
Return face-edge addressing.
const dimensionedScalar e
Elementary charge.
label start() const
Return start vertex label.