From 3093e6e6d4d8960838492cb3848e0881420dc7b4 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 24 Nov 2016 11:42:17 -0500 Subject: [PATCH] [Kinetics] Restore old handling of repeated species in path diagrams Fixes an error introduced in 37f71bd9 which caused these reactions to be ignored. However, flux calculations for reactions such as H + HO2 -> 2 OH are still incorrect. --- src/kinetics/ReactionPath.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kinetics/ReactionPath.cpp b/src/kinetics/ReactionPath.cpp index fe7623f45..61c3b0ccf 100644 --- a/src/kinetics/ReactionPath.cpp +++ b/src/kinetics/ReactionPath.cpp @@ -566,10 +566,10 @@ int ReactionPathBuilder::init(ostream& logfile, Kinetics& kin) vector > allReactants(m_nr); for (size_t i = 0; i < m_nr; i++) { for (size_t k = 0; k < m_ns; k++) { - if (kin.reactantStoichCoeff(k, i)) { + for (int n = 0; n < kin.reactantStoichCoeff(k, i); n++) { allReactants[i].push_back(k); } - if (kin.productStoichCoeff(k, i)) { + for (int n = 0; n < kin.productStoichCoeff(k, i); n++) { allProducts[i].push_back(k); } }