Maps a geometry to a set of cell primitives. More...
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. More... | |
autoPtr< cellModel > | clone () const |
Return clone. More... | |
const word & | name () const |
Return model name. More... | |
label | index () const |
Return index of model in the model list. More... | |
label | nPoints () const |
Return number of points. More... | |
label | nEdges () const |
Return number of edges. More... | |
label | nFaces () const |
Return number of faces. More... | |
const edgeList & | modelEdges () const |
Return a raw list of model edges. More... | |
const faceList & | modelFaces () const |
Return a raw list of model faces. More... | |
edgeList | edges (const labelUList &pointLabels) const |
Return list of edges. More... | |
faceList | faces (const labelUList &pointLabels) const |
Return list of faces. More... | |
vector | centre (const labelList &pointLabels, const UList< point > &points) const |
Vector centroid. More... | |
scalar | mag (const labelList &pointLabels, const UList< point > &points) const |
Cell volume. More... | |
InfoProxy< cellModel > | info () const |
Return info proxy. More... | |
bool | writeData (Ostream &os) const |
WriteData member function required by regIOobject. More... | |
Static Public Member Functions | |
static const cellModel * | ptr (const modelType model) |
Look up pointer to cellModel by enumeration, or nullptr on failure. More... | |
static const cellModel * | ptr (const word &modelName) |
Look up pointer to cellModel by name, or nullptr on failure. More... | |
static const cellModel * | ptr (const label modelIndex) |
Look up pointer to cellModel by index, or nullptr on failure. More... | |
static const cellModel & | ref (const modelType model) |
Look up reference to cellModel by enumeration. Fatal on failure. More... | |
static const cellModel & | ref (const word &modelName) |
Look up reference to cellModel by name. Fatal on failure. More... | |
static const cellModel & | ref (const label modelIndex) |
Look up reference to cellModel by index. Fatal on failure. More... | |
static autoPtr< cellModel > | New (Istream &is) |
Return a new cellModel on free-store created from Istream. More... | |
Static Public Attributes | |
static const Enum< modelType > | modelNames |
Names of commonly used cellModels corresponding to modelType. More... | |
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 78 of file cellModel.H.
Construct from Istream.
Definition at line 33 of file cellModelIO.C.
References dict, dictionaryEntry::dict(), entry::keyword(), and dictionary::null.
|
static |
Look up pointer to cellModel by enumeration, or nullptr on failure.
Definition at line 120 of file cellModels.C.
Referenced by cellMatcher::model(), STARCDMeshReader::readCells(), shapeToCell::shapeToCell(), and tetCell::tetCellShape().
|
static |
Look up pointer to cellModel by name, or nullptr on failure.
Definition at line 126 of file cellModels.C.
References n, and Foam::name().
|
static |
Look up pointer to cellModel by index, or nullptr on failure.
Definition at line 146 of file cellModels.C.
|
static |
Look up reference to cellModel by enumeration. Fatal on failure.
Definition at line 157 of file cellModels.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and p.
Referenced by voxelMeshSearch::makeMesh(), STARCDMeshReader::readBoundary(), STARCDMeshReader::readCells(), vtuSizing::reset(), and writer::writer().
|
static |
Look up reference to cellModel by name. Fatal on failure.
Definition at line 172 of file cellModels.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and p.
|
static |
Look up reference to cellModel by index. Fatal on failure.
Definition at line 187 of file cellModels.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, and p.
Return a new cellModel on free-store created from Istream.
Definition at line 160 of file cellModel.H.
References autoPtr< T >::New().
Return clone.
Definition at line 166 of file cellModel.H.
References autoPtr< T >::New().
|
inline |
Return model name.
Definition at line 30 of file cellModelI.H.
Referenced by Foam::operator<<().
|
inline |
Return index of model in the model list.
Definition at line 36 of file cellModelI.H.
Referenced by Foam::operator<<(), STARCDMeshReader::readBoundary(), and writer::writer().
|
inline |
Return number of points.
Definition at line 42 of file cellModelI.H.
Referenced by Foam::operator<<().
|
inline |
Return number of edges.
Definition at line 48 of file cellModelI.H.
|
inline |
Return number of faces.
Definition at line 54 of file cellModelI.H.
|
inline |
Return a raw list of model edges.
Definition at line 60 of file cellModelI.H.
Referenced by Foam::operator<<().
|
inline |
Return a raw list of model faces.
Definition at line 66 of file cellModelI.H.
Referenced by Foam::operator<<().
|
inline |
Return list of edges.
Definition at line 75 of file cellModelI.H.
References Foam::constant::electromagnetic::e, stdFoam::end(), forAll, and pointLabels().
|
inline |
Return list of faces.
Definition at line 99 of file cellModelI.H.
References f(), forAll, pointLabels(), and List< T >::setSize().
Foam::vector centre | ( | const labelList & | pointLabels, |
const UList< point > & | points | ||
) | const |
Vector centroid.
Definition at line 35 of file cellModel.C.
References pyramid< Point, PointRef, polygonRef >::centre(), Foam::endl(), forAll, pyramid< Point, PointRef, polygonRef >::mag(), pointLabels(), points, WarningInFunction, and Foam::Zero.
Cell volume.
Definition at line 92 of file cellModel.C.
References Foam::endl(), forAll, pyramid< Point, PointRef, polygonRef >::mag(), pointLabels(), points, WarningInFunction, and Foam::Zero.
Return info proxy.
Used to print information to a stream
Definition at line 218 of file cellModel.H.
WriteData member function required by regIOobject.
Definition at line 224 of file cellModel.H.
References IOstream::good().
|
static |
Names of commonly used cellModels corresponding to modelType.
The names must match those in "etc/cellModels"
Definition at line 92 of file cellModel.H.