32 const Foam::label Foam::hexMatcher::vertPerCell = 8;
33 const Foam::label Foam::hexMatcher::facePerCell = 6;
34 const Foam::label Foam::hexMatcher::maxVertPerFace = 4;
83 if (numVert != vertPerCell)
107 label face4vert0 = 0;
249 return facePerCell*vertPerCell;
259 if (myFaces.
size() != facePerCell)
266 label size = faces[myFaces[myFacei]].
size();
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
const labelList & vertLabels() const
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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 label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
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
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 bool isA(const primitiveMesh &mesh, const label celli)
Exact match. Uses faceSizeMatch.
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.
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
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 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.
hexMatcher()
Construct null.
virtual const faceList & faces() const =0
Return faces.
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.