From 58063b498adb1d29881bb03b5e306dbc3f395108 Mon Sep 17 00:00:00 2001 From: Ingmar Schoegl Date: Thu, 24 Oct 2019 17:57:37 -0500 Subject: [PATCH] [Kinetics] deprecate magic number types in RxnRates.h --- include/cantera/kinetics/RxnRates.h | 21 +++++++++++++++++++++ include/cantera/kinetics/reaction_defs.h | 3 +++ 2 files changed, 24 insertions(+) diff --git a/include/cantera/kinetics/RxnRates.h b/include/cantera/kinetics/RxnRates.h index ddd18d9d3..e9349f0e5 100644 --- a/include/cantera/kinetics/RxnRates.h +++ b/include/cantera/kinetics/RxnRates.h @@ -11,6 +11,7 @@ #include "cantera/kinetics/reaction_defs.h" #include "cantera/base/ctexceptions.h" #include "cantera/base/stringUtils.h" +#include "cantera/base/global.h" #include @@ -31,7 +32,12 @@ class Arrhenius { public: //! return the rate coefficient type. + /*! + * @deprecated To be removed after Cantera 2.5. + */ static int type() { + warn_deprecated("Arrhenius::type()", + "To be removed after Cantera 2.5."); return ARRHENIUS_REACTION_RATECOEFF_TYPE; } @@ -119,7 +125,12 @@ class SurfaceArrhenius { public: + /*! + * @deprecated To be removed after Cantera 2.5. + */ static int type() { + warn_deprecated("SurfaceArrhenius::type()", + "To be removed after Cantera 2.5."); return SURF_ARRHENIUS_REACTION_RATECOEFF_TYPE; } @@ -211,7 +222,12 @@ class Plog { public: //! return the rate coefficient type. + /*! + * @deprecated To be removed after Cantera 2.5. + */ static int type() { + warn_deprecated("Plog::type()", + "To be removed after Cantera 2.5."); return PLOG_REACTION_RATECOEFF_TYPE; } @@ -340,7 +356,12 @@ class ChebyshevRate { public: //! return the rate coefficient type. + /*! + * @deprecated To be removed after Cantera 2.5. + */ static int type() { + warn_deprecated("ChebyshevRate::type()", + "To be removed after Cantera 2.5."); return CHEBYSHEV_REACTION_RATECOEFF_TYPE; } diff --git a/include/cantera/kinetics/reaction_defs.h b/include/cantera/kinetics/reaction_defs.h index 3fcf728e9..e9eabac16 100644 --- a/include/cantera/kinetics/reaction_defs.h +++ b/include/cantera/kinetics/reaction_defs.h @@ -116,6 +116,9 @@ const int GLOBAL_RXN = 30; * * Note that not all of these are currently implemented! * @todo Finish implementing reaction rate types. + * + * Magic numbers + * @deprecated To be removed after Cantera 2.5. */ //@{