167 string s3 = ename.substr(0,3);
168 for (
int i = 0; i < num; i++) {
170 return (
aWTable[i].atomicWeight);
173 throw CanteraError(
"LookupWtElements",
"element not found");
180 string s3 = ename.substr(0,3);
181 for (
int i = 0; i < num; i++) {
183 return (
aWTable[i].atomicWeight);
186 throw CanteraError(
"LookupWtElements",
"element not found");
208 "elements cannot be added after species.") {}
215 Elements::Elements() :
217 m_elementsFrozen(false),
233 throw CanteraError(
"~Elements",
"numSubscribers not zero");
239 m_elementsFrozen(false),
247 if (&right ==
this) {
288 for (
int i = 0; i <
m_mm; i++) {
313 "Elements::entropy298",
314 "Entropy at 298 K of element is unknown");
371 if (weight == -12345.0) {
395 doublereal weight = atof(e[
"atomicWt"].c_str());
396 string symbol = e[
"name"];
415 doublereal weight,
int atomicNumber, doublereal entropy298,
418 if (weight == -12345.0) {
456 "Duplicate Elements (" + symbol +
") have different weights");
468 doublereal weight = 0.0;
470 weight = atof(
stripws(e[
"atomicWt"]).c_str());
474 anum = atoi(
stripws(e[
"atomicNumber"]).c_str());
476 string symbol = e[
"name"];
527 if (! phase.
hasChild(
"elementArray")) {
529 "phase xml node doesn't have \"elementArray\" XML Node");
532 vector<string> enames;
536 string element_database =
"elements.xml";
538 element_database = elements[
"datasrc"];
548 local_db = &root.
child(
"ctml/elementData");
552 int nel =
static_cast<int>(enames.size());
556 for (i = 0; i < nel; i++) {
569 throw CanteraError(
"addElementsFromXML",
"no data for element "