Skip to content

Commit

Permalink
Merge branch 'jelic/cvode_visitors' into jelic/cvode_codegen_only
Browse files Browse the repository at this point in the history
  • Loading branch information
JCGoran committed Oct 10, 2024
2 parents bf3b0e6 + 1348ab9 commit ee0247f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 4 additions & 3 deletions docs/contents/cvode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions src/pybind/wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string, std::string> call_diff2c(
const std::string& expression,
const std::string& variable,
Expand Down
6 changes: 6 additions & 0 deletions src/pybind/wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ std::tuple<std::string, std::string> call_analytic_diff(
const std::vector<std::string>& expressions,
const std::set<std::string>& 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<std::string, std::string> call_diff2c(
const std::string& expression,
const std::string& variable,
Expand Down

0 comments on commit ee0247f

Please sign in to comment.