57 if (!faceSizeMatch(faces, myFaces))
63 label numVert = calcLocalFaces(faces, myFaces);
65 if (numVert != vertPerCell)
71 calcEdgeAddressing(numVert);
77 vertLabels_.setSize(vertPerCell);
78 faceLabels_.setSize(facePerCell);
89 if (faceSize_[facei] == 3)
96 const face& face0 = localFaces_[face0I];
104 vertLabels_[0] = pointMap_[face0[face0vert0]];
105 faceLabels_[0] = faceMap_[face0I];
116 !(owner[faceMap_[face0I]] == celli)
118 vertLabels_[1] = pointMap_[face0[face0vert1]];
132 const face& face4 = localFaces_[face4I];
138 if (faceSize_[face4I] != 4)
144 faceLabels_[4] = faceMap_[face4I];
146 label face4vert1 = pointFaceIndex_[face0[face0vert1]][face4I];
158 (owner[faceMap_[face4I]] == celli)
160 vertLabels_[4] = pointMap_[face4[face4vert4]];
171 (owner[faceMap_[face4I]] == celli)
173 vertLabels_[3] = pointMap_[face4[face4vert3]];
193 if (faceSize_[face1I] != 3)
206 faceLabels_[1] = faceMap_[face1I];
220 !(owner[faceMap_[face0I]] == celli)
222 vertLabels_[2] = pointMap_[face0[face0vert2]];
236 faceLabels_[3] = faceMap_[face3I];
237 const face& face3 = localFaces_[face3I];
243 label face3vert2 = pointFaceIndex_[face0[face0vert2]][face3I];
254 (owner[faceMap_[face3I]] == celli)
256 vertLabels_[5] = pointMap_[face3[face3vert5]];
270 faceLabels_[2] = faceMap_[face2I];
298 if (myFaces.
size() != 5)
306 for (
const label facei : myFaces)
308 const label size = faces[facei].
size();
324 return (nTris == 2 && nQuads == 3);
374 shape.
reset(model(), vertLabels());
void size(const label n)
Older name for setAddressableSize.
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
Cell-face mesh analysis engine.
An analytical geometric cellShape.
const cellList & cells() const
prismMatcher()
Default construct.
virtual bool isA(const primitiveMesh &mesh, const label celli)
Exact match. Uses faceSizeMatch.
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
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.
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i)
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
void reset(const cellModel &model, const labelUList &labels, const bool doCollapse=false)
Reset from components.
virtual const labelList & faceOwner() const
Return face owner.
virtual const faceList & faces() const
Return raw faces.
List< label > labelList
A List of labels.
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
static constexpr const zero Zero
Global zero (0)