From debcff82d97890f660e387b710b4c479741da23c Mon Sep 17 00:00:00 2001 From: John Hewson Date: Tue, 15 Dec 2009 21:43:34 +0000 Subject: [PATCH] Added a pointer to a Transport object to the Phase class. This allows a ThermoPhase object to know what Transport object it is associated with. --- Cantera/src/thermo/Phase.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Cantera/src/thermo/Phase.h b/Cantera/src/thermo/Phase.h index 60c5ec06a..7395d9933 100644 --- a/Cantera/src/thermo/Phase.h +++ b/Cantera/src/thermo/Phase.h @@ -26,6 +26,7 @@ using namespace ctml; namespace Cantera { + class Transport; //forward declaration /** * @defgroup phases Models of Phases of Matter @@ -221,6 +222,9 @@ namespace Cantera { */ void setName(std::string nm); + //! Attach a Transport object pointer to this Phase + void setTransport( Transport* tr ) { m_trans = tr; } + //! Returns the index of the phase /*! * The index is used in the Python and matlab interfaces to @@ -434,6 +438,9 @@ namespace Cantera { */ void getMoleFractionsByName(compositionMap& x) const; + //! Get a Transport object pointer attached to this Phase + Transport* getTransport( ) { return m_trans; } + //! Return the mole fraction of a single species /*! * @param k String name of the species @@ -515,6 +522,13 @@ namespace Cantera { */ int m_index; + /** + * A Transport object pointer attached to this Phase + */ + Transport *m_trans; + + + private: //! This stores the initial state of the system