43 if (faces.
size() != 5)
51 for (
const face&
f : faces)
53 const label size =
f.
size();
69 return (nTris == 4 && nQuads == 1);
76 const UList<face>& meshFaces,
80 if (cellFaces.size() != 5)
88 for (
const label facei : cellFaces)
90 const label size = meshFaces[facei].size();
106 return (nTris == 4 && nQuads == 1);
143 const bool checkOnly,
150 if (!faceSizeMatch(faces, myFaces))
162 label numVert = calcLocalFaces(faces, myFaces);
164 if (numVert != vertPerCell)
170 calcEdgeAddressing(numVert);
173 calcPointFaceIndex();
176 vertLabels_.setSize(vertPerCell);
177 faceLabels_.setSize(facePerCell);
186 if (faceSize_[facei] == 4)
192 const face& face0 = localFaces_[face0I];
193 label face0vert0 = 0;
201 vertLabels_[0] = pointMap_[face0[face0vert0]];
202 faceLabels_[0] = faceMap_[face0I];
210 !(owner[faceMap_[face0I]] == celli)
212 vertLabels_[1] = pointMap_[face0[face0vert1]];
220 !(owner[faceMap_[face0I]] == celli)
222 vertLabels_[2] = pointMap_[face0[face0vert2]];
230 !(owner[faceMap_[face0I]] == celli)
232 vertLabels_[3] = pointMap_[face0[face0vert3]];
243 faceLabels_[1] = faceMap_[face1I];
254 faceLabels_[2] = faceMap_[face2I];
265 faceLabels_[3] = faceMap_[face3I];
276 faceLabels_[4] = faceMap_[face4I];
278 const face& face4 = localFaces_[face4I];
281 label face4vert0 = pointFaceIndex_[face0[face0vert0]][face4I];
289 !(owner[faceMap_[face4I]] == celli)
291 vertLabels_[4] = pointMap_[face4[face4vert4]];
332 shape.
reset(model(), vertLabels());
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
void size(const label n)
Older name for setAddressableSize.
A face is a list of labels corresponding to mesh vertices.
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
Cell-face mesh analysis engine.
An analytical geometric cellShape.
const cellList & cells() const
pyrMatcher()
Default construct.
UList< label > labelUList
A UList of labels.
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
void reset(const cellModel &model, const labelUList &labels, const bool doCollapse=false)
Reset from components.
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
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.
static bool checkFaceSizeMatch(const UList< face > &faces)
virtual const labelList & faceOwner() const
Return face owner.
virtual const faceList & faces() const
Return raw faces.
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
static bool test(const UList< face > &faces)
Test if given list of faces satisfies criteria for PYR. (4 tri, 1 quad)