[Thermo] Add index-based accessor for Species objects
This commit is contained in:
parent
882a4986da
commit
bde0f1466d
2 changed files with 8 additions and 0 deletions
|
|
@ -781,6 +781,9 @@ public:
|
|||
//! Return the Species object for the named species.
|
||||
shared_ptr<Species> species(const std::string& name) const;
|
||||
|
||||
//! Return the Species object for species whose index is *k*.
|
||||
shared_ptr<Species> species(size_t k) const;
|
||||
|
||||
//! Set behavior when adding a species containing undefined elements to just
|
||||
//! skip the species.
|
||||
void ignoreUndefinedElements();
|
||||
|
|
|
|||
|
|
@ -971,6 +971,11 @@ shared_ptr<Species> Phase::species(const std::string& name) const
|
|||
return getValue(m_species, name);
|
||||
}
|
||||
|
||||
shared_ptr<Species> Phase::species(size_t k) const
|
||||
{
|
||||
return species(m_speciesNames[k]);
|
||||
}
|
||||
|
||||
void Phase::ignoreUndefinedElements() {
|
||||
m_undefinedElementBehavior = UndefElement::ignore;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue