43 if (faces.
size() != 4)
48 for (
const face&
f : faces)
67 if (cellFaces.size() != 4)
72 for (
const label facei : cellFaces)
74 if (meshFaces[facei].size() != 3)
119 const bool checkOnly,
126 if (!faceSizeMatch(faces, myFaces))
138 label numVert = calcLocalFaces(faces, myFaces);
140 if (numVert != vertPerCell)
146 calcEdgeAddressing(numVert);
149 calcPointFaceIndex();
152 vertLabels_.setSize(vertPerCell);
153 faceLabels_.setSize(facePerCell);
160 const face& face3 = localFaces_[face3I];
161 label face3vert0 = 0;
168 vertLabels_[0] = pointMap_[face3[face3vert0]];
169 faceLabels_[3] = faceMap_[face3I];
177 !(owner[faceMap_[face3I]] == celli)
179 vertLabels_[1] = pointMap_[face3[face3vert1]];
187 !(owner[faceMap_[face3I]] == celli)
189 vertLabels_[2] = pointMap_[face3[face3vert2]];
200 faceLabels_[2] = faceMap_[face2I];
211 faceLabels_[0] = faceMap_[face0I];
222 faceLabels_[1] = faceMap_[face1I];
223 const face& face1 = localFaces_[face1I];
226 label face1vert0 = pointFaceIndex_[face3[face3vert0]][face1I];
234 (owner[faceMap_[face1I]] == celli)
277 shape.
reset(model(), vertLabels());
Various functions to operate on Lists.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
const cellModel & model() const
labelListList pointFaceIndex_
pointFaceIndex[localVertI][localFacei] is index in localFace
labelList faceMap_
Map from local to mesh face numbering.
label calcLocalFaces(const faceList &faces, const labelList &myFaces)
Calculates localFaces. Returns number of local vertices (or -1.
labelList pointMap_
Map from local to mesh vertex numbering.
labelList faceLabels_
After matching: holds mesh faces in cellmodel order.
static label nextVert(const label, const label, const bool)
Step along face either in righthand or lefthand direction.
labelList vertLabels_
After matching: holds mesh vertices in cellmodel order.
const labelList & vertLabels() const
labelList faceSize_
Number of vertices per face in localFaces_.
label otherFace(const label numVert, const label v0, const label v1, const label localFacei) const
Given start,end of edge lookup both faces sharing it and return.
void calcEdgeAddressing(const label numVert)
Fill edge (start, end) to face number.
faceList localFaces_
Faces using local vertex numbering.
cellMatcher(const cellMatcher &)=delete
No copy construct.
void calcPointFaceIndex()
Fill vertex/face to index in face data structure.
An analytical geometric cellShape.
void reset(const cellModel &model, const labelUList &labels, const bool doCollapse=false)
Reset from components.
A face is a list of labels corresponding to mesh vertices.
Cell-face mesh analysis engine.
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
static bool test(const UList< face > &faces)
Test if given list of faces satisfies criteria for TET. (4 tri).
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 label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
tetMatcher()
Default construct.
List< label > labelList
A List of labels.
List< face > faceList
List of faces.
static bool checkFaceSizeMatch(const UList< face > &faces)
UList< label > labelUList
A UList of labels.