property holds the pure properties of materials. More...
Public Member Functions | |
TypeInfoNV ("property") | |
Type info. More... | |
property () | |
Emptry constructor, used for reading from a file. More... | |
property (const wordVector &materials, const realVector &densities) | |
Constructe from materials and densities. More... | |
property (const fileSystem &file) | |
Construct from file. More... | |
property (const dictionary &dict) | |
Construct from dictionary dict. More... | |
property (const property &)=default | |
Default copy. More... | |
property (property &&)=default | |
Default move. More... | |
property & | operator= (const property &)=default |
Default copy assignment. More... | |
property & | operator= (property &&)=default |
Default move assignment. More... | |
~property ()=default | |
Default destructor. More... | |
const auto & | dict () const |
Return dictionary. More... | |
auto | numMaterials () const |
Return number of materials. More... | |
const auto & | materials () const |
Return list of material names. More... | |
const auto & | densities () const |
Return the list of densities. More... | |
const word & | material (uint32 i) const |
Return the material name of material i. More... | |
bool | material (uint32 i, word &name) const |
Get the name of material i. More... | |
real | density (uint32 i) const |
Return density of material i. More... | |
bool | density (uint32 i, real &rho) const |
Get the density of material i. More... | |
bool | nameToIndex (const word &name, uint32 &idx) const |
Get the name of material in index idx Return true, if the name found, otherwise false. More... | |
bool | read (const dictionary &dict) |
Read from dictionary. More... | |
bool | write (dictionary &dict) const |
Write to dictionary. More... | |
Protected Member Functions | |
bool | readDictionary (const dictionary &dict) |
read from dict More... | |
bool | writeDictionary (dictionary &dict) const |
write to dict More... | |
bool | makeNameIndex () |
creates a mapp More... | |
Protected Attributes | |
uniquePtr< dictionary > | dict_ = nullptr |
pointer to the dictionary, if it is constructed from a file/dictionary More... | |
wordVector | materials_ |
list of name of materials More... | |
realVector | densities_ |
list of density of materials More... | |
wordHashMap< uint32 > | nameIndex_ |
rapid mapping from name to index More... | |
uint32 | numMaterials_ = 0 |
number of materials More... | |
property holds the pure properties of materials.
This class holds a list of all materials name and their densities that are used in the simulation: for walls and particles.
Definition at line 40 of file property.hpp.
|
inline |
Emptry constructor, used for reading from a file.
Definition at line 82 of file property.hpp.
property | ( | const wordVector & | materials, |
const realVector & | densities | ||
) |
Constructe from materials and densities.
Definition at line 97 of file property.cpp.
References fatalErrorInFunction, and fatalExit.
property | ( | const fileSystem & | file | ) |
Construct from file.
Definition at line 114 of file property.cpp.
References fatalExit, ioErrorInFile, IOstream::lineNumber(), and Istream::name().
property | ( | const dictionary & | dict | ) |
|
default |
Default destructor.
|
protected |
read from dict
Definition at line 26 of file property.cpp.
References pFlow::endl(), fatalErrorInFunction, dictionary::getVal(), dictionary::globalName(), and Vector< T, Allocator >::size().
Referenced by property::read().
|
protected |
write to dict
Definition at line 54 of file property.cpp.
References dictionary::add(), pFlow::endl(), fatalErrorInFunction, and dictionary::globalName().
Referenced by property::write().
|
protected |
creates a mapp
Definition at line 76 of file property.cpp.
References fatalErrorInFunction, property::materials_, property::nameIndex_, property::numMaterials_, and Vector< T, Allocator >::size().
TypeInfoNV | ( | "property" | ) |
Type info.
|
inline |
Return dictionary.
Definition at line 112 of file property.hpp.
References property::dict_.
Referenced by property::read(), and property::write().
|
inline |
Return number of materials.
Definition at line 118 of file property.hpp.
References property::numMaterials_.
|
inline |
Return list of material names.
Definition at line 124 of file property.hpp.
References property::materials_.
|
inline |
Return the list of densities.
Definition at line 129 of file property.hpp.
References property::densities_.
Return the material name of material i.
Definition at line 134 of file property.hpp.
References property::materials_.
Referenced by property::material().
Get the name of material i.
Return true, if i is in the range and otherwise false
Definition at line 141 of file property.hpp.
References property::material(), and property::numMaterials_.
Return density of material i.
Definition at line 156 of file property.hpp.
References property::densities_.
Referenced by property::density().
Get the density of material i.
Return true, if i is in the range and otherwise false
Definition at line 163 of file property.hpp.
References property::density(), and property::numMaterials_.
Get the name of material in index idx Return true, if the name found, otherwise false.
Definition at line 179 of file property.hpp.
References property::nameIndex_.
Referenced by geometry::findPropertyId().
|
inline |
Read from dictionary.
Definition at line 196 of file property.hpp.
References property::dict(), and property::readDictionary().
|
inline |
Write to dictionary.
Definition at line 202 of file property.hpp.
References property::dict(), and property::writeDictionary().
|
protected |
pointer to the dictionary, if it is constructed from a file/dictionary
Definition at line 47 of file property.hpp.
Referenced by property::dict().
|
protected |
list of name of materials
Definition at line 50 of file property.hpp.
Referenced by property::makeNameIndex(), property::material(), and property::materials().
|
protected |
list of density of materials
Definition at line 53 of file property.hpp.
Referenced by property::densities(), and property::density().
|
protected |
rapid mapping from name to index
Definition at line 56 of file property.hpp.
Referenced by property::makeNameIndex(), and property::nameToIndex().
|
protected |
number of materials
Definition at line 59 of file property.hpp.
Referenced by property::density(), property::makeNameIndex(), property::material(), and property::numMaterials().