Go to the documentation of this file.
27 materialNames_ = getVal<wordVector>(
"materials");
29 if(materialNames_.size() != numShapes() )
32 " number of elements in materials and names are not the same in "<< globalName()<<
endl;
51 if( !readFromDictionary2() )
57 if(!findPropertyIds())
69 if( !dict.
add(
"materials", materialNames_) )
72 " Error in writing materials to dictionary "<< dict.
globalName()<<
endl;
uint32Vector shapePropertyIds_
list of property ids of shapes (index)
#define fatalExit
Fatal exit.
virtual word globalName() const
global name of entry, separated with dots
shape(const word &fileName, repository *owner, const property &prop)
bool add(const word &keyword, const float &v)
add a float dataEntry
iOstream & endl(iOstream &os)
Add newline and flush stream.
bool writeToDict(dictionary &dict) const override
const property & property_
property of materials
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
#define ForAll(i, container)
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 holds the pure properties of materials.
wordVector materialNames_
list of material names
virtual bool writeToDict(dictionary &dict) const
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...
bool readFromDictionary2()