43 class Solution :
public std::enable_shared_from_this<Solution>
54 static shared_ptr<Solution>
create() {
55 return shared_ptr<Solution>(
new Solution );
112 AnyMap parameters(
bool withInput=
false)
const;
119 const string source()
const;
187 shared_ptr<Solution>
newSolution(
const string& infile,
const string& name,
188 const string& transport,
const vector<string>& adjacent);
204 shared_ptr<Solution>
newSolution(
const string& infile,
205 const string& name=
"",
206 const string& transport=
"",
207 const vector<shared_ptr<Solution>>& adjacent={});
229 const AnyMap& phaseNode,
const AnyMap& rootNode=AnyMap(),
230 const string& transport=
"",
231 const vector<shared_ptr<Solution>>& adjacent={},
232 const map<string, shared_ptr<Solution>>& related={});
A map of string keys to values whose type can vary at runtime.
A container class for chemically-reacting solutions.
shared_ptr< ThermoPhase > thermo()
Accessor for the ThermoPhase pointer.
vector< shared_ptr< Solution > > m_adjacent
Adjacent phases, for access by index.
void removeChangedCallback(void *id)
Remove the callback function associated with the specified object.
shared_ptr< Kinetics > kinetics()
Accessor for the Kinetics pointer.
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)
void addAdjacent(shared_ptr< Solution > adjacent)
Add a phase adjacent to this phase.
shared_ptr< Transport > transport()
Accessor for the Transport pointer.
void setName(const string &name)
Set the name of this Solution object.
shared_ptr< Kinetics > m_kinetics
Kinetics manager.
void setTransportModel(const string &model="")
Set the Transport object by name.
shared_ptr< Solution > adjacent(size_t i)
Get the Solution object for an adjacent phase by index.
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...
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< Solution > adjacent(const string &name)
Get the Solution object for an adjacent phase by name.
const AnyMap & header() const
Access input data associated with header definition.
static shared_ptr< Solution > create()
Create an empty Solution object.
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.
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.