Cantera  3.1.0a1
ReactionPathDiagram Class Reference

Reaction path diagrams (graphs). More...

#include <ReactionPath.h>

Detailed Description

Reaction path diagrams (graphs).

Definition at line 159 of file ReactionPath.h.

Public Member Functions

virtual ~ReactionPathDiagram ()
 Destructor. More...
 
double maxFlow ()
 The largest one-way flow value in any path. More...
 
double netFlow (size_t k1, size_t k2)
 The net flow from node k1 to node k2. More...
 
double 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)
 
SpeciesNodenode (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 string &nm, double x=0.0)
 
void displayOnly (size_t k=npos)
 
void linkNodes (size_t k1, size_t k2, size_t rxn, double value, string legend="")
 
void include (const string &aaname)
 
void exclude (const string &aaname)
 
void include (vector< string > &names)
 
void exclude (vector< string > &names)
 
vector< string > & included ()
 
vector< string > & excluded ()
 
vector< size_t > species ()
 
vector< int > reactions ()
 
void findMajorPaths (double threshold, size_t lda, double *a)
 
void setFont (const string &font)
 

Public Attributes

string title
 
string bold_color = "blue"
 
string normal_color = "steelblue"
 
string dashed_color = "gray"
 
string element
 
string m_font = "Helvetica"
 
double threshold = 0.005
 
double bold_min = 0.2
 
double dashed_max = 0.0
 
double label_min = 0.0
 
double x_size = -1.0
 
double y_size = -1.0
 
string name = "reaction_paths"
 
string dot_options = "center=1;"
 
flow_t flow_type = NetFlow
 
double scale = -1
 
double arrow_width = -5.0
 
bool show_details = false
 
double arrow_hue = 0.6666
 

Protected Attributes

double m_flxmax = 0.0
 
map< size_t, map< size_t, Path * > > m_paths
 
map< size_t, SpeciesNode * > m_nodes
 map of species index to SpeciesNode More...
 
vector< Path * > m_pathlist
 
vector< string > m_include
 
vector< string > m_exclude
 
vector< size_t > m_speciesNumber
 
set< size_t > m_rxns
 Indices of reactions that are included in the diagram. More...
 
size_t m_local = npos
 

Constructor & Destructor Documentation

◆ ~ReactionPathDiagram()

~ReactionPathDiagram ( )
virtual

Destructor.

Deletes all nodes and paths in the diagram.

Definition at line 81 of file ReactionPath.cpp.

Member Function Documentation

◆ maxFlow()

double maxFlow ( )
inline

The largest one-way flow value in any path.

Definition at line 170 of file ReactionPath.h.

◆ netFlow()

double netFlow ( size_t  k1,
size_t  k2 
)
inline

The net flow from node k1 to node k2.

Definition at line 175 of file ReactionPath.h.

◆ flow()

double flow ( size_t  k1,
size_t  k2 
)
inline

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

Definition at line 180 of file ReactionPath.h.

◆ hasNode()

bool hasNode ( size_t  k)
inline

True if a node for species k exists.

Definition at line 185 of file ReactionPath.h.

◆ 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
double dot(InputIter x_begin, InputIter x_end, InputIter2 y_begin)
Function that calculates a templated inner product.
Definition: utilities.h:82

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

Definition at line 171 of file ReactionPath.cpp.

Member Data Documentation

◆ m_nodes

map<size_t, SpeciesNode*> m_nodes
protected

map of species index to SpeciesNode

Definition at line 285 of file ReactionPath.h.

◆ m_rxns

set<size_t> m_rxns
protected

Indices of reactions that are included in the diagram.

Definition at line 292 of file ReactionPath.h.


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