32 (c.GetHandlerStore().GetHandler(
"addmaterial"));
33 if (!addmatHand) std::abort();
36 (c.GetHandlerStore().GetHandler(
"natoms"));
37 if (!natomsHand) std::abort();
40 (c.GetHandlerStore().GetHandler(
"fractionmass"));
41 if (!fractionsHand) std::abort();
50 for (child=t->getFirstChild();child!=0;child=child->getNextSibling())
52 if (child->getNodeType()==DOMNode::ELEMENT_NODE) {
53 parser.elementLoop(c, child);
57 std::vector<std::string> names = addmatHand->
GetNames();
58 std::vector<int> natoms = natomsHand->
GetNatoms();
59 std::vector<double> fractions = fractionsHand->
GetFractions();
65 for (
unsigned int i=0;i<natoms.size();i++)
67 m->AddElement(c.GetMaterialStore(), names[i]);
71 else if (!fractions.empty())
75 for (
unsigned int i=0;i<fractions.size();i++)
77 m->AddMaterial(c.GetMaterialStore(), names[i]);
78 m->Fraction(fractions[i]);
82 std::cout<<
"Something wrong: "<<name<<
" neither molecule nor mixture!!!"<<std::endl;