The cellTable persistent data saved as a Map<dictionary>. More...
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< word > | names () const |
Map< word > | names (const wordRes &patterns) const |
Map< word > | selectType (const word &materialType) const |
Map< word > | fluids () const |
Map< word > | shells () const |
Map< word > | solids () const |
Map< word > | materialTypes () 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) |
![]() | |
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 | |
![]() | |
typedef Map< T > | this_type |
typedef HashTable< T, label, Hash< label > > | parent_type |
using | iterator = typename parent_type::iterator |
using | const_iterator = typename parent_type::const_iterator |
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.
Definition at line 76 of file cellTable.H.
cellTable | ( | ) |
Definition at line 98 of file cellTable.C.
cellTable | ( | const objectRegistry & | registry, |
const word & | name = "cellTable" , |
||
const fileName & | instance = "constant" |
||
) |
Definition at line 105 of file cellTable.C.
References Foam::name().
|
default |
Foam::label append | ( | const dictionary & | dict | ) |
Definition at line 119 of file cellTable.C.
References dict, forAllConstIters(), and insert().
Foam::label findIndex | ( | const word & | name | ) | const |
Definition at line 195 of file cellTable.C.
References forAllConstIters(), Foam::name(), and word::null.
Foam::word name | ( | const label | id | ) | const |
Definition at line 181 of file cellTable.C.
References Foam::name().
Foam::Map< Foam::word > names | ( | ) | const |
Definition at line 135 of file cellTable.C.
References forAllConstIters(), and Foam::name().
Foam::Map< Foam::word > names | ( | const wordRes & | patterns | ) | const |
Definition at line 157 of file cellTable.C.
References forAllConstIters(), wordRes::match(), and Foam::name().
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().
Foam::Map< Foam::word > fluids | ( | ) | const |
Definition at line 262 of file cellTable.C.
Referenced by reader::fluids().
Foam::Map< Foam::word > shells | ( | ) | const |
Definition at line 274 of file cellTable.C.
Foam::Map< Foam::word > solids | ( | ) | const |
Definition at line 268 of file cellTable.C.
Referenced by reader::solids().
Foam::Map< Foam::word > materialTypes | ( | ) | const |
Definition at line 214 of file cellTable.C.
References forAllConstIters().
void setMaterial | ( | const label | id, |
const word & | matlType | ||
) |
Definition at line 281 of file cellTable.C.
Referenced by STARCDMeshReader::readCells().
void setName | ( | const label | id, |
const word & | name | ||
) |
Definition at line 287 of file cellTable.C.
References Foam::name().
Referenced by STARCDMeshReader::readCells().
void setName | ( | const label | id | ) |
Definition at line 293 of file cellTable.C.
References Foam::ListOps::find(), found, and Foam::name().
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.
void writeDict | ( | const objectRegistry & | registry, |
const word & | name = "cellTable" , |
||
const fileName & | instance = "constant" |
||
) | const |
Definition at line 340 of file cellTable.C.
References Foam::endl(), Foam::Info, Foam::name(), IOobject::name(), IOobject::NO_READ, IOobject::NO_WRITE, IOobject::note(), IOobject::objectPath(), os(), and IOobject::writeHeader().
void operator= | ( | const cellTable & | rhs | ) |
Definition at line 373 of file cellTable.C.
References Map::operator=().
void operator= | ( | const Map< dictionary > & | rhs | ) |
Definition at line 380 of file cellTable.C.
References Map::operator=().
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=().
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().
void combine | ( | const dictionary & | mapDict, |
labelList & | tableIds | ||
) |
Definition at line 499 of file cellTable.C.
References Foam::endl(), erase(), Foam::findIndex(), forAllConstIters(), Foam::identity(), Foam::Info, Foam::inplaceRenumber(), wordRes::match(), Foam::max(), Foam::min(), and Foam::PtrListOps::names().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.