35 const Foam::label Foam::pyrMatcher::vertPerCell = 5;
36 const Foam::label Foam::pyrMatcher::facePerCell = 5;
37 const Foam::label Foam::pyrMatcher::maxVertPerFace = 4;
85 if (numVert != vertPerCell)
114 label face0vert0 = 0;
230 if (myFaces.
size() != 5)
240 label size = faces[myFaces[myFacei]].
size();
256 if ((nTris == 4) && (nQuads == 1))
const labelList & vertLabels() const
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
#define forAll(list, i)
Loop across all elements in list.
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 bool isA(const primitiveMesh &mesh, const label celli)
Exact match. Uses faceSizeMatch.
Cell-face mesh analysis engine.
labelList faceMap_
Map from local to mesh face numbering.
An analytical geometric cellShape.
void size(const label)
Override size to be inconsistent with allocated storage.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
const cellList & cells() const
pyrMatcher()
Construct null.
void calcEdgeAddressing(const label numVert)
Fill edge (start, end) to face number.
labelList vertLabels_
After matching: holds mesh vertices in cellmodel order.
labelListList pointFaceIndex_
pointFaceIndex[localVertI][localFacei] is index in localFace
Various functions to operate on Lists.
void calcPointFaceIndex()
Fill vertex/face to index in face data structure.
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
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.
label calcLocalFaces(const faceList &faces, const labelList &myFaces)
Calculates localFaces. Returns number of local vertices (or -1.
labelList faceSize_
Number of vertices per face in localFaces_.
List< label > labelList
A List of labels.
labelList faceLabels_
After matching: holds mesh faces in cellmodel order.
const cellModel & model() const
faceList localFaces_
Faces using local vertex numbering.
labelList pointMap_
Map from local to mesh vertex numbering.
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 setSize(const label)
Reset size of List.
virtual const faceList & faces() const =0
Return faces.
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
virtual const labelList & faceOwner() const =0
Face face-owner addressing.
static label nextVert(const label, const label, const bool)
Step along face either in righthand or lefthand direction.