hexMatcher Class Reference

A cellMatcher for hex cells. More...

Inheritance diagram for hexMatcher:
Collaboration diagram for hexMatcher:

Public Member Functions

 hexMatcher ()
 Construct null. More...
 
 hexMatcher (const hexMatcher &)=delete
 Disallow default bitwise copy construction. More...
 
 ~hexMatcher ()
 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 &)
 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...
 
void operator= (const hexMatcher &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from cellMatcher
 cellMatcher (const label vertPerCell, const label facePerCell, const label maxVertPerFace, const word &cellModelName)
 Construct given mesh and shape factors. More...
 
 cellMatcher (const cellMatcher &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~cellMatcher ()
 Destructor. More...
 
const Map< label > & localPoint () const
 
const faceListlocalFaces () const
 
const labelListfaceSize () const
 
const labelListpointMap () const
 
const labelListfaceMap () const
 
const labelListedgeFaces () const
 
const labelListListpointFaceIndex () const
 
const labelListvertLabels () const
 
const labelListfaceLabels () const
 
const cellModelmodel () const
 
void write (Ostream &os) const
 
void operator= (const cellMatcher &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from cellMatcher
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...
 
- Static Protected Member Functions inherited from cellMatcher
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...
 
- Protected Attributes inherited from cellMatcher
Map< labellocalPoint_
 
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 cellModelcellModelPtr_
 

Detailed Description

A cellMatcher for hex cells.

See also
cellMatcher
Source files

Definition at line 51 of file hexMatcher.H.

Constructor & Destructor Documentation

◆ hexMatcher() [1/2]

Construct null.

Definition at line 39 of file hexMatcher.C.

◆ hexMatcher() [2/2]

hexMatcher ( const hexMatcher )
delete

Disallow default bitwise copy construction.

◆ ~hexMatcher()

~hexMatcher ( )

Destructor.

Definition at line 53 of file hexMatcher.C.

References hexMatcher::matchShape().

Here is the call graph for this function:

Member Function Documentation

◆ nVertPerCell()

virtual label nVertPerCell ( ) const
inlinevirtual

Implements cellMatcher.

Definition at line 80 of file hexMatcher.H.

◆ nFacePerCell()

virtual label nFacePerCell ( ) const
inlinevirtual

Implements cellMatcher.

Definition at line 85 of file hexMatcher.H.

◆ nMaxVertPerFace()

virtual label nMaxVertPerFace ( ) const
inlinevirtual

Implements cellMatcher.

Definition at line 90 of file hexMatcher.H.

References hexMatcher::faceHashValue(), hexMatcher::faceSizeMatch(), hexMatcher::isA(), hexMatcher::matches(), hexMatcher::matchShape(), mesh, and hexMatcher::operator=().

Here is the call graph for this function:

◆ faceHashValue()

Foam::label faceHashValue ( ) const
virtual

Hash value of all face sizes of this shape. Can be used for.

quick initial recognition.

Implements cellMatcher.

Definition at line 247 of file hexMatcher.C.

References hexMatcher::faceSizeMatch().

Referenced by hexMatcher::nMaxVertPerFace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ faceSizeMatch()

bool faceSizeMatch ( const faceList ,
const labelList  
) const
virtual

Check whether number of face sizes match the shape.

Implements cellMatcher.

Definition at line 254 of file hexMatcher.C.

References forAll, and List< T >::size().

Referenced by hexMatcher::faceHashValue(), hexMatcher::matchShape(), and hexMatcher::nMaxVertPerFace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ matchShape()

bool matchShape ( const bool  checkOnly,
const faceList faces,
const labelList faceOwner,
const label  celli,
const labelList myFaces 
)
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 60 of file hexMatcher.C.

References cellMatcher::calcEdgeAddressing(), cellMatcher::calcLocalFaces(), cellMatcher::calcPointFaceIndex(), cellMatcher::faceLabels_, cellMatcher::faceMap_, cellMatcher::faceSize_, hexMatcher::faceSizeMatch(), cellMatcher::localFaces_, cellMatcher::nextVert(), cellMatcher::otherFace(), cellMatcher::pointFaceIndex_, cellMatcher::pointMap_, List< T >::setSize(), and cellMatcher::vertLabels_.

Referenced by hexMatcher::isA(), hexMatcher::matches(), hexMatcher::nMaxVertPerFace(), and hexMatcher::~hexMatcher().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isA() [1/2]

bool isA ( const primitiveMesh mesh,
const label  celli 
)
virtual

Exact match. Uses faceSizeMatch.

Returns true if cell matches shape exactly.

Implements cellMatcher.

Definition at line 278 of file hexMatcher.C.

References primitiveMesh::cells(), primitiveMesh::faceOwner(), primitiveMesh::faces(), and hexMatcher::matchShape().

Referenced by hexMatcher::nMaxVertPerFace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isA() [2/2]

bool isA ( const faceList )
virtual

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 291 of file hexMatcher.C.

References Foam::identity(), hexMatcher::matches(), hexMatcher::matchShape(), and List< T >::size().

Here is the call graph for this function:

◆ matches()

bool matches ( const primitiveMesh mesh,
const label  celli,
cellShape shape 
)
virtual

Like isA but also constructs a cellShape (if shape matches)

Implements cellMatcher.

Definition at line 306 of file hexMatcher.C.

References primitiveMesh::cells(), primitiveMesh::faceOwner(), primitiveMesh::faces(), hexMatcher::matchShape(), cellMatcher::model(), and cellMatcher::vertLabels().

Referenced by hexMatcher::isA(), and hexMatcher::nMaxVertPerFace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

void operator= ( const hexMatcher )
delete

Disallow default bitwise assignment.

Referenced by hexMatcher::nMaxVertPerFace().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: