{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### NMODL LINEAR solver\n", "\n", "`LINEAR` blocks contain a set of simultaneous equations.\n", "\n", "These are solved by `solve_lin_system` from [nmodl/ode.py](https://github.com/BlueBrain/nmodl/blob/master/nmodl/ode.py#L143).\n", "\n", "If the system is sufficiently small (by default $N\\leq3$), then Gaussian elimination is used to directly construct the solution at compile time using SymPy to do the symbolic Gaussian elimination. Optionally Common Subexpression Elimination (CSE) can also be performed.\n", "\n", "For larger matrices it may not be numerically safe to solve them at compile time by Gaussian elimination, so instead the matrix equation is constructed and then solved at run time by LU factorization with partial pivoting (for more, see Crout solver in `src/solver/crout` and `test/unit/crout`)." ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }