32 const Foam::label Foam::prismMatcher::vertPerCell = 6;
33 const Foam::label Foam::prismMatcher::facePerCell = 5;
34 const Foam::label Foam::prismMatcher::maxVertPerFace = 4;
66 if (!faceSizeMatch(faces, myFaces))
72 label numVert = calcLocalFaces(faces, myFaces);
74 if (numVert != vertPerCell)
80 calcEdgeAddressing(numVert);
86 vertLabels_.setSize(vertPerCell);
87 faceLabels_.setSize(facePerCell);
98 if (faceSize_[facei] == 3)
105 const face& face0 = localFaces_[face0I];
106 label face0vert0 = 0;
113 vertLabels_[0] = pointMap_[face0[face0vert0]];
114 faceLabels_[0] = faceMap_[face0I];
125 !(owner[faceMap_[face0I]] == celli)
127 vertLabels_[1] = pointMap_[face0[face0vert1]];
141 const face& face4 = localFaces_[face4I];
147 if (faceSize_[face4I] != 4)
153 faceLabels_[4] = faceMap_[face4I];
155 label face4vert1 = pointFaceIndex_[face0[face0vert1]][face4I];
167 (owner[faceMap_[face4I]] == celli)
169 vertLabels_[4] = pointMap_[face4[face4vert4]];
180 (owner[faceMap_[face4I]] == celli)
182 vertLabels_[3] = pointMap_[face4[face4vert3]];
202 if (faceSize_[face1I] != 3)
215 faceLabels_[1] = faceMap_[face1I];
229 !(owner[faceMap_[face0I]] == celli)
231 vertLabels_[2] = pointMap_[face0[face0vert2]];
245 faceLabels_[3] = faceMap_[face3I];
246 const face& face3 = localFaces_[face3I];
252 label face3vert2 = pointFaceIndex_[face0[face0vert2]][face3I];
263 (owner[faceMap_[face3I]] == celli)
265 vertLabels_[5] = pointMap_[face3[face3vert5]];
279 faceLabels_[2] = faceMap_[face2I];
307 if (myFaces.
size() != 5)
317 label size = faces[myFaces[myFacei]].
size();
332 if ((nTris == 2) && (nQuads == 3))
389 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.
~prismMatcher()
Destructor.
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.
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.