OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

cellTable Class Reference

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

Inheritance diagram for cellTable:
Collaboration diagram for cellTable:

List of all members.


Public Member Functions

 cellTable ()
 Construct null.
 cellTable (const objectRegistry &, const word &name="cellTable", const fileName &instance="constant")
 Construct read from registry, name. instance.
 ~cellTable ()
 Destructor.
label append (const dictionary &)
 Append to the end, return index.
label findIndex (const word &name) const
 Return index corresponding to name.
word name (const label &id) const
 Return the name corresponding to id.
Map< wordnames () const
 Return a Map of (id => name).
Map< wordnames (const List< wordRe > &patterns) const
 Return a Map of (id => names) selected by patterns.
Map< wordselectType (const word &materialType) const
 Return a Map of (id => name) for materialType (fluid | solid | shell).
Map< wordfluids () const
 Return a Map of (id => name) for fluids.
Map< wordshells () const
 Return a Map of (id => name) for shells.
Map< wordsolids () const
 Return a Map of (id => name) for solids.
Map< wordmaterialTypes () const
 Return a Map of (id => fluid|solid|shell).
void setMaterial (const label &, const word &)
 Assign material Type.
void setName (const label &, const word &)
 Assign name.
void setName (const label &)
 Assign default name if not already set.
void readDict (const objectRegistry &, const word &name="cellTable", const fileName &instance="constant")
 Read constant/cellTable.
void writeDict (const objectRegistry &, const word &name="cellTable", const fileName &instance="constant") const
 write constant/cellTable for later reuse
void operator= (const cellTable &)
 Assignment.
void operator= (const Map< dictionary > &)
 Assign from Map<dictionary>.
void operator= (const polyMesh &)
 Assign from cellZones.
void addCellZones (polyMesh &, const labelList &tableIds) const
 Classify tableIds into cellZones according to the cellTable.
void combine (const dictionary &, labelList &tableIds)
 Combine tableIds together.

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 73 of file cellTable.H.


Constructor & Destructor Documentation

cellTable (  ) 

Construct null.

Definition at line 98 of file cellTable.C.

References HashTable< dictionary, label, Hash< label > >::insert().

Here is the call graph for this function:

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

Construct read from registry, name. instance.

Definition at line 105 of file cellTable.C.

~cellTable (  ) 

Destructor.

Definition at line 119 of file cellTable.C.


Member Function Documentation

Foam::label append ( const dictionary dict  ) 

Append to the end, return index.

Definition at line 125 of file cellTable.C.

Foam::label findIndex ( const word name  )  const

Return index corresponding to name.

returns -1 if not found

Definition at line 201 of file cellTable.C.

Foam::word name ( const label id  )  const

Return the name corresponding to id.

returns cellTable_ID if not otherwise defined

Definition at line 187 of file cellTable.C.

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

Return a Map of (id => name).

Definition at line 141 of file cellTable.C.

Foam::Map< Foam::word > names ( const List< wordRe > &  patterns  )  const

Return a Map of (id => names) selected by patterns.

Definition at line 163 of file cellTable.C.

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

Return a Map of (id => name) for materialType (fluid | solid | shell).

Definition at line 237 of file cellTable.C.

Referenced by cellTable::setMaterial(), cellTable::shells(), and cellTable::solids().

Here is the caller graph for this function:

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

Return a Map of (id => name) for fluids.

Definition at line 265 of file cellTable.C.

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

Return a Map of (id => name) for shells.

Definition at line 277 of file cellTable.C.

References cellTable::selectType().

Here is the call graph for this function:

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

Return a Map of (id => name) for solids.

Definition at line 271 of file cellTable.C.

References cellTable::selectType().

Here is the call graph for this function:

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

Return a Map of (id => fluid|solid|shell).

Definition at line 220 of file cellTable.C.

void setMaterial ( const label id,
const word matlType 
)

Assign material Type.

Definition at line 284 of file cellTable.C.

References cellTable::selectType().

Referenced by STARCD::readCells().

Here is the call graph for this function:

Here is the caller graph for this function:

void setName ( const label id,
const word name 
)

Assign name.

Definition at line 290 of file cellTable.C.

Referenced by STARCD::readCells(), and cellTable::readDict().

Here is the caller graph for this function:

void setName ( const label id  ) 

Assign default name if not already set.

Definition at line 296 of file cellTable.C.

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

Read constant/cellTable.

Definition at line 308 of file cellTable.C.

References Foam::name(), and cellTable::setName().

Here is the call graph for this function:

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

write constant/cellTable for later reuse

Definition at line 343 of file cellTable.C.

References Foam::endl(), and Foam::Info.

Here is the call graph for this function:

void operator= ( const cellTable rhs  ) 

Assignment.

Definition at line 376 of file cellTable.C.

Referenced by cellTable::operator=().

Here is the caller graph for this function:

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

Assign from Map<dictionary>.

Definition at line 383 of file cellTable.C.

References cellTable::operator=().

Here is the call graph for this function:

void operator= ( const polyMesh mesh  ) 

Assign from cellZones.

Definition at line 390 of file cellTable.C.

References cellTable::operator=().

Here is the call graph for this function:

void addCellZones ( polyMesh mesh,
const labelList tableIds 
) const

Classify tableIds into cellZones according to the cellTable.

Definition at line 436 of file cellTable.C.

void combine ( const dictionary mapDict,
labelList tableIds 
)

Combine tableIds together.

each dictionary entry is a wordList

Definition at line 502 of file cellTable.C.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd