59 if (!faceSizeMatch(faces, myFaces))
71 label numVert = calcLocalFaces(faces, myFaces);
73 if (numVert != vertPerCell)
79 calcEdgeAddressing(numVert);
85 vertLabels_.setSize(vertPerCell);
86 faceLabels_.setSize(facePerCell);
96 if (faceSize_[facei] == 3)
103 const face& face0 = localFaces_[face0I];
106 for (label face0vert0 = 0; face0vert0 < faceSize_[face0I]; face0vert0++)
113 vertLabels_[0] = pointMap_[face0[face0vert0]];
114 faceLabels_[0] = faceMap_[face0I];
122 !(owner[faceMap_[face0I]] == celli)
124 vertLabels_[1] = pointMap_[face0[face0vert1]];
136 if (faceSize_[face1I] != 3)
140 faceLabels_[1] = faceMap_[face1I];
151 !(owner[faceMap_[face0I]] == celli)
153 vertLabels_[2] = pointMap_[face0[face0vert2]];
164 faceLabels_[3] = faceMap_[face3I];
175 faceLabels_[2] = faceMap_[face2I];
178 label face3vert2 = pointFaceIndex_[face0[face0vert2]][face3I];
186 (owner[faceMap_[face3I]] == celli)
189 const face& face3 = localFaces_[face3I];
191 vertLabels_[4] = pointMap_[face3[face3vert4]];
199 (owner[faceMap_[face3I]] == celli)
201 vertLabels_[3] = pointMap_[face3[face3vert3]];
223 if (myFaces.
size() != 4)
231 for (
const label facei : myFaces)
233 const label size = faces[facei].
size();
249 return (nTris == 2 && nQuads == 2);
299 shape.
reset(model(), vertLabels());
Various functions to operate on Lists.
void size(const label n)
Older name for setAddressableSize.
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
An analytical geometric cellShape.
void reset(const cellModel &model, const labelUList &labels, const bool doCollapse=false)
Reset from components.
A face is a list of labels corresponding to mesh vertices.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
Cell-face mesh analysis engine.
const cellList & cells() const
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
virtual bool matchShape(const bool checkOnly, const faceList &faces, const labelList &faceOwner, const label celli, const labelList &myFaces)
Low level shape recognition. Return true if matches.
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
virtual bool isA(const primitiveMesh &mesh, const label celli)
Exact match. Uses faceSizeMatch.
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
tetWedgeMatcher()
Default construct.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
List< label > labelList
A List of labels.
static constexpr const zero Zero
Global zero (0)
#define forAll(list, i)
Loop across all elements in list.