From e83b095c3aa020e97f9a43237c23db79907aa1df Mon Sep 17 00:00:00 2001 From: g3bk47 Date: Sat, 15 Oct 2016 18:09:58 +0200 Subject: [PATCH] [Kinetics] added const version of Kinetics::reaction --- include/cantera/kinetics/Kinetics.h | 2 ++ src/kinetics/Kinetics.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/include/cantera/kinetics/Kinetics.h b/include/cantera/kinetics/Kinetics.h index b7dbd2d32..eeccc18bc 100644 --- a/include/cantera/kinetics/Kinetics.h +++ b/include/cantera/kinetics/Kinetics.h @@ -782,6 +782,8 @@ public: * Return the Reaction object for reaction *i*. */ shared_ptr reaction(size_t i); + + shared_ptr reaction(size_t i) const; //! Determine behavior when adding a new reaction that contains species not //! defined in any of the phases associated with this kinetics manager. If diff --git a/src/kinetics/Kinetics.cpp b/src/kinetics/Kinetics.cpp index 4e0081f00..a316b91d2 100644 --- a/src/kinetics/Kinetics.cpp +++ b/src/kinetics/Kinetics.cpp @@ -649,5 +649,11 @@ shared_ptr Kinetics::reaction(size_t i) checkReactionIndex(i); return m_reactions[i]; } + +shared_ptr Kinetics::reaction(size_t i) const +{ + checkReactionIndex(i); + return m_reactions[i]; +} }