Cantera  2.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

 ReactionPathDiagram ()
 Default constructor.
 
virtual ~ReactionPathDiagram ()
 Destructor.
 
doublereal maxFlow ()
 The largest one-way flow value in any path.
 
doublereal netFlow (size_t k1, size_t k2)
 The net flow from node k1 to node k2.
 
doublereal flow (size_t k1, size_t k2)
 The one-way flow from node k1 to node k2.
 
bool hasNode (size_t k)
 True if a node for species k exists.
 
void writeData (std::ostream &s)
 
void exportToDot (std::ostream &s)
 Export the reaction path diagram.
 
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, 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 (std::string aaname)
 
void exclude (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 (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 168 of file ReactionPath.h.

Constructor & Destructor Documentation

Default constructor.

Definition at line 99 of file ReactionPath.cpp.

References Cantera::npos.

~ReactionPathDiagram ( )
virtual

Destructor.

Deletes all nodes and paths in the diagram.

Definition at line 127 of file ReactionPath.cpp.

Member Function Documentation

doublereal maxFlow ( )
inline

The largest one-way flow value in any path.

Definition at line 178 of file ReactionPath.h.

doublereal netFlow ( size_t  k1,
size_t  k2 
)
inline

The net flow from node k1 to node k2.

Definition at line 183 of file ReactionPath.h.

References ReactionPathDiagram::flow().

Referenced by ReactionPathDiagram::exportToDot().

doublereal flow ( size_t  k1,
size_t  k2 
)
inline

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

Definition at line 188 of file ReactionPath.h.

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

bool hasNode ( size_t  k)
inline

True if a node for species k exists.

Definition at line 193 of file ReactionPath.h.

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

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

Definition at line 261 of file ReactionPath.cpp.

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


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