From 836ec7498d91675785ff8f29d48c1e3f8356451d Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Thu, 10 Oct 2024 13:32:39 +0200 Subject: [PATCH 1/3] Update docstring --- docs/contents/cvode.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/contents/cvode.rst b/docs/contents/cvode.rst index 87ecdb309..d70378aaf 100644 --- a/docs/contents/cvode.rst +++ b/docs/contents/cvode.rst @@ -20,9 +20,10 @@ is satisfied: In NMODL, all ``KINETIC`` blocks are internally first converted to ``DERIVATIVE`` blocks. The ``DERIVATIVE`` block is then converted to a ``CVODE`` block, which contains two parts; the first part contains the update -step for linear systems, while the second part contains the update step for -non-linear systems (see `CVODES documentation`_, eqs. (4.8) and (4.9)). Given -a ``DERIVATIVE`` block of the form: +step for non-stiff systems (functional iteration), while the second part +contains the update step for stiff systems (additional step using the +Jacobian). For more information, see `CVODES documentation`_, eqs. (4.8) and +(4.9)). Given a ``DERIVATIVE`` block of the form: .. _CVODES documentation: https://sundials.readthedocs.io/en/latest/cvodes/Mathematics_link.html From 9f6b751b5c70d90742a406284dceb2d2ab1738fd Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Thu, 10 Oct 2024 13:46:34 +0200 Subject: [PATCH 2/3] Fix typo --- docs/contents/cvode.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contents/cvode.rst b/docs/contents/cvode.rst index d70378aaf..367e160d4 100644 --- a/docs/contents/cvode.rst +++ b/docs/contents/cvode.rst @@ -23,7 +23,7 @@ In NMODL, all ``KINETIC`` blocks are internally first converted to step for non-stiff systems (functional iteration), while the second part contains the update step for stiff systems (additional step using the Jacobian). For more information, see `CVODES documentation`_, eqs. (4.8) and -(4.9)). Given a ``DERIVATIVE`` block of the form: +(4.9). Given a ``DERIVATIVE`` block of the form: .. _CVODES documentation: https://sundials.readthedocs.io/en/latest/cvodes/Mathematics_link.html From 1348ab946456a3341ca9a8253a71717170214045 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Thu, 10 Oct 2024 13:58:54 +0200 Subject: [PATCH 3/3] Update docstring --- src/pybind/wrapper.cpp | 2 -- src/pybind/wrapper.hpp | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pybind/wrapper.cpp b/src/pybind/wrapper.cpp index ae9d41497..65fe2b6d6 100644 --- a/src/pybind/wrapper.cpp +++ b/src/pybind/wrapper.cpp @@ -186,8 +186,6 @@ except Exception as e: return {std::move(solution), std::move(exception_message)}; } -/// \brief A blunt instrument that differentiates expression w.r.t. variable -/// \return The tuple (solution, exception) std::tuple call_diff2c( const std::string& expression, const std::string& variable, diff --git a/src/pybind/wrapper.hpp b/src/pybind/wrapper.hpp index b4ec0a2df..694b0143d 100644 --- a/src/pybind/wrapper.hpp +++ b/src/pybind/wrapper.hpp @@ -45,6 +45,12 @@ std::tuple call_analytic_diff( const std::vector& expressions, const std::set& used_names_in_block); + +/// \brief Differentiates an expression with respect to a variable +/// \param expression The expression we want to differentiate +/// \param variable The name of the independent variable we are differentiating against +/// \param index_vars A map of array (indexable) variables (and their associated indices) that +/// appear in \ref expression \return The tuple (solution, exception) std::tuple call_diff2c( const std::string& expression, const std::string& variable,