Go to the documentation of this file.
20 #ifndef __property_hpp__
21 #define __property_hpp__
181 if(
auto[iter, found] =
nameIndex_.findIf(name); found )
211 #endif // __property_hpp__
uniquePtr< dictionary > dict_
pointer to the dictionary, if it is constructed from a file/dictionary
realVector densities_
list of density of materials
bool makeNameIndex()
creates a mapp
wordVector materials_
list of name of materials
bool writeDictionary(dictionary &dict) const
write to dict
const auto & dict() const
Return dictionary.
const auto & densities() const
Return the list of densities.
const word & material(uint32 i) const
Return the material name of material i.
bool read(const dictionary &dict)
Read from dictionary.
const auto & materials() const
Return list of material names.
bool readDictionary(const dictionary &dict)
read from dict
bool material(uint32 i, word &name) const
Get the name of material i.
wordHashMap< uint32 > nameIndex_
rapid mapping from name to index
property & operator=(const property &)=default
Default copy assignment.
bool nameToIndex(const word &name, uint32 &idx) const
Get the name of material in index idx Return true, if the name found, otherwise false.
~property()=default
Default destructor.
auto numMaterials() const
Return number of materials.
property()
Emptry constructor, used for reading from a file.
TypeInfoNV("property")
Type info.
property holds the pure properties of materials.
bool density(uint32 i, real &rho) const
Get the density of material i.
uint32 numMaterials_
number of materials
real density(uint32 i) const
Return density of material i.
bool write(dictionary &dict) const
Write to dictionary.