[Thermo] address code review comments
This commit is contained in:
parent
63da219947
commit
dc66407cf2
5 changed files with 10 additions and 19 deletions
|
|
@ -61,9 +61,9 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
shared_ptr<ThermoPhase> m_thermo; //! ThermoPhase manager
|
||||
shared_ptr<Kinetics> m_kinetics; //! Kinetics manager
|
||||
shared_ptr<Transport> m_transport; //! Transport manager
|
||||
shared_ptr<ThermoPhase> m_thermo; //!< ThermoPhase manager
|
||||
shared_ptr<Kinetics> m_kinetics; //!< Kinetics manager
|
||||
shared_ptr<Transport> m_transport; //!< Transport manager
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,8 +68,8 @@ class Solution;
|
|||
* operate on a state vector, which is in general of length (2 + nSpecies()).
|
||||
* The first two entries of the state vector are temperature and density.
|
||||
*
|
||||
* A species name is referred to via "speciesName", which is unique within a
|
||||
* given phase. Note that within multiphase mixtures ("MultiPhase"), both a
|
||||
* A species name is referred to via speciesName(), which is unique within a
|
||||
* given phase. Note that within multiphase mixtures (MultiPhase()), both a
|
||||
* phase name/index as well as species name are required to access information
|
||||
* about a species in a particular phase. For surfaces, the species names are
|
||||
* unique among the phases.
|
||||
|
|
|
|||
|
|
@ -70,16 +70,13 @@ cdef class _SolutionBase:
|
|||
if isinstance(self, Transport):
|
||||
assert self.transport is not NULL
|
||||
|
||||
phase_name = pystr(self.base.name())
|
||||
name = kwargs.get('name')
|
||||
if name is not None:
|
||||
self.name = name
|
||||
else:
|
||||
self.name = phase_name
|
||||
|
||||
property name:
|
||||
"""
|
||||
The name assigned to this object. The default value corresponds
|
||||
The name assigned to this object. The default value corresponds
|
||||
to the CTI/XML/YAML input file phase entry.
|
||||
"""
|
||||
def __get__(self):
|
||||
|
|
|
|||
|
|
@ -145,8 +145,6 @@ cdef class Transport(_SolutionBase):
|
|||
self.transport = newTransportMgr(stringify(model), self.thermo)
|
||||
self._transport.reset(self.transport)
|
||||
|
||||
base_type = kwargs.pop('base_type', 'Transport')
|
||||
kwargs['base_type'] = base_type
|
||||
super().__init__(*args, **kwargs)
|
||||
self.base.setTransport(self._transport)
|
||||
|
||||
|
|
|
|||
|
|
@ -69,16 +69,14 @@ void Phase::setXMLdata(XML_Node& xmlPhase)
|
|||
std::string Phase::id() const
|
||||
{
|
||||
warn_deprecated("Phase::id",
|
||||
"To be removed after Cantera 2.5. "
|
||||
"Usage merged with 'Phase::name'");
|
||||
"To be removed after Cantera 2.5. Usage merged with 'Phase::name'");
|
||||
return m_id;
|
||||
}
|
||||
|
||||
void Phase::setID(const std::string& id_)
|
||||
{
|
||||
warn_deprecated("Phase::setID",
|
||||
"To be removed after Cantera 2.5. "
|
||||
"Usage merged with 'Phase::setName'");
|
||||
"To be removed after Cantera 2.5. Usage merged with 'Phase::setName'");
|
||||
m_id = id_;
|
||||
m_name = id_;
|
||||
}
|
||||
|
|
@ -215,10 +213,8 @@ size_t Phase::speciesIndex(const std::string& nameStr) const
|
|||
std::string sn = parseSpeciesName(nameStr, pn);
|
||||
if (pn == "" || pn == m_name || pn == m_id) {
|
||||
warn_deprecated("Phase::speciesIndex()",
|
||||
"Retrieval of species indices via "
|
||||
"'PhaseId:speciesName' or 'phaseName:"
|
||||
"speciesName to be removed "
|
||||
"after Cantera 2.5.");
|
||||
"Retrieval of species indices via 'PhaseId:speciesName' or "
|
||||
"'phaseName:speciesName' to be removed after Cantera 2.5.");
|
||||
it = m_speciesIndices.find(nameStr);
|
||||
if (it != m_speciesIndices.end()) {
|
||||
return it->second;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue