SciML / SciML/SparseWithDenseRowColMatrices.jl

`SparseWithDenseRowColLeastSquares` has no fixed-pattern `refactor!` — the README's headline Newton-loop claim is currently false

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
0
Forks
1
Avg merge
14m
Merged PRs (30d)
6

Description

WHAT: The cached LS factorization (src/lstsq.jl:164-173) stores a PureKLU factorization Sfact but exposes no value-update path; refactor!/update_lowrank!/lu! exist only for Woodbury/Augmented/QR. So a Newton/time-stepping loop that changes S's values (same sparsity pattern) cannot reuse it — each new A redoes the full KLU symbolic analysis (BTF + AMD) plus a fresh pivoted-QR and two SVDs. WHY IT MATTERS: The README (line 220) advertises the cached factorization 'for a Newton / time-stepping loop', but the constructor only supports a fixed A — the headline use case is currently unreachable. PureKLU already exposes klu!/klu_refactor! (the same symbolic-reuse calls Woodbury's refactor uses at src/woodbury.jl:276). FIX: Add refactor!(F::SparseWithDenseRowColLeastSquares, A; check=true) that copyto!s new nzval into owned Sown, calls PureKLU.klu!(F.Sfact, nz) (reuse symbolic + workspace), then re-runs only the value-dependent tail (Z=S̃⁻¹U, κ̂(S) guard, C, pivoted QR of [Z|Vᴴ], W, Msp, QL). Requires splitting _structured_setup into 'symbolic+allocate' vs 'numeric fill', and making rank-dependent fields (W/QL/Msp) the mutable/reallocatable part since kdef can change with values. Add an Snzval-only fast form mirroring src/woodbury.jl:271. EFFORT: M.


Priority: high. Filed from an automated next-steps audit of the QR/lstsq work (see PR #6).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/lstsq.jl:164-173 and _structured_setup, then compare the refactor paths at src/woodbury.jl:271 and :276. Review README line 220 and PR #6 for the promised use case. Done means fixed-pattern value updates can reuse the PureKLU symbolic factorization while correctly handling value-dependent rank changes.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.