cellModel Class Reference

Maps a geometry to a set of cell primitives. More...

Collaboration diagram for cellModel:
[legend]

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< cellModelclone () const
 Return clone. More...
 
const wordname () const noexcept
 Return model name. More...
 
label index () const noexcept
 Return index of model in the model list. More...
 
label nPoints () const noexcept
 Return number of points. More...
 
label nEdges () const noexcept
 Return number of edges. More...
 
label nFaces () const noexcept
 Return number of faces. More...
 
const edgeListmodelEdges () const noexcept
 Return a raw list of model edges. More...
 
const faceListmodelFaces () const noexcept
 Return a raw list of model faces. More...
 
edgeList edges (const labelUList &pointLabels) const
 Return list of cell edges. More...
 
faceList faces (const labelUList &pointLabels) const
 Return list of cell faces. More...
 
Foam::edge edge (const label modelEdgei, const labelUList &pointLabels) const
 Return the cell edge for specified model edge. More...
 
Foam::face face (const label modelFacei, const labelUList &pointLabels) const
 Return the cell face for specified model face. More...
 
vector centre (const labelList &pointLabels, const UList< point > &points) const
 Centroid of the cell. More...
 
scalar mag (const labelList &pointLabels, const UList< point > &points) const
 Cell volume. More...
 
InfoProxy< cellModelinfo () const
 Return info proxy. More...
 
bool writeData (Ostream &os) const
 The writeData member function required by regIOobject. More...
 

Static Public Member Functions

static const cellModelptr (const modelType model)
 Look up pointer to cellModel by enumeration, or nullptr on failure. More...
 
static const cellModelptr (const word &modelName)
 Look up pointer to cellModel by name, or nullptr on failure. More...
 
static const cellModelptr (const label modelIndex)
 Look up pointer to cellModel by index, or nullptr on failure. More...
 
static const cellModelref (const modelType model)
 Look up reference to cellModel by enumeration. Fatal on failure. More...
 
static const cellModelref (const word &modelName)
 Look up reference to cellModel by name. Fatal on failure. More...
 
static const cellModelref (const label modelIndex)
 Look up reference to cellModel by index. Fatal on failure. More...
 
static autoPtr< cellModelNew (Istream &is)
 Return a new cellModel created from Istream. More...
 

Static Public Attributes

static const Enum< modelTypemodelNames
 Names of commonly used cellModels corresponding to modelType. More...
 

Friends

Ostreamoperator<< (Ostream &os, const cellModel &cm)
 

Detailed Description

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.

Source files

Definition at line 72 of file cellModel.H.

Member Enumeration Documentation

◆ modelType

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.

Constructor & Destructor Documentation

◆ cellModel()

cellModel ( Istream is)
explicit

Construct from Istream.

Definition at line 34 of file cellModelIO.C.

References dict, dictionaryEntry::dict(), entry::keyword(), and dictionary::readEntry().

Here is the call graph for this function:

Member Function Documentation

◆ ptr() [1/3]

const Foam::cellModel * ptr ( const modelType  model)
static

Look up pointer to cellModel by enumeration, or nullptr on failure.

Definition at line 120 of file cellModels.C.

References cellModel::ptr().

Referenced by cellModel::ptr().

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

◆ ptr() [2/3]

const Foam::cellModel * ptr ( const word modelName)
static

Look up pointer to cellModel by name, or nullptr on failure.

Definition at line 126 of file cellModels.C.

References n, Foam::name(), and cellModel::ptr().

Here is the call graph for this function:

◆ ptr() [3/3]

const Foam::cellModel * ptr ( const label  modelIndex)
static

Look up pointer to cellModel by index, or nullptr on failure.

Definition at line 146 of file cellModels.C.

References cellModel::ptr().

Here is the call graph for this function:

◆ ref() [1/3]

const Foam::cellModel & ref ( const modelType  model)
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.

Here is the call graph for this function:

◆ ref() [2/3]

const Foam::cellModel & ref ( const word modelName)
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.

Here is the call graph for this function:

◆ ref() [3/3]

const Foam::cellModel & ref ( const label  modelIndex)
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.

Here is the call graph for this function:

◆ New()

static autoPtr< cellModel > New ( Istream is)
inlinestatic

Return a new cellModel created from Istream.

Definition at line 160 of file cellModel.H.

References Time::New().

Here is the call graph for this function:

◆ clone()

autoPtr< cellModel > clone ( ) const
inline

Return clone.

Definition at line 166 of file cellModel.H.

References Time::New().

Here is the call graph for this function:

◆ name()

const Foam::word & name ( ) const
inlinenoexcept

Return model name.

Definition at line 31 of file cellModelI.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ index()

Foam::label index ( ) const
inlinenoexcept

Return index of model in the model list.

Definition at line 37 of file cellModelI.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ nPoints()

Foam::label nPoints ( ) const
inlinenoexcept

Return number of points.

Definition at line 43 of file cellModelI.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ nEdges()

Foam::label nEdges ( ) const
inlinenoexcept

Return number of edges.

Definition at line 49 of file cellModelI.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ nFaces()

Foam::label nFaces ( ) const
inlinenoexcept

Return number of faces.

Definition at line 55 of file cellModelI.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ modelEdges()

const Foam::edgeList & modelEdges ( ) const
inlinenoexcept

Return a raw list of model edges.

Definition at line 61 of file cellModelI.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ modelFaces()

const Foam::faceList & modelFaces ( ) const
inlinenoexcept

Return a raw list of model faces.

Definition at line 67 of file cellModelI.H.

Referenced by Foam::operator<<(), and ABAQUSCore::readHelper::readSurfaceElements().

Here is the caller graph for this function:

◆ edges()

Foam::edgeList edges ( const labelUList pointLabels) const
inline

Return list of cell edges.

Definition at line 73 of file cellModelI.H.

References forAll, and pointLabels().

Here is the call graph for this function:

◆ faces()

Foam::faceList faces ( const labelUList pointLabels) const
inline

Return list of cell faces.

Definition at line 101 of file cellModelI.H.

References forAll, and pointLabels().

Here is the call graph for this function:

◆ edge()

Foam::edge edge ( const label  modelEdgei,
const labelUList pointLabels 
) const
inline

Return the cell edge for specified model edge.

Definition at line 90 of file cellModelI.H.

References pointLabels().

Here is the call graph for this function:

◆ face()

Foam::face face ( const label  modelFacei,
const labelUList pointLabels 
) const
inline

Return the cell face for specified model face.

Definition at line 118 of file cellModelI.H.

References pointLabels().

Referenced by PDRblock::blockMeshDict().

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

◆ centre()

Foam::vector centre ( const labelList pointLabels,
const UList< point > &  points 
) const

Centroid of the cell.

Definition at line 34 of file cellModel.C.

References Foam::endl(), f(), forAll, pointLabels(), points, UList< T >::size(), WarningInFunction, and Foam::Zero.

Here is the call graph for this function:

◆ mag()

Foam::scalar mag ( const labelList pointLabels,
const UList< point > &  points 
) const

Cell volume.

Definition at line 77 of file cellModel.C.

References Foam::endl(), f(), forAll, pointLabels(), points, UList< T >::size(), WarningInFunction, and Foam::Zero.

Here is the call graph for this function:

◆ info()

InfoProxy< cellModel > info ( ) const
inline

Return info proxy.

Used to print information to a stream

Definition at line 232 of file cellModel.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ writeData()

bool writeData ( Ostream os) const
inline

The writeData member function required by regIOobject.

Definition at line 238 of file cellModel.H.

References IOstream::good(), and os().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream & operator<< ( Ostream os,
const cellModel cm 
)
friend

Member Data Documentation

◆ modelNames

const Foam::Enum< Foam::cellModel::modelType > modelNames
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.

Referenced by Foam::serializeHex().


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