Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the templated network docs linear algebra #1712

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions Docs/source/templated_networks.rst
Original file line number Diff line number Diff line change
@@ -384,16 +384,11 @@ Linear Algebra

The VODE integrator needs routines to do LU factorization and back
substitution. We build off of the linpack ``dgefa`` and ``dgesl``
routines, but because we know at compile time which Jacobian terms are
non-zero, we are able to use ``constexpr`` for-loops to only do the
calculations on non-zero elements. This greatly reduces the amount of work
in the linear algebra.
routines, using ``constexpr`` for-loops that know the network size
at compile time.

Note:

* Currently we are still storing a dense Jacobian -- we just skip computation
on the elements that are 0.
.. note::

* These routines do not perform pivoting. This does not seem to be an
issue for the types of matrices we solve with reactions (since they are
all of the form :math:`I - \tau J`, where :math:`tau` is the timestep).
These routines do not perform pivoting. This does not seem to be an
issue for the types of matrices we solve with reactions (since they are
all of the form :math:`I - \tau J`, where :math:`tau` is the timestep).