Go to the documentation of this file.
35 ") is not equal to number of elements in densities ("<<
densities_.
size()<<
46 if(!add(
"materials", materials_))
49 " error in writing materials to dictionary "<< globalName()<<
endl;
53 if(!add(
"densities", densities_))
56 " error in writing densities to dictionary "<< globalName()<<
endl;
69 for(
auto const& nm:materials_)
71 if(!nameIndex_.insertIf(nm, i))
74 " repeated material name in the list of materials: " << materials_;
80 numMaterials_ =
static_cast<uint32>(materials_.size());
104 materials_(materials),
105 densities_(densities)
108 if(!writeDictionary())
116 "error in the input parameters of constructor. \n";
123 const word& fileName,
140 if(!readDictionary())
148 "error in dictionary "<< globalName()<<
endl;
156 const word &fileName,
172 if(!readDictionary())
180 "error in dictionary "<< globalName()<<
endl;
realVector densities_
list of density of materials
bool makeNameIndex()
creates a mapp
bool readDictionary()
read from dict
#define fatalExit
Fatal exit.
wordVector materials_
list of name of materials
property(const word &fileName, repository *owner=nullptr)
virtual word globalName() const
global name of entry, separated with dots
auto size() const
Size of the vector.
iOstream & endl(iOstream &os)
Add newline and flush stream.
Manages file pathes, manupulate and combines them.
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
bool writeDictionary()
write to dict