41 if (faces.
size() != 6)
46 for (
const face&
f : faces)
61 const UList<face>& meshFaces,
65 if (cellFaces.size() != 6)
70 for (
const label facei : cellFaces)
72 if (meshFaces[facei].size() != 4)
116 const bool checkOnly,
123 if (!faceSizeMatch(faces, myFaces))
136 label numVert = calcLocalFaces(faces, myFaces);
138 if (numVert != vertPerCell)
144 calcEdgeAddressing(numVert);
147 calcPointFaceIndex();
150 vertLabels_.setSize(vertPerCell);
151 faceLabels_.setSize(facePerCell);
161 const face& face4 = localFaces_[face4I];
162 label face4vert0 = 0;
164 vertLabels_[0] = pointMap_[face4[face4vert0]];
165 faceLabels_[4] = faceMap_[face4I];
173 !(owner[faceMap_[face4I]] == celli)
175 vertLabels_[1] = pointMap_[face4[face4vert1]];
183 !(owner[faceMap_[face4I]] == celli)
185 vertLabels_[2] = pointMap_[face4[face4vert2]];
193 !(owner[faceMap_[face4I]] == celli)
195 vertLabels_[3] = pointMap_[face4[face4vert3]];
206 faceLabels_[0] = faceMap_[face0I];
207 const face& face0 = localFaces_[face0I];
209 label face0vert0 = pointFaceIndex_[face4[face4vert0]][face0I];
217 (owner[faceMap_[face0I]] == celli)
219 vertLabels_[4] = pointMap_[face0[face0vert4]];
227 (owner[faceMap_[face0I]] == celli)
229 vertLabels_[7] = pointMap_[face0[face0vert7]];
240 const face& face5 = localFaces_[face5I];
241 faceLabels_[5] = faceMap_[face5I];
243 label face5vert4 = pointFaceIndex_[face0[face0vert4]][face5I];
251 (owner[faceMap_[face5I]] == celli)
253 vertLabels_[5] = pointMap_[face5[face5vert5]];
261 (owner[faceMap_[face5I]] == celli)
263 vertLabels_[6] = pointMap_[face5[face5vert6]];
274 faceLabels_[2] = faceMap_[face2I];
285 faceLabels_[1] = faceMap_[face1I];
296 faceLabels_[3] = faceMap_[face3I];
304 return facePerCell*vertPerCell;
337 shape.
reset(model(), vertLabels());
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
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 ...
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
Cell-face mesh analysis engine.
An analytical geometric cellShape.
const cellList & cells() const
static bool test(const UList< face > &faces)
Test if given list of faces satisfies criteria for HEX. (6 quad)
UList< label > labelUList
A UList of labels.
Various functions to operate on Lists.
void reset(const cellModel &model, const labelUList &labels, const bool doCollapse=false)
Reset from components.
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 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.
hexMatcher()
Default construct.