Cantera  3.1.0b1
Loading...
Searching...
No Matches
Path Class Reference

Detailed Description

Definition at line 81 of file ReactionPath.h.

Public Types

typedef map< size_t, double > rxn_path_map
 

Public Member Functions

 Path (SpeciesNode *begin, SpeciesNode *end)
 Constructor.
 
virtual ~Path ()
 Destructor.
 
void addReaction (size_t rxnNumber, double value, const string &label="")
 Add a reaction to the path.
 
const SpeciesNodebegin () const
 Upstream node.
 
SpeciesNodebegin ()
 
const SpeciesNodeend () const
 Downstream node.
 
SpeciesNodeend ()
 
SpeciesNodeotherNode (SpeciesNode *n)
 If n is one of the nodes this path connects, then the other node is returned.
 
double flow ()
 The total flow in this path.
 
void setFlow (double v)
 
int nReactions ()
 Number of reactions contributing to this path.
 
const rxn_path_map & reactionMap ()
 Map from reaction number to flow from that reaction in this path.
 
void writeLabel (std::ostream &s, double threshold=0.005)
 Write the label for a path connecting two species, indicating the percent of the total flow due to each reaction.
 

Protected Attributes

map< string, double > m_label
 
SpeciesNodem_a
 
SpeciesNodem_b
 
rxn_path_map m_rxn
 
double m_total = 0.0
 

Member Typedef Documentation

◆ rxn_path_map

typedef map<size_t, double> rxn_path_map

Definition at line 84 of file ReactionPath.h.

Constructor & Destructor Documentation

◆ Path()

Path ( SpeciesNode begin,
SpeciesNode end 
)

Constructor.

Construct a one-way path from begin to end.

Definition at line 43 of file ReactionPath.cpp.

◆ ~Path()

virtual ~Path ( )
inlinevirtual

Destructor.

Definition at line 92 of file ReactionPath.h.

Member Function Documentation

◆ addReaction()

void addReaction ( size_t  rxnNumber,
double  value,
const string &  label = "" 
)

Add a reaction to the path.

Increment the flow from this reaction, the total flow, and the flow associated with this label.

Definition at line 50 of file ReactionPath.cpp.

◆ begin() [1/2]

const SpeciesNode * begin ( ) const
inline

Upstream node.

Definition at line 101 of file ReactionPath.h.

◆ begin() [2/2]

SpeciesNode * begin ( )
inline

Definition at line 104 of file ReactionPath.h.

◆ end() [1/2]

const SpeciesNode * end ( ) const
inline

Downstream node.

Definition at line 109 of file ReactionPath.h.

◆ end() [2/2]

SpeciesNode * end ( )
inline

Definition at line 112 of file ReactionPath.h.

◆ otherNode()

SpeciesNode * otherNode ( SpeciesNode n)
inline

If n is one of the nodes this path connects, then the other node is returned.

Otherwise zero is returned.

Definition at line 120 of file ReactionPath.h.

◆ flow()

double flow ( )
inline

The total flow in this path.

Definition at line 125 of file ReactionPath.h.

◆ setFlow()

void setFlow ( double  v)
inline

Definition at line 128 of file ReactionPath.h.

◆ nReactions()

int nReactions ( )
inline

Number of reactions contributing to this path.

Definition at line 133 of file ReactionPath.h.

◆ reactionMap()

const rxn_path_map & reactionMap ( )
inline

Map from reaction number to flow from that reaction in this path.

Definition at line 138 of file ReactionPath.h.

◆ writeLabel()

void writeLabel ( std::ostream &  s,
double  threshold = 0.005 
)

Write the label for a path connecting two species, indicating the percent of the total flow due to each reaction.

Definition at line 59 of file ReactionPath.cpp.

Member Data Documentation

◆ m_label

map<string, double> m_label
protected

Definition at line 149 of file ReactionPath.h.

◆ m_a

SpeciesNode* m_a
protected

Definition at line 150 of file ReactionPath.h.

◆ m_b

SpeciesNode * m_b
protected

Definition at line 150 of file ReactionPath.h.

◆ m_rxn

rxn_path_map m_rxn
protected

Definition at line 151 of file ReactionPath.h.

◆ m_total

double m_total = 0.0
protected

Definition at line 152 of file ReactionPath.h.


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