Cantera 2.6.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Solution Class Reference

A container class holding managers for all pieces defining a phase. More...

#include <Solution.h>

Inheritance diagram for Solution:
[legend]
Collaboration diagram for Solution:
[legend]

Public Member Functions

 Solution (const Solution &)=delete
 
Solutionoperator= (const Solution &)=delete
 
std::string name () const
 Return the name of this Solution object. More...
 
void setName (const std::string &name)
 Set the name of this Solution object. More...
 
virtual void setThermo (shared_ptr< ThermoPhase > thermo)
 Set the ThermoPhase object. More...
 
virtual void setKinetics (shared_ptr< Kinetics > kinetics)
 Set the Kinetics object. More...
 
virtual void setTransport (shared_ptr< Transport > transport)
 Set the Transport object. More...
 
shared_ptr< ThermoPhasethermo ()
 Accessor for the ThermoPhase pointer. More...
 
shared_ptr< Kineticskinetics ()
 Accessor for the Kinetics pointer. More...
 
shared_ptr< Transporttransport ()
 Accessor for the Transport pointer. More...
 
void addAdjacent (shared_ptr< Solution > adjacent)
 Add a phase adjacent to this phase. More...
 
shared_ptr< Solutionadjacent (size_t i)
 Get the Solution object for an adjacent phase by index. More...
 
shared_ptr< Solutionadjacent (const std::string &name)
 Get the Solution object for an adjacent phase by name. More...
 
size_t nAdjacent () const
 Get the number of adjacent phases. More...
 
AnyMap parameters (bool withInput=false) const
 
const AnyMapheader () const
 Access input data associated with header definition. More...
 
AnyMapheader ()
 
const std::string source () const
 Retrieve source used for object creation; usually an input file name. More...
 
void setSource (const std::string &source)
 Overwrite source (only required if object is not created using newSolution) More...
 

Static Public Member Functions

static shared_ptr< Solutioncreate ()
 Create an empty Solution object. More...
 

Protected Attributes

shared_ptr< ThermoPhasem_thermo
 ThermoPhase manager. More...
 
shared_ptr< Kineticsm_kinetics
 Kinetics manager. More...
 
shared_ptr< Transportm_transport
 Transport manager. More...
 
std::vector< shared_ptr< Solution > > m_adjacent
 Adjacent phases, for access by index. More...
 
std::map< std::string, shared_ptr< Solution > > m_adjacentByName
 Adjacent phases, for access by name. More...
 
AnyMap m_header
 Additional input fields; usually from a YAML input file. More...
 

Detailed Description

A container class holding managers for all pieces defining a phase.

Definition at line 20 of file Solution.h.

Constructor & Destructor Documentation

◆ Solution()

Solution ( )
protected

Definition at line 22 of file Solution.cpp.

◆ ~Solution()

virtual ~Solution ( )
inlinevirtual

Definition at line 26 of file Solution.h.

Member Function Documentation

◆ create()

static shared_ptr< Solution > create ( )
inlinestatic

Create an empty Solution object.

Definition at line 31 of file Solution.h.

Referenced by Cantera::newSolution().

◆ name()

std::string name ( ) const

Return the name of this Solution object.

Definition at line 24 of file Solution.cpp.

References Solution::m_thermo.

Referenced by Solution::addAdjacent(), Solution::adjacent(), and Solution::setName().

◆ setName()

void setName ( const std::string &  name)

Set the name of this Solution object.

Definition at line 33 of file Solution.cpp.

References Solution::m_thermo, and Solution::name().

◆ setThermo()

void setThermo ( shared_ptr< ThermoPhase thermo)
virtual

Set the ThermoPhase object.

Reimplemented in Interface.

Definition at line 42 of file Solution.cpp.

References Solution::m_thermo, and Solution::thermo().

Referenced by Interface::setThermo().

◆ setKinetics()

void setKinetics ( shared_ptr< Kinetics kinetics)
virtual

Set the Kinetics object.

Reimplemented in Interface.

Definition at line 46 of file Solution.cpp.

References Solution::kinetics(), and Solution::m_kinetics.

Referenced by Interface::setKinetics().

◆ setTransport()

