From 67f5b442fb4cb7640dc447f4a33c6598931ef782 Mon Sep 17 00:00:00 2001 From: Ingmar Schoegl Date: Tue, 8 Mar 2022 13:47:55 -0600 Subject: [PATCH] Mark *_ddC and *_ddX derivatives as experimental --- include/cantera/kinetics/Kinetics.h | 42 ++++++++++++++++++++++++++ interfaces/cython/cantera/kinetics.pyx | 39 ++++++++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/include/cantera/kinetics/Kinetics.h b/include/cantera/kinetics/Kinetics.h index 9222f8e9ec..74b8a3cf5b 100644 --- a/include/cantera/kinetics/Kinetics.h +++ b/include/cantera/kinetics/Kinetics.h @@ -591,6 +591,9 @@ class Kinetics * on rate constants are considered for the evaluation of derivatives. * - `rtol-delta` (double) ... relative tolerance used to perturb properties * when calculating numerical derivatives. The default value is 1e-8. + * + * @warning The calculation of derivatives is an experimental part of the + * %Cantera API and may be changed or removed without notice. */ //! @{ @@ -642,6 +645,9 @@ class Kinetics * Calculate derivatives for forward rate constants with respect to molar * concentration at constant temperature, pressure and mole fractions. * @param dkfwd[out] Output vector of derivatives. Length: nReactions(). + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ virtual void getFwdRateConstants_ddC(double* dkfwd) { @@ -675,6 +681,9 @@ class Kinetics * Calculate derivatives for forward rates-of-progress with respect to molar * concentration at constant temperature, pressure and mole fractions. * @param drop[out] Output vector of derivatives. Length: nReactions(). + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ virtual void getFwdRatesOfProgress_ddC(double* drop) { @@ -689,6 +698,9 @@ class Kinetics * The method returns a matrix with nReactions rows and nTotalSpecies columns. * For a derivative with respect to \f$X_i$, all other \f$X_j$ are held constant, * rather than enforcing \f$\sum X_j = 1$. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ virtual Eigen::SparseMatrix fwdRatesOfProgress_ddX() { @@ -722,6 +734,9 @@ class Kinetics * Calculate derivatives for reverse rates-of-progress with respect to molar * concentration at constant temperature, pressure and mole fractions. * @param drop[out] Output vector of derivatives. Length: nReactions(). + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ virtual void getRevRatesOfProgress_ddC(double* drop) { @@ -736,6 +751,9 @@ class Kinetics * The method returns a matrix with nReactions rows and nTotalSpecies columns. * For a derivative with respect to \f$X_i$, all other \f$X_j$ are held constant, * rather than enforcing \f$\sum X_j = 1$. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ virtual Eigen::SparseMatrix revRatesOfProgress_ddX() { @@ -769,6 +787,9 @@ class Kinetics * Calculate derivatives for net rates-of-progress with respect to molar * concentration at constant temperature, pressure and mole fractions. * @param drop[out] Output vector of derivatives. Length: nReactions(). + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ virtual void getNetRatesOfProgress_ddC(double* drop) { @@ -783,6 +804,9 @@ class Kinetics * The method returns a matrix with nReactions rows and nTotalSpecies columns. * For a derivative with respect to \f$X_i$, all other \f$X_j$ are held constant, * rather than enforcing \f$\sum X_j = 1$. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ virtual Eigen::SparseMatrix netRatesOfProgress_ddX() { @@ -808,6 +832,9 @@ class Kinetics * Calculate derivatives for species creation rates with respect to molar * concentration at constant temperature, pressure and mole fractions. * @param dwdot[out] Output vector of derivatives. Length: m_kk. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ void getCreationRates_ddC(double* dwdot); @@ -818,6 +845,9 @@ class Kinetics * The method returns a matrix with nTotalSpecies rows and nTotalSpecies columns. * For a derivative with respect to \f$X_i$, all other \f$X_j$ are held constant, * rather than enforcing \f$\sum X_j = 1$. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ Eigen::SparseMatrix creationRates_ddX(); @@ -839,6 +869,9 @@ class Kinetics * Calculate derivatives for species destruction rates with respect to molar * concentration at constant temperature, pressure and mole fractions. * @param dwdot[out] Output vector of derivatives. Length: m_kk. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ void getDestructionRates_ddC(double* dwdot); @@ -849,6 +882,9 @@ class Kinetics * The method returns a matrix with nTotalSpecies rows and nTotalSpecies columns. * For a derivative with respect to \f$X_i$, all other \f$X_j$ are held constant, * rather than enforcing \f$\sum X_j = 1$. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ Eigen::SparseMatrix destructionRates_ddX(); @@ -870,6 +906,9 @@ class Kinetics * Calculate derivatives for species net production rates with respect to molar * concentration at constant temperature, pressure and mole fractions. * @param dwdot[out] Output vector of derivatives. Length: m_kk. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ void getNetProductionRates_ddC(double* dwdot); @@ -880,6 +919,9 @@ class Kinetics * The method returns a matrix with nTotalSpecies rows and nTotalSpecies columns. * For a derivative with respect to \f$X_i$, all other \f$X_j$ are held constant, * rather than enforcing \f$\sum X_j = 1$. + * + * @warning This method is an experimental part of the %Cantera API and + * may be changed or removed without notice. */ Eigen::SparseMatrix netProductionRates_ddX(); diff --git a/interfaces/cython/cantera/kinetics.pyx b/interfaces/cython/cantera/kinetics.pyx index a660e89b3e..48a8b5f18c 100644 --- a/interfaces/cython/cantera/kinetics.pyx +++ b/interfaces/cython/cantera/kinetics.pyx @@ -546,6 +546,9 @@ cdef class Kinetics(_SolutionBase): """ Calculate derivatives for forward rate constants with respect to molar concentration at constant temperature, pressure and mole fractions. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): return get_reaction_array(self, kin_getFwdRateConstants_ddC) @@ -570,6 +573,9 @@ cdef class Kinetics(_SolutionBase): """ Calculate derivatives for forward rates-of-progress with respect to molar concentration at constant temperature, pressure and mole fractions. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): return get_reaction_array(self, kin_getFwdRatesOfProgress_ddC) @@ -582,6 +588,9 @@ cdef class Kinetics(_SolutionBase): Note that for derivatives with respect to :math:`X_i`, all other :math:`X_j` are held constant, rather than enforcing :math:`\sum X_j = 1`. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): if _USE_SPARSE: @@ -610,6 +619,9 @@ cdef class Kinetics(_SolutionBase): """ Calculate derivatives for reverse rates-of-progress with respect to molar concentration at constant temperature, pressure and mole fractions. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): return get_reaction_array(self, kin_getRevRatesOfProgress_ddC) @@ -622,6 +634,9 @@ cdef class Kinetics(_SolutionBase): Note that for derivatives with respect to :math:`X_i`, all other :math:`X_j` are held constant, rather than enforcing :math:`\sum X_j = 1`. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): if _USE_SPARSE: @@ -650,6 +665,9 @@ cdef class Kinetics(_SolutionBase): """ Calculate derivatives for net rates-of-progress with respect to molar concentration at constant temperature, pressure and mole fractions. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): return get_reaction_array(self, kin_getNetRatesOfProgress_ddC) @@ -662,6 +680,9 @@ cdef class Kinetics(_SolutionBase): Note that for derivatives with respect to :math:`X_i`, all other :math:`X_j` are held constant, rather than enforcing :math:`\sum X_j = 1`. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): if _USE_SPARSE: @@ -690,6 +711,9 @@ cdef class Kinetics(_SolutionBase): """ Calculate derivatives of species creation rates with respect to molar concentration at constant temperature, pressure and mole fractions. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): return get_species_array(self, kin_getCreationRates_ddC) @@ -702,6 +726,9 @@ cdef class Kinetics(_SolutionBase): Note that for derivatives with respect to :math:`X_i`, all other :math:`X_j` are held constant, rather than enforcing :math:`\sum X_j = 1`. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): if _USE_SPARSE: @@ -730,6 +757,9 @@ cdef class Kinetics(_SolutionBase): """ Calculate derivatives of species destruction rates with respect to molar concentration at constant temperature, pressure and mole fractions. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): return get_species_array(self, kin_getDestructionRates_ddC) @@ -742,6 +772,9 @@ cdef class Kinetics(_SolutionBase): Note that for derivatives with respect to :math:`X_i`, all other :math:`X_j` are held constant, rather than enforcing :math:`\sum X_j = 1`. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): if _USE_SPARSE: @@ -770,6 +803,9 @@ cdef class Kinetics(_SolutionBase): """ Calculate derivatives of species net production rates with respect to molar density at constant temperature, pressure and mole fractions. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): return get_species_array(self, kin_getNetProductionRates_ddC) @@ -782,6 +818,9 @@ cdef class Kinetics(_SolutionBase): Note that for derivatives with respect to :math:`X_i`, all other :math:`X_j` are held constant, rather than enforcing :math:`\sum X_j = 1`. + + **Warning:** this property is an experimental part of the Cantera API and + may be changed or removed without notice. """ def __get__(self): if _USE_SPARSE: