Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh and cell number find out the orientation of the cellShape and construct cell-vertex to mesh-vertex mapping and cell-face to mesh-face mapping. More...
Public Member Functions | |
cellMatcher (const label vertPerCell, const label facePerCell, const label maxVertPerFace, const word &cellModelName) | |
virtual | ~cellMatcher ()=default |
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 |
virtual bool | faceSizeMatch (const faceList &, const labelList &) const =0 |
virtual bool | matchShape (const bool checkOnly, const faceList &faces, const labelList &faceOwner, const label celli, const labelList &myFaces)=0 |
virtual bool | isA (const primitiveMesh &mesh, const label celli)=0 |
virtual bool | isA (const faceList &)=0 |
virtual bool | matches (const primitiveMesh &mesh, const label celli, cellShape &shape)=0 |
Protected Member Functions | |
label | calcLocalFaces (const faceList &faces, const labelList &myFaces) |
void | calcEdgeAddressing (const label numVert) |
void | calcPointFaceIndex () |
label | otherFace (const label numVert, const label v0, const label v1, const label localFacei) const |
cellMatcher (const cellMatcher &)=delete | |
cellMatcher & | operator= (const cellMatcher &)=delete |
Static Protected Member Functions | |
static label | edgeKey (const label numVert, const label v0, const label v1) |
static label | nextVert (const label, const label, const bool) |
Protected Attributes | |
Map< label > | localPoint_ |
faceList | localFaces_ |
labelList | faceSize_ |
labelList | pointMap_ |
labelList | faceMap_ |
labelList | edgeFaces_ |
labelListList | pointFaceIndex_ |
labelList | vertLabels_ |
labelList | faceLabels_ |
const word | cellModelName_ |
const cellModel * | cellModelPtr_ |
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh and cell number find out the orientation of the cellShape and construct cell-vertex to mesh-vertex mapping and cell-face to mesh-face mapping.
hexMatcher hex(mesh); cellShape shape; .. bool isHex = hex.match(celli, shape);
Now shape is set to the correct Hex cellShape (if isHex is true)
Alternatively there is direct access to the vertex and face mapping:
const labelList& hexVertLabels = hex.vertLabels(); const labelList& hexFaceLabels = hex.faceLabels();
Now
hexVertLabels
[n] is vertex label of hex vertex nhexFaceLabels
[n] is face label of hex vertex nProcess of cellShape recognition consists of following steps:
The whole calculation is done such that no lists are allocated during cell checking. E.g. localFaces_ are always sized to hold max. number of possible face vertices and a separate list is filled which holds the actusl face sizes.
For now all hex-degenerates implemented. Numbering taken from picture in demoGuide.
Definition at line 95 of file cellMatcher.H.
|
protecteddelete |
cellMatcher | ( | const label | vertPerCell, |
const label | facePerCell, | ||
const label | maxVertPerFace, | ||
const word & | cellModelName | ||
) |
Definition at line 33 of file cellMatcher.C.
References f().
|
virtualdefault |
|
inlinestaticprotected |
Definition at line 90 of file cellMatcherI.H.
Referenced by cellMatcher::calcEdgeAddressing().
|
inlinestaticprotected |
Definition at line 102 of file cellMatcherI.H.
Definition at line 67 of file cellMatcher.C.
References f(), forAll, and forAllConstIters().
|
protected |
Definition at line 130 of file cellMatcher.C.
References Foam::abort(), cellMatcher::edgeFaces_, cellMatcher::edgeKey(), stdFoam::end(), f(), cellMatcher::faceSize_, Foam::FatalError, FatalErrorInFunction, forAll, and cellMatcher::localFaces_.
|
protected |
|
protected |
Definition at line 206 of file cellMatcher.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::glTF::key().
|
protecteddelete |
|
inline |
Definition at line 23 of file cellMatcherI.H.
References cellMatcher::localPoint_.
|
inline |
Definition at line 29 of file cellMatcherI.H.
|
inline |
Definition at line 35 of file cellMatcherI.H.
|
inline |
Definition at line 41 of file cellMatcherI.H.
|
inline |
Definition at line 47 of file cellMatcherI.H.
|
inline |
Definition at line 53 of file cellMatcherI.H.
|
inline |
Definition at line 59 of file cellMatcherI.H.
|
inline |
Definition at line 65 of file cellMatcherI.H.
|
inline |
Definition at line 71 of file cellMatcherI.H.
|
inline |
Definition at line 77 of file cellMatcherI.H.
References cellModel::ptr().
void write | ( | Foam::Ostream & | os | ) | const |
Definition at line 235 of file cellMatcher.C.
References Foam::endl(), forAll, Foam::nl, and os().
|
pure virtual |
Implemented in hexMatcher, pyrMatcher, tetMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
|
pure virtual |
Implemented in hexMatcher, pyrMatcher, tetMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
|
pure virtual |
Implemented in hexMatcher, pyrMatcher, tetMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
|
pure virtual |
Implemented in hexMatcher, pyrMatcher, tetMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
Implemented in hexMatcher, pyrMatcher, tetMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
|
pure virtual |
Implemented in hexMatcher, pyrMatcher, tetMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
|
pure virtual |
Implemented in hexMatcher, pyrMatcher, tetMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
Implemented in tetMatcher, hexMatcher, pyrMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
|
pure virtual |
Implemented in hexMatcher, pyrMatcher, tetMatcher, prismMatcher, tetWedgeMatcher, and wedgeMatcher.
|
protected |
Definition at line 116 of file cellMatcher.H.
Referenced by cellMatcher::localPoint().
|
protected |
Definition at line 119 of file cellMatcher.H.
Referenced by cellMatcher::calcEdgeAddressing().
|
protected |
Definition at line 122 of file cellMatcher.H.
Referenced by cellMatcher::calcEdgeAddressing().
|
protected |
Definition at line 125 of file cellMatcher.H.
|
protected |
Definition at line 128 of file cellMatcher.H.
|
protected |
Definition at line 131 of file cellMatcher.H.
Referenced by cellMatcher::calcEdgeAddressing().
|
protected |
Definition at line 135 of file cellMatcher.H.
|
protected |
Definition at line 138 of file cellMatcher.H.
|
protected |
Definition at line 141 of file cellMatcher.H.
|
protected |
Definition at line 144 of file cellMatcher.H.
|
mutableprotected |
Definition at line 146 of file cellMatcher.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.