Cantera  2.5.1
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)
 
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 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 ( )
virtual

Destructor.

Deletes all nodes and paths in the diagram.

Definition at line 101 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.

Referenced by ReactionPathDiagram::exportToDot(), 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.

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

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

Definition at line 192 of file ReactionPath.cpp.

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


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