32 const Foam::label Foam::wedgeMatcher::vertPerCell = 7;
33 const Foam::label Foam::wedgeMatcher::facePerCell = 6;
34 const Foam::label Foam::wedgeMatcher::maxVertPerFace = 4;
68 if (!faceSizeMatch(faces, myFaces))
74 label numVert = calcLocalFaces(faces, myFaces);
76 if (numVert != vertPerCell)
82 calcEdgeAddressing(numVert);
88 vertLabels_.setSize(vertPerCell);
89 faceLabels_.setSize(facePerCell);
99 if (faceSize_[facei] == 3)
106 const face& face0 = localFaces_[face0I];
109 for (
label face0vert0 = 0; face0vert0 < faceSize_[face0I]; face0vert0++)
116 vertLabels_[0] = pointMap_[face0[face0vert0]];
117 faceLabels_[0] = faceMap_[face0I];
128 !(owner[faceMap_[face0I]] == celli)
130 vertLabels_[1] = pointMap_[face0[face0vert1]];
144 const face& face4 = localFaces_[face4I];
150 if (faceSize_[face4I] != 4)
163 faceLabels_[4] = faceMap_[face4I];
166 label face4vert0 = pointFaceIndex_[face0[face0vert0]][face4I];
178 !(owner[faceMap_[face4I]] == celli)
180 vertLabels_[3] = pointMap_[face4[face4vert3]];
195 const face& face2 = localFaces_[face2I];
201 if (faceSize_[face2I] != 3)
207 faceLabels_[2] = faceMap_[face2I];
218 label face2vert3 = pointFaceIndex_[face4[face4vert3]][face2I];
226 (owner[faceMap_[face2I]] == celli)
228 vertLabels_[6] = pointMap_[face2[face2vert6]];
239 faceLabels_[1] = faceMap_[face1I];
240 const face& face1 = localFaces_[face1I];
246 label face1vert6 = pointFaceIndex_[face2[face2vert6]][face1I];
254 !(owner[faceMap_[face1I]] == celli)
256 vertLabels_[5] = pointMap_[face1[face1vert5]];
264 !(owner[faceMap_[face1I]] == celli)
266 vertLabels_[4] = pointMap_[face1[face1vert4]];
274 !(owner[faceMap_[face0I]] == celli)
276 vertLabels_[2] = pointMap_[face0[face0vert2]];
290 faceLabels_[3] = faceMap_[face3I];
307 faceLabels_[5] = faceMap_[face5I];
334 if (myFaces.
size() != 6)
344 label size = faces[myFaces[myFacei]].
size();
359 if ((nTris == 2) && (nQuads == 4))
416 shape =
cellShape(model(), vertLabels());
Various functions to operate on Lists.
#define forAll(list, i)
Loop across all elements in list.
void size(const label)
Override size to be inconsistent with allocated storage.
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
An analytical geometric cellShape.
A face is a list of labels corresponding to mesh vertices.
Cell-face mesh analysis engine.
virtual const faceList & faces() const =0
Return faces.
virtual const labelList & faceOwner() const =0
Face face-owner addressing.
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.
~wedgeMatcher()
Destructor.
wedgeMatcher()
Construct null.
List< label > labelList
A List of labels.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.