32 const Foam::label Foam::hexMatcher::vertPerCell = 8;
33 const Foam::label Foam::hexMatcher::facePerCell = 6;
34 const Foam::label Foam::hexMatcher::maxVertPerFace = 4;
68 if (!faceSizeMatch(faces, myFaces))
81 label numVert = calcLocalFaces(faces, myFaces);
83 if (numVert != vertPerCell)
89 calcEdgeAddressing(numVert);
95 vertLabels_.setSize(vertPerCell);
96 faceLabels_.setSize(facePerCell);
106 const face& face4 = localFaces_[face4I];
107 label face4vert0 = 0;
109 vertLabels_[0] = pointMap_[face4[face4vert0]];
110 faceLabels_[4] = faceMap_[face4I];
118 !(owner[faceMap_[face4I]] == celli)
120 vertLabels_[1] = pointMap_[face4[face4vert1]];
128 !(owner[faceMap_[face4I]] == celli)
130 vertLabels_[2] = pointMap_[face4[face4vert2]];
138 !(owner[faceMap_[face4I]] == celli)
140 vertLabels_[3] = pointMap_[face4[face4vert3]];
151 faceLabels_[0] = faceMap_[face0I];
152 const face& face0 = localFaces_[face0I];
154 label face0vert0 = pointFaceIndex_[face4[face4vert0]][face0I];
162 (owner[faceMap_[face0I]] == celli)
164 vertLabels_[4] = pointMap_[face0[face0vert4]];
172 (owner[faceMap_[face0I]] == celli)
174 vertLabels_[7] = pointMap_[face0[face0vert7]];
185 const face& face5 = localFaces_[face5I];
186 faceLabels_[5] = faceMap_[face5I];
188 label face5vert4 = pointFaceIndex_[face0[face0vert4]][face5I];
196 (owner[faceMap_[face5I]] == celli)
198 vertLabels_[5] = pointMap_[face5[face5vert5]];
206 (owner[faceMap_[face5I]] == celli)
208 vertLabels_[6] = pointMap_[face5[face5vert6]];
219 faceLabels_[2] = faceMap_[face2I];
230 faceLabels_[1] = faceMap_[face1I];
241 faceLabels_[3] = faceMap_[face3I];
249 return facePerCell*vertPerCell;
259 if (myFaces.
size() != facePerCell)
266 label size = faces[myFaces[myFacei]].
size();
324 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.
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.
hexMatcher()
Construct null.
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
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.