[Thermo] Add accessor for Species objects
This commit is contained in:
parent
8022e9e01e
commit
2a50dc50f7
2 changed files with 8 additions and 0 deletions
|
|
@ -738,6 +738,9 @@ public:
|
|||
doublereal charge = 0.0,
|
||||
doublereal size = 1.0);
|
||||
|
||||
//! Return the Species object for the named species.
|
||||
const Species& species(const std::string& name) const;
|
||||
|
||||
//! Set behavior when adding a species containing undefined elements to just
|
||||
//! skip the species.
|
||||
void ignoreUndefinedElements();
|
||||
|
|
|
|||
|
|
@ -946,6 +946,11 @@ void Phase::addUniqueSpecies(const std::string& name_, const doublereal* comp,
|
|||
addSpecies(name_, comp, charge_, size_);
|
||||
}
|
||||
|
||||
const Species& Phase::species(const std::string& name) const
|
||||
{
|
||||
return getValue(m_species, name);
|
||||
}
|
||||
|
||||
void Phase::ignoreUndefinedElements() {
|
||||
m_undefinedElementBehavior = UndefElement::ignore;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue