You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Factorize() should clear the SparseLU workspace now that it can be refactorized. #58
In a Factorize call, x is only self-cleaning for indices in the current column's elimination "reach" set and SolveSp clears those before use. The diagonal-preference pivot check, if (pinv[col] < 0 && Math.Abs(x[col]) >= a * tol), reads x[col] unconditionally, without checking whether col is actually in that reach set. When a column's own diagonal is structurally absent from A and not reachable through the partialy built L (e.g. an MNA circuit's ideal voltage-source branch column), x[col] is never written this iteration, so the read returns whatever was last left in temp[col]. At low pivot tolerances that stale value easily passes the >= a * tol check.
Activity
Mervill commentedon Aug 23, 2026
Oh also
var xi = new int[2 * n];should be hoisted to a member alongsidetempso thenFactorize()wont allocate anything,Clear SparseLU workspace variables before refactorize.
wo80 commentedon Aug 23, 2026
Thorough analysis and valid fix, thanks!
Please take a look at #59 .