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

Method hasComponent

src/base/SolutionArray.cpp:652–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650}
651
652bool SolutionArray::hasComponent(const string& name) const
653{
654 if (m_extra->count(name)) {
655 // auxiliary data
656 return true;
657 }
658 if (m_sol->thermo()->speciesIndex(name) != npos) {
659 // species
660 return true;
661 }
662 if (name == "X" || name == "Y") {
663 // reserved names
664 return false;
665 }
666 // native state
667 return (m_sol->thermo()->nativeState().count(name));
668}
669
670AnyValue SolutionArray::getComponent(const string& name) const
671{

Callers 2

asArrayMethod · 0.80
fromArrayMethod · 0.80

Calls 3

speciesIndexMethod · 0.45
thermoMethod · 0.45
nativeStateMethod · 0.45

Tested by

no test coverage detected