43class Solution :
public std::enable_shared_from_this<Solution>
49 virtual ~Solution() =
default;
50 Solution(
const Solution&) =
delete;
51 Solution& operator=(
const Solution&) =
delete;
54 static shared_ptr<Solution>
create() {
55 return shared_ptr<Solution>(
new Solution );
71 shared_ptr<Solution>
clone(
const vector<shared_ptr<Solution>>&
adjacent={},
72 bool withKinetics=
true,
bool withTransport=
true)
const;
133 throw IndexError(
"Solution::adjacentName",
"m_adjacent",
139 AnyMap parameters(
bool withInput=
false)
const;
146 const string source()
const;
214shared_ptr<Solution>
newSolution(
const string& infile,
const string& name,
215 const string& transport,
const vector<string>& adjacent);
231shared_ptr<Solution>
newSolution(
const string& infile,
232 const string& name=
"",
233 const string& transport=
"default",
234 const vector<shared_ptr<Solution>>& adjacent={});
256 const AnyMap& phaseNode,
const AnyMap& rootNode=AnyMap(),
257 const string& transport=
"default",
258 const vector<shared_ptr<Solution>>& adjacent={},
259 const map<string, shared_ptr<Solution>>& related={});
A map of string keys to values whose type can vary at runtime.
A base class for managing the lifetime of an external object, such as a Python object used by a Deleg...
An array index is out of range.
Public interface for kinetics managers.
static shared_ptr< Solution > create()
Create an empty Solution object.
vector< shared_ptr< Solution > > m_adjacent
Adjacent phases, for access by index.
string transportModel()
Retrieve transport model name.
string adjacentName(size_t i) const
Get the name of an adjacent phase by index.
void removeChangedCallback(void *id)
Remove the callback function associated with the specified object.
map< string, shared_ptr< Solution > > m_adjacentByName
Adjacent phases, for access by name.
void setSource(const string &source)
Overwrite source (only required if object is not created using newSolution)
shared_ptr< Kinetics > kinetics()
Accessor for the Kinetics pointer.
void setTransportModel(const string &model="default")
Set the Transport object by name.
void addAdjacent(shared_ptr< Solution > adjacent)
Add a phase adjacent to this phase.
void setName(const string &name)
Set the name of this Solution object.
shared_ptr< Kinetics > m_kinetics
Kinetics manager.
virtual void setThermo(shared_ptr< ThermoPhase > thermo)
Set the ThermoPhase object.
map< string, shared_ptr< ExternalHandle > > m_externalHandles
Wrappers for this Solution object in extension languages, for evaluation of user-defined reaction rat...
shared_ptr< ThermoPhase > m_thermo
ThermoPhase manager.
void registerChangedCallback(void *id, const function< void()> &callback)
Register a function to be called if any of the Solution's thermo, kinetics, or transport objects is r...
shared_ptr< Solution > clone(const vector< shared_ptr< Solution > > &adjacent={}, bool withKinetics=true, bool withTransport=true) const
Create a new Solution object with cloned ThermoPhase, Kinetics, and Transport objects that use the sa...
AnyMap m_header
Additional input fields; usually from a YAML input file.
size_t nAdjacent() const
Get the number of adjacent phases.
void holdExternalHandle(const string &name, shared_ptr< ExternalHandle > handle)
Store a handle to a wrapper for this Solution object from an external language interface (for example...
map< void *, function< void()> > m_changeCallbacks
Callback functions that are invoked when the therm, kinetics, or transport members of the Solution ar...
const string source() const
Retrieve source used for object creation; usually an input file name.
virtual void setTransport(shared_ptr< Transport > transport)
Set the Transport object directly.
shared_ptr< ThermoPhase > thermo()
Accessor for the ThermoPhase pointer.
shared_ptr< Transport > transport()
Accessor for the Transport pointer.
const AnyMap & header() const
Access input data associated with header definition.
shared_ptr< Solution > adjacent(size_t i)
Get the Solution object for an adjacent phase by index.
shared_ptr< Transport > m_transport
Transport manager.
virtual void setKinetics(shared_ptr< Kinetics > kinetics)
Set the Kinetics object.
shared_ptr< ExternalHandle > getExternalHandle(const string &name) const
Get the handle for a wrapper for this Solution object from an external language interface.
string name() const
Return the name of this Solution object.
Base class for a phase with thermodynamic properties.
Base class for transport property managers.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
shared_ptr< Solution > newSolution(const string &infile, const string &name, const string &transport, const vector< shared_ptr< Solution > > &adjacent)
Create and initialize a new Solution manager from an input file.
Namespace for the Cantera kernel.