-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Thermo] address discussion and review comments
* rename C++ object to 'Solution' (from 'SolutionBase') * remove 'phaseID' from 'Solution' ('id' remains assigned to 'Phase') * remove 'type' from C++ object (no polymorphism anticipated) * assign 'name' to 'Solution' (link back from 'Phase' until deprecated) * clarify 'phase' as 'phase_id' in Python interface * address various feedback in review comments
- Loading branch information
Showing
17 changed files
with
272 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
//! @file Solution.h | ||
|
||
// This file is part of Cantera. See License.txt in the top-level directory or | ||
// at https://cantera.org/license.txt for license and copyright information. | ||
|
||
#ifndef CT_SOLUTION_H | ||
#define CT_SOLUTION_H | ||
|
||
#include "cantera/base/ctexceptions.h" | ||
|
||
namespace Cantera | ||
{ | ||
|
||
class ThermoPhase; | ||
class Kinetics; | ||
class Transport; | ||
|
||
//! A container class holding managers for all pieces defining a phase | ||
class Solution : public std::enable_shared_from_this<Solution> | ||
{ | ||
private: | ||
Solution(); | ||
|
||
public: | ||
~Solution() {} | ||
Solution(const Solution&) = delete; | ||
Solution& operator=(const Solution&) = delete; | ||
|
||
static shared_ptr<Solution> create() { | ||
return shared_ptr<Solution>( new Solution ); | ||
} | ||
|
||
//! Return the name of this Solution object | ||
std::string name() const; | ||
|
||
//! Set the name of this Solution object | ||
void setName(const std::string& name); | ||
|
||
//! Set the ThermoPhase object | ||
void setThermoPhase(shared_ptr<ThermoPhase> thermo); | ||
|
||
//! Set the Kinetics object | ||
void setKinetics(shared_ptr<Kinetics> kinetics); | ||
|
||
//! Set the Transport object | ||
void setTransport(shared_ptr<Transport> transport); | ||
|
||
//! Accessor for the ThermoPhase object | ||
ThermoPhase& thermo() { | ||
return *m_thermo; | ||
} | ||
|
||
//! Accessor for the Kinetics object | ||
Kinetics& kinetics() { | ||
return *m_kinetics; | ||
} | ||
|
||
//! Accessor for the Transport object | ||
Transport& transport() { | ||
return *m_transport; | ||
} | ||
|
||
protected: | ||
shared_ptr<ThermoPhase> m_thermo; //! ThermoPhase manager | ||
shared_ptr<Kinetics> m_kinetics; //! Kinetics manager | ||
shared_ptr<Transport> m_transport; //! Transport manager | ||
|
||
std::string m_name; //! name of Solution object | ||
}; | ||
|
||
} | ||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.