Cantera  3.0.0
Loading...
Searching...
No Matches
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.
 
double maxFlow ()
 The largest one-way flow value in any path.
 
double netFlow (size_t k1, size_t k2)
 The net flow from node k1 to node k2.
 
double 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, 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
 
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.
 
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.

◆ writeData()

void writeData ( std::ostream &  s)

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

◆ add()

void add ( ReactionPathDiagram d)

Definition at line 118 of file ReactionPath.cpp.

◆ node()

SpeciesNode * node ( size_t  k)
inline

Definition at line 206 of file ReactionPath.h.

◆ path() [1/2]

Path * path ( size_t  k1,
size_t  k2 
)
inline

Definition at line 209 of file ReactionPath.h.

◆ path() [2/2]

Path * path ( size_t  n)
inline

Definition at line 212 of file ReactionPath.h.

◆ nPaths()

size_t nPaths ( )
inline

Definition at line 215 of file ReactionPath.h.

◆ nNodes()

size_t nNodes ( )
inline

Definition at line 218 of file ReactionPath.h.

◆ addNode()

void addNode ( size_t  k,
const string &  nm,
double  x = 0.0 
)

Definition at line 354 of file ReactionPath.cpp.

◆ displayOnly()

void displayOnly ( size_t  k = npos)
inline

Definition at line 224 of file ReactionPath.h.

◆ linkNodes()

void linkNodes ( size_t  k1,
size_t  k2,
size_t  rxn,
double  value,
string  legend = "" 
)

Definition at line 365 of file ReactionPath.cpp.

◆ include() [1/2]

void include ( const string &  aaname)
inline

Definition at line 230 of file ReactionPath.h.

◆ exclude() [1/2]

void exclude ( const string &  aaname)
inline

Definition at line 233 of file ReactionPath.h.

◆ include() [2/2]

void include ( vector< string > &  names)
inline

Definition at line 236 of file ReactionPath.h.

◆ exclude() [2/2]

void exclude ( vector< string > &  names)
inline

Definition at line 241 of file ReactionPath.h.

◆ included()

vector< string > & included ( )
inline

Definition at line 246 of file ReactionPath.h.

◆ excluded()

vector< string > & excluded ( )
inline

Definition at line 249 of file ReactionPath.h.

◆ species()

vector< size_t > species ( )

Definition at line 379 of file ReactionPath.cpp.

◆ reactions()

vector< int > reactions ( )

Definition at line 95 of file ReactionPath.cpp.

◆ findMajorPaths()

void findMajorPaths ( double  threshold,
size_t  lda,
double *  a 
)

Definition at line 128 of file ReactionPath.cpp.

◆ setFont()

void setFont ( const string &  font)
inline

Definition at line 255 of file ReactionPath.h.

Member Data Documentation

◆ title

string title

Definition at line 260 of file ReactionPath.h.

◆ bold_color

string bold_color = "blue"

Definition at line 261 of file ReactionPath.h.

◆ normal_color

string normal_color = "steelblue"

Definition at line 262 of file ReactionPath.h.

◆ dashed_color

string dashed_color = "gray"

Definition at line 263 of file ReactionPath.h.

◆ element

string element

Definition at line 264 of file ReactionPath.h.

◆ m_font

string m_font = "Helvetica"

Definition at line 265 of file ReactionPath.h.

◆ threshold

double threshold = 0.005

Definition at line 266 of file ReactionPath.h.

◆ bold_min

double bold_min = 0.2

Definition at line 267 of file ReactionPath.h.

◆ dashed_max

double dashed_max = 0.0

Definition at line 268 of file ReactionPath.h.

◆ label_min

double label_min = 0.0

Definition at line 269 of file ReactionPath.h.

◆ x_size

double x_size = -1.0

Definition at line 270 of file ReactionPath.h.

◆ y_size

double y_size = -1.0

Definition at line 271 of file ReactionPath.h.

◆ name

string name = "reaction_paths"

Definition at line 272 of file ReactionPath.h.

◆ dot_options

string dot_options = "center=1;"

Definition at line 273 of file ReactionPath.h.

◆ flow_type

flow_t flow_type = NetFlow

Definition at line 274 of file ReactionPath.h.

◆ scale

double scale = -1

Definition at line 275 of file ReactionPath.h.

◆ arrow_width

double arrow_width = -5.0

Definition at line 276 of file ReactionPath.h.

◆ show_details

bool show_details = false

Definition at line 277 of file ReactionPath.h.

◆ arrow_hue

double arrow_hue = 0.6666

Definition at line 278 of file ReactionPath.h.

◆ m_flxmax

double m_flxmax = 0.0
protected

Definition at line 281 of file ReactionPath.h.

◆ m_paths

map<size_t, map<size_t, Path*> > m_paths
protected

Definition at line 282 of file ReactionPath.h.

◆ m_nodes

map<size_t, SpeciesNode*> m_nodes
protected

map of species index to SpeciesNode

Definition at line 285 of file ReactionPath.h.

◆ m_pathlist

vector<Path*> m_pathlist
protected

Definition at line 286 of file ReactionPath.h.

◆ m_include

vector<string> m_include
protected

Definition at line 287 of file ReactionPath.h.

◆ m_exclude

vector<string> m_exclude
protected

Definition at line 288 of file ReactionPath.h.

◆ m_speciesNumber

vector<size_t> m_speciesNumber
protected

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

◆ m_local

size_t m_local = npos
protected

Definition at line 293 of file ReactionPath.h.


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