void setTransport ( shared_ptr< Transport transport)
virtual

Set the Transport object.

Definition at line 50 of file Solution.cpp.

References Solution::m_transport, and Solution::transport().

◆ thermo()

shared_ptr< ThermoPhase > thermo ( )
inline

Accessor for the ThermoPhase pointer.

Definition at line 51 of file Solution.h.

References Solution::m_thermo.

Referenced by Solution::setThermo().

◆ kinetics()

shared_ptr< Kinetics > kinetics ( )
inline

Accessor for the Kinetics pointer.

Definition at line 56 of file Solution.h.

References Solution::m_kinetics.

Referenced by Solution::setKinetics().

◆ transport()

shared_ptr< Transport > transport ( )
inline

Accessor for the Transport pointer.

Definition at line 61 of file Solution.h.

References Solution::m_transport.

Referenced by Solution::setTransport().

◆ addAdjacent()

void addAdjacent ( shared_ptr< Solution adjacent)

Add a phase adjacent to this phase.

Usually this means a higher-dimensional phase that participates in reactions in this phase.

Definition at line 54 of file Solution.cpp.

References Solution::adjacent(), Solution::m_adjacent, Solution::m_adjacentByName, Solution::m_thermo, and Solution::name().

◆ adjacent() [1/2]

shared_ptr< Solution > adjacent ( size_t  i)
inline

Get the Solution object for an adjacent phase by index.

Definition at line 70 of file Solution.h.

References Solution::m_adjacent.

Referenced by Solution::addAdjacent().

◆ adjacent() [2/2]

shared_ptr< Solution > adjacent ( const std::string &  name)
inline

Get the Solution object for an adjacent phase by name.

Definition at line 75 of file Solution.h.

References Solution::m_adjacentByName, and Solution::name().

◆ nAdjacent()

size_t nAdjacent ( ) const
inline

Get the number of adjacent phases.

Definition at line 80 of file Solution.h.

References Solution::m_adjacent.

◆ parameters()

AnyMap parameters ( bool  withInput = false) const

Definition at line 73 of file Solution.cpp.

◆ header() [1/2]

const AnyMap & header ( ) const

Access input data associated with header definition.

Definition at line 102 of file Solution.cpp.

References Solution::m_header.

◆ header() [2/2]

AnyMap & header ( )

Definition at line 107 of file Solution.cpp.

◆ source()

const std::string source ( ) const

Retrieve source used for object creation; usually an input file name.

Definition at line 112 of file Solution.cpp.

References AnyBase::getMetadata(), Solution::m_header, and Solution::source().

Referenced by Solution::setSource(), and Solution::source().

◆ setSource()

void setSource ( const std::string &  source)

Overwrite source (only required if object is not created using newSolution)

Definition at line 117 of file Solution.cpp.

References Solution::m_header, AnyMap::setMetadata(), and Solution::source().

Member Data Documentation

◆ m_thermo

shared_ptr<ThermoPhase> m_thermo
protected

◆ m_kinetics

shared_ptr<Kinetics> m_kinetics
protected

Kinetics manager.

Definition at line 98 of file Solution.h.

Referenced by Solution::kinetics(), and Solution::setKinetics().

◆ m_transport

shared_ptr<Transport> m_transport
protected

Transport manager.

Definition at line 99 of file Solution.h.

Referenced by Solution::setTransport(), and Solution::transport().

◆ m_adjacent

std::vector<shared_ptr<Solution> > m_adjacent
protected

Adjacent phases, for access by index.

Definition at line 102 of file Solution.h.

Referenced by Solution::addAdjacent(), Solution::adjacent(), and Solution::nAdjacent().

◆ m_adjacentByName

std::map<std::string, shared_ptr<Solution> > m_adjacentByName
protected

Adjacent phases, for access by name.

Definition at line 105 of file Solution.h.

Referenced by Solution::addAdjacent(), and Solution::adjacent().

◆ m_header

AnyMap m_header
protected

Additional input fields; usually from a YAML input file.

Definition at line 107 of file Solution.h.

Referenced by Solution::header(), Solution::setSource(), and Solution::source().


The documentation for this class was generated from the following files: