Maps a geometry to a set of cell primitives. More...
#include <cellModel.H>

Public Types | |
| enum | modelType { UNKNOWN = 0 , HEX = 3 , WEDGE = 4 , PRISM = 5 , PYR = 6 , TET = 7 , SPLITHEX = 8 , TETWEDGE = 9 } |
| Enumeration of commonly used cellModel types. More... | |
Public Member Functions | |
| cellModel (Istream &is) | |
| Construct from Istream. | |
| autoPtr< cellModel > | clone () const |
| Return clone. | |
| const word & | name () const noexcept |
| Return model name. | |
| label | index () const noexcept |
| Return index of model in the model list. | |
| label | nPoints () const noexcept |
| Return number of points. | |
| label | nEdges () const noexcept |
| Return number of edges. | |
| label | nFaces () const noexcept |
| Return number of faces. | |
| const edgeList & | modelEdges () const noexcept |
| Return a raw list of model edges. | |
| const faceList & | modelFaces () const noexcept |
| Return a raw list of model faces. | |
| edgeList | edges (const labelUList &pointLabels) const |
| Return list of cell edges. | |
| faceList | faces (const labelUList &pointLabels) const |
| Return list of cell faces. | |
| Foam::edge | edge (const label modelEdgei, const labelUList &pointLabels) const |
| Return the cell edge for specified model edge. | |
| Foam::face | face (const label modelFacei, const labelUList &pointLabels) const |
| Return the cell face for specified model face. | |
| vector | centre (const labelUList &pointLabels, const UList< point > &points) const |
| Centroid of the cell. | |
| scalar | mag (const labelUList &pointLabels, const UList< point > &points) const |
| Cell volume. | |
| InfoProxy< cellModel > | info () const noexcept |
| Return info proxy, used to print information to a stream. | |
| bool | writeData (Ostream &os) const |
| The writeData member function required by regIOobject. | |
Static Public Member Functions | |
| static const cellModel * | ptr (const modelType model) |
| Look up pointer to cellModel by enumeration, or nullptr on failure. | |
| static const cellModel * | ptr (const word &modelName) |
| Look up pointer to cellModel by name, or nullptr on failure. | |
| static const cellModel * | ptr (const label modelIndex) |
| Look up pointer to cellModel by index, or nullptr on failure. | |
| static const cellModel & | ref (const modelType model) |
| Look up reference to cellModel by enumeration. Fatal on failure. | |
| static const cellModel & | ref (const word &modelName) |
| Look up reference to cellModel by name. Fatal on failure. | |
| static const cellModel & | ref (const label modelIndex) |
| Look up reference to cellModel by index. Fatal on failure. | |
| static autoPtr< cellModel > | New (Istream &is) |
| Return a new cellModel created from Istream. | |
Static Public Attributes | |
| static const Enum< modelType > | modelNames |
| Names of commonly used cellModels corresponding to modelType. | |
Friends | |
| Ostream & | operator<< (Ostream &os, const cellModel &cm) |
Maps a geometry to a set of cell primitives.
This enables geometric cell data to be calculated without access to the primitive geometric level. This means mapping a 3D geometry to a set of pyramids which are each described by a cell face and the cell centre point.
Also includes a static collection of cell models (normally loaded from etc/cellModels), and a means of looking them up.
Definition at line 72 of file cellModel.H.
| enum modelType |
Enumeration of commonly used cellModel types.
The indices must match those in "etc/cellModels"
| Enumerator | |
|---|---|
| UNKNOWN | unknown |
| HEX | hex |
| WEDGE | wedge |
| PRISM | prism |
| PYR | pyr |
| TET | tet |
| SPLITHEX | splitHex |
| TETWEDGE | tetWedge |
Definition at line 81 of file cellModel.H.
|
explicit |
Construct from Istream.
Definition at line 27 of file cellModelIO.C.
References dict, dictionaryEntry::dict(), entry::keyword(), and dictionary::null.
Referenced by info(), operator<<, ref(), ref(), and ref().


|
static |
Look up pointer to cellModel by enumeration, or nullptr on failure.
Definition at line 113 of file cellModels.C.
References ptr().
Referenced by cellModeller::lookup(), cellModeller::lookup(), cellMatcher::model(), Foam::operator>>(), ptr(), STARCDMeshReader::readCells(), ref(), ref(), ref(), hexCell::shape(), tetCell::shape(), shapeToCell::shapeToCell(), and shapeToCell::shapeToCell().


|
static |
Look up pointer to cellModel by name, or nullptr on failure.
Definition at line 119 of file cellModels.C.
|
static |
Look up pointer to cellModel by index, or nullptr on failure.
Definition at line 139 of file cellModels.C.
|
static |
Look up reference to cellModel by enumeration. Fatal on failure.
Definition at line 150 of file cellModels.C.
References cellModel(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, modelNames, p, and ptr().
Referenced by PDRblock::blockMeshDict(), STARCDMeshReader::readBoundary(), STARCDMeshReader::readCells(), ABAQUSCore::readHelper::readSurfaceElements(), and writer::writer().


|
static |
Look up reference to cellModel by name. Fatal on failure.
Definition at line 165 of file cellModels.C.
References cellModel(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, p, and ptr().

|
static |
Look up reference to cellModel by index. Fatal on failure.
Definition at line 180 of file cellModels.C.
References cellModel(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, p, and ptr().

Return a new cellModel created from Istream.
Definition at line 198 of file cellModel.H.
References autoPtr< T >::New().

Return clone.
Definition at line 206 of file cellModel.H.
References autoPtr< T >::New().

|
inlinenoexcept |
Return model name.
Definition at line 24 of file cellModelI.H.
References Foam::noexcept.
Referenced by Foam::operator<<(), and Foam::operator<<().

|
inlinenoexcept |
Return index of model in the model list.
Definition at line 30 of file cellModelI.H.
References Foam::noexcept.
Referenced by Foam::operator<<(), STARCDMeshReader::readBoundary(), and writer::writer().

|
inlinenoexcept |
Return number of points.
Definition at line 36 of file cellModelI.H.
References Foam::noexcept.
Referenced by Foam::operator<<().

|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Return a raw list of model edges.
Definition at line 54 of file cellModelI.H.
References Foam::noexcept.
Referenced by Foam::operator<<().

|
inlinenoexcept |
Return a raw list of model faces.
Definition at line 60 of file cellModelI.H.
References Foam::noexcept.
Referenced by Foam::operator<<(), and ABAQUSCore::readHelper::readSurfaceElements().

|
inline |
Return list of cell edges.
Definition at line 66 of file cellModelI.H.
References forAll, and pointLabels().

|
inline |
Return list of cell faces.
Definition at line 94 of file cellModelI.H.
References forAll, and pointLabels().

|
inline |
Return the cell edge for specified model edge.
Definition at line 83 of file cellModelI.H.
References pointLabels().

|
inline |
Return the cell face for specified model face.
Definition at line 111 of file cellModelI.H.
References pointLabels().

| Foam::vector centre | ( | const labelUList & | pointLabels, |
| const UList< point > & | points ) const |
Centroid of the cell.
Definition at line 57 of file cellModel.C.
References pyramid< Point, PointRef, PolygonRef >::centre(), Foam::endl(), f(), forAll, pyramid< Point, PointRef, PolygonRef >::mag(), pointLabels(), points, Foam::pointsAverage(), WarningInFunction, and Foam::Zero.

| Foam::scalar mag | ( | const labelUList & | pointLabels, |
| const UList< point > & | points ) const |
Cell volume.
Definition at line 97 of file cellModel.C.
References Foam::endl(), f(), forAll, pyramid< Point, PointRef, PolygonRef >::mag(), pointLabels(), points, Foam::pointsAverage(), and WarningInFunction.

Return info proxy, used to print information to a stream.
Definition at line 301 of file cellModel.H.
References cellModel(), info(), and Foam::noexcept.
Referenced by info().


|
inline |
The writeData member function required by regIOobject.
Definition at line 306 of file cellModel.H.
References os().

References cellModel(), and os().
|
static |
Names of commonly used cellModels corresponding to modelType.
The names must match those in "etc/cellModels"
Definition at line 98 of file cellModel.H.
Referenced by ref(), and Foam::serializeHex().