Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ADR 0014: Linear algebra with a pluggable Jacobian representation

  • Status: Accepted (2026-11-10)
  • Date: 2026-11-10
  • Deciders: Vincent Mader
  • Related: RQ6, E13; ADR 0008

Context

Implicit steps need solves with I − h γ J. For p = 1 dense LU on N ≤ 800 is cheap; for p = 2 (N up to about 4000 to 16000) dense LU costs as much as the full kernel sum (thesis review section 5). Sampled kernels yield sparse Jacobians.

Decision

Jacobians are represented by an enum: Dense, Sparse (CSR, assembled from recipes), Approximate (from a dominant-pair subset), MatrixFree (Jacobian-vector products by recipe sums). Solvers: dense LU, sparse LU, GMRES/BiCGStab with simple preconditioners (diagonal, ILU(0) on the dominant-pair Jacobian). Use the faer crate for dense and sparse factorizations if it fits after the M6 check of its current API and wasm support; otherwise nalgebra for dense plus own Krylov code.

Alternatives considered

  • Dense only: makes the p = 2 cost study meaningless.
  • Binding LAPACK/SuiteSparse: fast, but C dependencies and no wasm.

Consequences

  • E13 can compare strategies under one interface.
  • Some own Krylov and preconditioner code to test (against dense solves on small problems).