A cellMatcher for tet cells (cellModel::TET) More...
Public Member Functions | |
tetMatcher () | |
Default construct. More... | |
~tetMatcher ()=default | |
Destructor. More... | |
virtual label | nVertPerCell () const |
virtual label | nFacePerCell () const |
virtual label | nMaxVertPerFace () const |
virtual label | faceHashValue () const |
Hash value of all face sizes of this shape. Can be used for. More... | |
virtual bool | faceSizeMatch (const faceList &, const labelList &) const |
Check whether number of face sizes match the shape. More... | |
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. More... | |
virtual bool | isA (const primitiveMesh &mesh, const label celli) |
Exact match. Uses faceSizeMatch. More... | |
virtual bool | isA (const faceList &faces) |
Exact match given all the faces forming a cell. No checks. More... | |
virtual bool | matches (const primitiveMesh &mesh, const label celli, cellShape &shape) |
Like isA but also constructs a cellShape (if shape matches) More... | |
![]() | |
cellMatcher (const label vertPerCell, const label facePerCell, const label maxVertPerFace, const word &cellModelName) | |
Construct for shape factors. More... | |
virtual | ~cellMatcher ()=default |
Destructor. More... | |
const Map< label > & | localPoint () const |
const faceList & | localFaces () const |
const labelList & | faceSize () const |
const labelList & | pointMap () const |
const labelList & | faceMap () const |
const labelList & | edgeFaces () const |
const labelListList & | pointFaceIndex () const |
const labelList & | vertLabels () const |
const labelList & | faceLabels () const |
const cellModel & | model () const |
void | write (Ostream &os) const |
virtual label | nVertPerCell () const =0 |
virtual label | nFacePerCell () const =0 |
virtual label | nMaxVertPerFace () const =0 |
virtual label | faceHashValue () const =0 |
Hash value of all face sizes of this shape. Can be used for. More... | |
virtual bool | faceSizeMatch (const faceList &, const labelList &) const =0 |
Check whether number of face sizes match the shape. More... | |
virtual bool | matchShape (const bool checkOnly, const faceList &faces, const labelList &faceOwner, const label celli, const labelList &myFaces)=0 |
Low level shape recognition. Return true if matches. More... | |
virtual bool | isA (const primitiveMesh &mesh, const label celli)=0 |
Exact match. Uses faceSizeMatch. More... | |
virtual bool | isA (const faceList &)=0 |
Exact match given all the faces forming a cell. No checks. More... | |
virtual bool | matches (const primitiveMesh &mesh, const label celli, cellShape &shape)=0 |
Like isA but also constructs a cellShape (if shape matches) More... | |
Static Public Member Functions | |
static bool | test (const UList< face > &faces) |
static bool | test (const primitiveMesh &mesh, const label celli) |
Additional Inherited Members | |
![]() | |
label | calcLocalFaces (const faceList &faces, const labelList &myFaces) |
Calculates localFaces. Returns number of local vertices (or -1. More... | |
void | calcEdgeAddressing (const label numVert) |
Fill edge (start, end) to face number. More... | |
void | calcPointFaceIndex () |
Fill vertex/face to index in face data structure. More... | |
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. More... | |
cellMatcher (const cellMatcher &)=delete | |
No copy construct. More... | |
cellMatcher & | operator= (const cellMatcher &)=delete |
No copy assignment. More... | |
![]() | |
static label | edgeKey (const label numVert, const label v0, const label v1) |
Given start and end of edge generate unique key. More... | |
static label | nextVert (const label, const label, const bool) |
Step along face either in righthand or lefthand direction. More... | |
![]() | |
Map< label > | localPoint_ |
faceList | localFaces_ |
Faces using local vertex numbering. More... | |
labelList | faceSize_ |
Number of vertices per face in localFaces_. More... | |
labelList | pointMap_ |
Map from local to mesh vertex numbering. More... | |
labelList | faceMap_ |
Map from local to mesh face numbering. More... | |
labelList | edgeFaces_ |
Map from 'edge' to neighbouring faces. More... | |
labelListList | pointFaceIndex_ |
pointFaceIndex[localVertI][localFacei] is index in localFace More... | |
labelList | vertLabels_ |
After matching: holds mesh vertices in cellmodel order. More... | |
labelList | faceLabels_ |
After matching: holds mesh faces in cellmodel order. More... | |
const word | cellModelName_ |
CellModel name. More... | |
const cellModel * | cellModelPtr_ |
A cellMatcher for tet cells (cellModel::TET)
Definition at line 54 of file tetMatcher.H.
tetMatcher | ( | ) |
Default construct.
Definition at line 103 of file tetMatcher.C.
|
default |
Destructor.
Test if given list of faces satisfies criteria for TET. (4 tri)
Definition at line 89 of file tetMatcher.C.
References Foam::checkFaceSizeMatch().
Referenced by isoSurfaceBase::getCellCutType(), tetMatcher::isA(), and isoSurfaceCell::isoSurfaceCell().
|
static |
Test if given cell satisfies criteria for TET. (4 tri)
Definition at line 95 of file tetMatcher.C.
References primitiveMesh::cells(), Foam::checkFaceSizeMatch(), polyMesh::faces(), and mesh.
|
inlinevirtual |
Implements cellMatcher.
Definition at line 100 of file tetMatcher.H.
|
inlinevirtual |
Implements cellMatcher.
Definition at line 105 of file tetMatcher.H.
|
inlinevirtual |
Implements cellMatcher.
Definition at line 110 of file tetMatcher.H.
|
virtual |
Hash value of all face sizes of this shape. Can be used for.
quick initial recognition.
Implements cellMatcher.
Definition at line 242 of file tetMatcher.C.
Check whether number of face sizes match the shape.
Implements cellMatcher.
Definition at line 248 of file tetMatcher.C.
References Foam::checkFaceSizeMatch().
|
virtual |
Low level shape recognition. Return true if matches.
Works in detection mode only (checkOnly=true) or in exact matching. Returns true and sets vertLabels_. Needs faces, faceOwner of all faces in 'mesh' and cell number and labels of faces for this cell. celli only used in combination with faceOwner to detect owner status.
Implements cellMatcher.
Definition at line 117 of file tetMatcher.C.
|
inlinevirtual |
Exact match. Uses faceSizeMatch.
Returns true if cell matches shape exactly.
Implements cellMatcher.
Definition at line 128 of file tetMatcher.H.
References mesh, and tetMatcher::test().
Exact match given all the faces forming a cell. No checks.
on whether faces match up and form a closed shape.
Implements cellMatcher.
Definition at line 133 of file tetMatcher.H.
References tetMatcher::test().
|
virtual |
Like isA but also constructs a cellShape (if shape matches)
Implements cellMatcher.
Definition at line 258 of file tetMatcher.C.
References primitiveMesh::cells(), polyMesh::faceOwner(), polyMesh::faces(), mesh, and cellShape::reset().