-
-
Notifications
You must be signed in to change notification settings - Fork 374
Create SolutionBase object in C++ #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0aa5723
[Base] create SolutionBase object in C++
bc04a96
[Base] add unit test probing methods of C++ SolutionBase
ischoegl 8036169
[Base] link managers back to SolutionBase
ischoegl bc6ff91
[Base] remove redundant unique_name attribute
1168132
[Base] associate phase ID with SolutionBase object
04dced2
[Base] break out thermo/kinetics manager types to Python
b643a63
[Base] replace Solution property `ID` by `phase` in Python
93d9bd6
[Base] clarify keyword arguments of _SolutionBase initializers
ee484ee
[Base] update docstrings for Solution and Interface objects
ec6f5e0
[Base] use FutureWarning for deprecated keywords
cf29e6b
[Base] rename Base.h/.cpp to SolutionBase.h/.cpp
5932a24
[Input] rename --id to --phase in ck2yaml options
ischoegl 02175a3
[Thermo] address discussion and review comments
ce70714
[Thermo] replace 'phase_id' by 'name'
891ce3e
[Thermo] deprecate Phase::id and Phase::setID
9696e55
[Thermo] deprecate name/id support in Phase::speciesIndex
6190b4f
[Thermo] address code review comments
ischoegl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,70 @@ | ||
//! @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 | ||
}; | ||
|
||
} | ||
#endif |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.