MCPcopy Create free account
hub / github.com/Cantera/cantera / getElementName

Function getElementName

src/thermo/Elements.cpp:314–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314string getElementName(const string& ename)
315{
316 string symbol = trimCopy(ename);
317 for (const auto& atom : atomicWeightTable) {
318 if (symbol == atom.symbol) {
319 return atom.fullName;
320 }
321 }
322 for (const auto& atom : isotopeWeightTable) {
323 if (symbol == atom.symbol) {
324 return atom.fullName;
325 }
326 }
327 throw CanteraError("getElementName", "element not found: " + ename);
328}
329
330string getElementName(int atomicNumber)
331{

Callers 1

getElementWeightFunction · 0.85

Calls 4

trimCopyFunction · 0.85
CanteraErrorClass · 0.85
numElementsDefinedFunction · 0.85
IndexErrorClass · 0.85

Tested by

no test coverage detected