Skip to content

Commit

Permalink
update the templated network docs linear algebra (#1712)
Browse files Browse the repository at this point in the history
we do not skip zeros, since we were doing that incorrectly previously
  • Loading branch information
zingale authored Jan 17, 2025
1 parent a88aff5 commit 0919278
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions Docs/source/templated_networks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).

0 comments on commit 0919278

Please sign in to comment.