This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · lib/ode/lu

Dense LU with partial pivoting, factored once and solved many times

The implicit integrators (lib/ode/radau.viv, lib/ode/bdf.viv) solve with the same Newton matrix for several iterations and often for several steps, so the factorization is kept: lu_factor overwrites a copy of the matrix with its L and U factors and records the row swaps; lu_solve then costs n^2 per right-hand side instead of n^3.

Used with from ode.lu import lu_factor, lu_solve.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 14–95