Cantera 2.6.0

Public Member Functions | Public Attributes | Protected Attributes | List of all members
ReactionPathDiagram Class Reference

Reaction path diagrams (graphs). More...

`#include <ReactionPath.h>`

## Public Member Functions
virtual | ~ReactionPathDiagram ()
| Destructor. More...
doublereal | maxFlow ()
| The largest one-way flow value in any path. More...
doublereal | netFlow (size_t k1, size_t k2)
| The net flow from node `k1` to node `k2`. More...
doublereal | flow (size_t k1, size_t k2)
| The one-way flow from node `k1` to node `k2`. More...
bool | hasNode (size_t k)
| True if a node for species k exists. More...
void | writeData (std::ostream &s)
void | exportToDot (std::ostream &s)
| Export the reaction path diagram. More...
void | add (ReactionPathDiagram &d)
SpeciesNode * | node (size_t k)
Path * | path (size_t k1, size_t k2)
Path * | path (size_t n)
size_t | nPaths ()
size_t | nNodes ()
void | addNode (size_t k, const std::string &nm, doublereal x=0.0)
void | displayOnly (size_t k=npos)
void | linkNodes (size_t k1, size_t k2, size_t rxn, doublereal value, std::string legend="")
void | include (const std::string &aaname)
void | exclude (const std::string &aaname)
void | include (std::vector< std::string > &names)
void | exclude (std::vector< std::string > &names)
std::vector< std::string > & | included ()
std::vector< std::string > & | excluded ()
std::vector< size_t > | species ()
vector_int | reactions ()
void | findMajorPaths (doublereal threshold, size_t lda, doublereal *a)
void | setFont (const std::string &font)

## Public Attributes
std::string | title
std::string | bold_color
std::string | normal_color
std::string | dashed_color
std::string | element
std::string | m_font
doublereal | threshold
doublereal | bold_min
doublereal | dashed_max
doublereal | label_min
doublereal | x_size
doublereal | y_size
std::string | name
std::string | dot_options
flow_t | flow_type
doublereal | scale
doublereal | arrow_width
bool | show_details
doublereal | arrow_hue

## Protected Attributes
doublereal | m_flxmax
std::map< size_t, std::map< size_t, Path * > > | m_paths
std::map< size_t, SpeciesNode * > | m_nodes
std::vector< Path * > | m_pathlist
std::vector< std::string > | m_include
std::vector< std::string > | m_exclude
std::vector< size_t > | m_speciesNumber
std::map< size_t, int > | m_rxns
size_t | m_local

## Detailed Description

Reaction path diagrams (graphs).

Definition at line 162 of file ReactionPath.h.

## Constructor & Destructor Documentation

## ◆ ReactionPathDiagram()

ReactionPathDiagram | ( |  | ) |

Definition at line 82 of file ReactionPath.cpp.

## ◆ ~ReactionPathDiagram()

~ReactionPathDiagram | ( |  | ) |
| virtual

Destructor.

Deletes all nodes and paths in the diagram.

Definition at line 106 of file ReactionPath.cpp.

## Member Function Documentation

## ◆ maxFlow()

doublereal maxFlow | ( |  | ) |
| inline

The largest one-way flow value in any path.

Definition at line 173 of file ReactionPath.h.

## ◆ netFlow()

doublereal netFlow | ( | size_t | k1,
|  | size_t | k2
| ) |  |
| inline

The net flow from node `k1` to node `k2`.

Definition at line 178 of file ReactionPath.h.

References ReactionPathDiagram::flow().

Referenced by ReactionPathDiagram::exportToDot().

## ◆ flow()

doublereal flow | ( | size_t | k1,
|  | size_t | k2
| ) |  |
| inline

The one-way flow from node `k1` to node `k2`.

Definition at line 183 of file ReactionPath.h.

References ReactionPathDiagram::flow().

Referenced by ReactionPathDiagram::exportToDot(), ReactionPathDiagram::flow(), and ReactionPathDiagram::netFlow().

## ◆ hasNode()

bool hasNode | ( | size_t | k | ) |
| inline

True if a node for species k exists.

Definition at line 188 of file ReactionPath.h.

## ◆ writeData()

void writeData | ( | std::ostream & | s | ) |

Definition at line 177 of file ReactionPath.cpp.

## ◆ exportToDot()

void exportToDot | ( | std::ostream & | s | ) |

Export the reaction path diagram.

This method writes to stream `s` the commands for the 'dot' program in the `GraphViz` package from AT&T. (GraphViz may be downloaded from www.graphviz.org.)

To generate a postscript reaction path diagram from the output of this method saved in file paths.dot, for example, give the command:

dot -Tps paths.dot > paths.ps
Cantera::dot
doublereal dot(InputIter x_begin, InputIter x_end, InputIter2 y_begin)
Function that calculates a templated inner product.
Definition: utilities.h:77

To generate a GIF image, replace -Tps with -Tgif

Definition at line 197 of file ReactionPath.cpp.

References ReactionPathDiagram::flow(), SpeciesNode::name, ReactionPathDiagram::netFlow(), Cantera::npos, and SpeciesNode::visible.

## ◆ add()

void add | ( | ReactionPathDiagram & | d | ) |

Definition at line 143 of file ReactionPath.cpp.

## ◆ node()

SpeciesNode * node | ( | size_t | k | ) |
| inline

Definition at line 209 of file ReactionPath.h.

## ◆ path() [1/2]

Path * path | ( | size_t | k1,
|  | size_t | k2
| ) |  |
| inline

Definition at line 212 of file ReactionPath.h.

## ◆ path() [2/2]

Path * path | ( | size_t | n | ) |
| inline

Definition at line 215 of file ReactionPath.h.

## ◆ nPaths()

size_t nPaths | ( |  | ) |
| inline

Definition at line 218 of file ReactionPath.h.

## ◆ nNodes()

size_t nNodes | ( |  | ) |
| inline

Definition at line 221 of file ReactionPath.h.

## ◆ addNode()

void addNode | ( | size_t | k,
|  | const std::string & | nm,
|  | doublereal | x = `0.0`
| ) |  |

Definition at line 380 of file ReactionPath.cpp.

## ◆ displayOnly()

void displayOnly | ( | size_t | k = `npos` | ) |
| inline

Definition at line 227 of file ReactionPath.h.

## ◆ linkNodes()

void linkNodes | ( | size_t | k1,
|  | size_t | k2,
|  | size_t | rxn,
|  | doublereal | value,
|  | std::string | legend = `""`
| ) |  |

Definition at line 391 of file ReactionPath.cpp.

## ◆ include() [1/2]

void include | ( | const std::string & | aaname | ) |
| inline

Definition at line 234 of file ReactionPath.h.

## ◆ exclude() [1/2]

void exclude | ( | const std::string & | aaname | ) |
| inline

Definition at line 237 of file ReactionPath.h.

## ◆ include() [2/2]

void include | ( | std::vector< std::string > & | names | ) |
| inline

Definition at line 240 of file ReactionPath.h.

## ◆ exclude() [2/2]

void exclude | ( | std::vector< std::string > & | names | ) |
| inline

Definition at line 245 of file ReactionPath.h.

## ◆ included()

std::vector< std::string > & included | ( |  | ) |
| inline

Definition at line 250 of file ReactionPath.h.

## ◆ excluded()

std::vector< std::string > & excluded | ( |  | ) |
| inline

Definition at line 253 of file ReactionPath.h.

## ◆ species()

std::vector< size_t > species | ( |  | ) |

Definition at line 405 of file ReactionPath.cpp.

## ◆ reactions()

vector_int reactions | ( |  | ) |

Definition at line 120 of file ReactionPath.cpp.

## ◆ findMajorPaths()

void findMajorPaths | ( | doublereal | threshold,
|  | size_t | lda,
|  | doublereal * | a
| ) |  |

Definition at line 153 of file ReactionPath.cpp.

## ◆ setFont()

void setFont | ( | const std::string & | font | ) |
| inline

Definition at line 259 of file ReactionPath.h.

## Member Data Documentation

## ◆ title

std::string title

Definition at line 264 of file ReactionPath.h.

## ◆ bold_color

std::string bold_color

Definition at line 265 of file ReactionPath.h.

## ◆ normal_color

std::string normal_color

Definition at line 266 of file ReactionPath.h.

## ◆ dashed_color

std::string dashed_color

Definition at line 267 of file ReactionPath.h.

## ◆ element

std::string element

Definition at line 268 of file ReactionPath.h.

## ◆ m_font

std::string m_font

Definition at line 269 of file ReactionPath.h.

## ◆ threshold

doublereal threshold

Definition at line 270 of file ReactionPath.h.

## ◆ bold_min

doublereal bold_min

Definition at line 270 of file ReactionPath.h.

## ◆ dashed_max

doublereal dashed_max

Definition at line 270 of file ReactionPath.h.

## ◆ label_min

doublereal label_min

Definition at line 270 of file ReactionPath.h.

## ◆ x_size

doublereal x_size

Definition at line 271 of file ReactionPath.h.

## ◆ y_size

doublereal y_size

Definition at line 271 of file ReactionPath.h.

## ◆ name

std::string name

Definition at line 272 of file ReactionPath.h.

## ◆ dot_options

std::string dot_options

Definition at line 272 of file ReactionPath.h.

## ◆ flow_type

flow_t flow_type

Definition at line 273 of file ReactionPath.h.

## ◆ scale

doublereal scale

Definition at line 274 of file ReactionPath.h.

## ◆ arrow_width

doublereal arrow_width

Definition at line 275 of file ReactionPath.h.

## ◆ show_details

bool show_details

Definition at line 276 of file ReactionPath.h.

## ◆ arrow_hue

doublereal arrow_hue

Definition at line 277 of file ReactionPath.h.

## ◆ m_flxmax

doublereal m_flxmax
| protected

Definition at line 280 of file ReactionPath.h.

## ◆ m_paths

std::map<size_t, std::map<size_t, Path*> > m_paths
| protected

Definition at line 281 of file ReactionPath.h.

## ◆ m_nodes

std::map<size_t, SpeciesNode*> m_nodes
| protected

Definition at line 282 of file ReactionPath.h.

## ◆ m_pathlist

std::vector<Path*> m_pathlist
| protected

Definition at line 283 of file ReactionPath.h.

## ◆ m_include

std::vector<std::string> m_include
| protected

Definition at line 284 of file ReactionPath.h.

## ◆ m_exclude

std::vector<std::string> m_exclude
| protected

Definition at line 285 of file ReactionPath.h.

## ◆ m_speciesNumber

std::vector<size_t> m_speciesNumber
| protected

Definition at line 286 of file ReactionPath.h.

## ◆ m_rxns

std::map<size_t, int> m_rxns
| protected

Definition at line 287 of file ReactionPath.h.

## ◆ m_local

size_t m_local
| protected

Definition at line 288 of file ReactionPath.h.

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

- ReactionPath.h
- ReactionPath.cpp