Public Member Functions | List of all members
cellTable Class Reference

The cellTable persistent data saved as a Map<dictionary>. More...

Inheritance diagram for cellTable:
Inheritance graph
[legend]
Collaboration diagram for cellTable:
Collaboration graph
[legend]

Public Member Functions

 cellTable ()
 
 cellTable (const objectRegistry &, const word &name="cellTable", const fileName &instance="constant")
 
 ~cellTable ()=default
 
label append (const dictionary &)
 
label findIndex (const word &name) const
 
word name (const label id) const
 
Map< wordnames () const
 
Map< wordnames (const wordRes &patterns) const
 
Map< wordselectType (const word &materialType) const
 
Map< wordfluids () const
 
Map< wordshells () const
 
Map< wordsolids () const
 
Map< wordmaterialTypes () const
 
void setMaterial (const label, const word &)
 
void setName (const label, const word &)
 
void setName (const label)
 
void readDict (const objectRegistry &, const word &name="cellTable", const fileName &instance="constant")
 
void writeDict (const objectRegistry &, const word &name="cellTable", const fileName &instance="constant") const
 
void operator= (const cellTable &)
 
void operator= (const Map< dictionary > &)
 
void operator= (const polyMesh &)
 
void addCellZones (polyMesh &, const labelList &tableIds) const
 
void combine (const dictionary &mapDict, labelList &tableIds)
 
- Public Member Functions inherited from Map< dictionary >
 Map ()
 
 Map (const label size)
 
 Map (Istream &is)
 
 Map (const this_type &map)
 
 Map (this_type &&map)
 
 Map (std::initializer_list< std::pair< label, T >> map)
 
void operator= (const this_type &rhs)
 
void operator= (this_type &&rhs)
 
void operator= (const this_type &rhs)
 
void operator= (std::initializer_list< std::pair< Key, T >> rhs)
 
void operator= (this_type &&rhs)
 

Additional Inherited Members

- Public Types inherited from Map< dictionary >
typedef Map< Tthis_type
 
typedef HashTable< T, label, Hash< label > > parent_type
 
using iterator = typename parent_type::iterator
 
using const_iterator = typename parent_type::const_iterator
 

Detailed Description

The cellTable persistent data saved as a Map<dictionary>.

The meshReader supports cellTable information.

The constant/cellTable file is an IOMap<dictionary> that is used to save the information persistently. It contains the cellTable information of the following form:

    (
        ID
        {
            Label           WORD;
            MaterialType    WORD;
            MaterialId      INT;
            PorosityId      INT;
            ColorIdx        INT;
            ...
        }
    ...
    )

If the Label is missing, a value cellTable_{ID} will be inferred. If the MaterialType is missing, the value fluid will be inferred.

Source files

Definition at line 76 of file cellTable.H.

Constructor & Destructor Documentation

◆ cellTable() [1/2]

cellTable ( )

Definition at line 98 of file cellTable.C.

◆ cellTable() [2/2]

cellTable ( const objectRegistry registry,
const word name = "cellTable",
const fileName instance = "constant" 
)

Definition at line 105 of file cellTable.C.

References Foam::name().

Here is the call graph for this function:

◆ ~cellTable()

~cellTable ( )
default

Member Function Documentation

◆ append()

Foam::label append ( const dictionary dict)

Definition at line 119 of file cellTable.C.

References dict, forAllConstIters(), and insert().

Here is the call graph for this function:

◆ findIndex()

Foam::label findIndex ( const word name) const

Definition at line 195 of file cellTable.C.

References forAllConstIters(), Foam::name(), and word::null.

Here is the call graph for this function:

◆ name()

Foam::word name ( const label  id) const

Definition at line 181 of file cellTable.C.

References Foam::name().

Here is the call graph for this function:

◆ names() [1/2]

Foam::Map< Foam::word > names ( ) const

Definition at line 135 of file cellTable.C.

References forAllConstIters(), and Foam::name().

Here is the call graph for this function:

◆ names() [2/2]

Foam::Map< Foam::word > names ( const wordRes patterns) const

Definition at line 157 of file cellTable.C.

References forAllConstIters(), wordRes::match(), and Foam::name().

Here is the call graph for this function:

◆ selectType()

Foam::Map< Foam::word > selectType ( const word materialType) const

Definition at line 231 of file cellTable.C.

References dict, forAllConstIters(), dictionary::getOrDefault(), and Foam::name().

Here is the call graph for this function:

◆ fluids()

Foam::Map< Foam::word > fluids ( ) const

Definition at line 262 of file cellTable.C.

Referenced by reader::fluids().

Here is the caller graph for this function:

◆ shells()

Foam::Map< Foam::word > shells ( ) const

Definition at line 274 of file cellTable.C.

◆ solids()

Foam::Map< Foam::word > solids ( ) const

Definition at line 268 of file cellTable.C.

Referenced by reader::solids().

Here is the caller graph for this function:

◆ materialTypes()

Foam::Map< Foam::word > materialTypes ( ) const

Definition at line 214 of file cellTable.C.

References forAllConstIters().

Here is the call graph for this function:

◆ setMaterial()

void setMaterial ( const label  id,
const word matlType 
)

Definition at line 281 of file cellTable.C.

Referenced by STARCDMeshReader::readCells().

Here is the caller graph for this function:

◆ setName() [1/2]

void setName ( const label  id,
const word name 
)

Definition at line 287 of file cellTable.C.

References Foam::name().

Referenced by STARCDMeshReader::readCells().

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

◆ setName() [2/2]

void setName ( const label  id)

Definition at line 293 of file cellTable.C.

References Foam::ListOps::find(), found, and Foam::name().

Here is the call graph for this function:

◆ readDict()

void readDict ( const objectRegistry registry,
const word name = "cellTable",
const fileName instance = "constant" 
)

Definition at line 305 of file cellTable.C.

References clear(), Foam::endl(), regIOobject::headerOk(), Foam::Info, Foam::name(), IOobject::NO_WRITE, and IOobject::READ_IF_PRESENT.

Here is the call graph for this function:

◆ writeDict()

void writeDict ( const objectRegistry registry,
const word name = "cellTable",
const fileName instance = "constant" 
) const

◆ operator=() [1/3]

void operator= ( const cellTable rhs)

Definition at line 373 of file cellTable.C.

References Map::operator=().

Here is the call graph for this function:

◆ operator=() [2/3]

void operator= ( const Map< dictionary > &  rhs)

Definition at line 380 of file cellTable.C.

References Map::operator=().

Here is the call graph for this function:

◆ operator=() [3/3]

void operator= ( const polyMesh mesh)

Definition at line 387 of file cellTable.C.

References dictionary::add(), polyMesh::cellZones(), dict, forAll, mesh, ZoneMesh::names(), primitiveMesh::nCells(), and Map::operator=().

Here is the call graph for this function:

◆ addCellZones()

void addCellZones ( polyMesh mesh,
const labelList tableIds 
) const

Definition at line 433 of file cellTable.C.

References List::append(), IOobject::AUTO_WRITE, polyMesh::cellZones(), ZoneMesh::clear(), Foam::endl(), forAll, Foam::Info, mesh, and List::setSize().

Here is the call graph for this function:

◆ combine()

void combine ( const dictionary mapDict,
labelList tableIds 
)

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