From 00d31f662ff23073e1b6997a5e7e4476c28fc566 Mon Sep 17 00:00:00 2001 From: Marieke Osewold <149294708+mariekeosw@users.noreply.github.com> Date: Mon, 28 Jul 2025 16:54:38 +0200 Subject: [PATCH 1/3] Fix docstring of UMFPACKFactorization and KLUFactorization --- src/factorization.jl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/factorization.jl b/src/factorization.jl index 6016c1ba1..49e66cbbb 100644 --- a/src/factorization.jl +++ b/src/factorization.jl @@ -861,9 +861,13 @@ patterns with “more structure”. !!! note By default, the SparseArrays.jl are implemented for efficiency by caching the - symbolic factorization. I.e., if `set_A` is used, it is expected that the new - `A` has the same sparsity pattern as the previous `A`. If this algorithm is to - be used in a context where that assumption does not hold, set `reuse_symbolic=false`. + symbolic factorization. + + If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`. + If the pattern is assumed or known to be constant, set `reuse_symbolic=true` to avoid + unnecessary recomputation. To further reduce computational overhead, you can disable + pattern checks entirely by setting `check_pattern = false`. Note that this may error + if the sparsity pattern does change unexpectedly. """ Base.@kwdef struct UMFPACKFactorization <: AbstractSparseFactorization reuse_symbolic::Bool = true @@ -885,9 +889,13 @@ A fast sparse LU-factorization which specializes on sparsity patterns with “le !!! note By default, the SparseArrays.jl are implemented for efficiency by caching the - symbolic factorization. I.e., if `set_A` is used, it is expected that the new - `A` has the same sparsity pattern as the previous `A`. If this algorithm is to - be used in a context where that assumption does not hold, set `reuse_symbolic=false`. + symbolic factorization. + + If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`. + If the pattern is assumed or known to be constant, set `reuse_symbolic=true` to avoid + unnecessary recomputation. To further reduce computational overhead, you can disable + pattern checks entirely by setting `check_pattern = false`. Note that this may error + if the sparsity pattern does change unexpectedly. """ Base.@kwdef struct KLUFactorization <: AbstractSparseFactorization reuse_symbolic::Bool = true From c0247ea2926984b90aa098c06a7c38e7e628c9c3 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 28 Jul 2025 17:49:29 -0400 Subject: [PATCH 2/3] Update src/factorization.jl --- src/factorization.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/factorization.jl b/src/factorization.jl index 49e66cbbb..8797bc874 100644 --- a/src/factorization.jl +++ b/src/factorization.jl @@ -861,9 +861,7 @@ patterns with “more structure”. !!! note By default, the SparseArrays.jl are implemented for efficiency by caching the - symbolic factorization. - - If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`. + symbolic factorization. If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`. If the pattern is assumed or known to be constant, set `reuse_symbolic=true` to avoid unnecessary recomputation. To further reduce computational overhead, you can disable pattern checks entirely by setting `check_pattern = false`. Note that this may error From d977ad432105df34e403b7202ffdea9e2a06f3a4 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Mon, 28 Jul 2025 17:49:35 -0400 Subject: [PATCH 3/3] Update src/factorization.jl --- src/factorization.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/factorization.jl b/src/factorization.jl index 8797bc874..0aab1c06c 100644 --- a/src/factorization.jl +++ b/src/factorization.jl @@ -887,9 +887,7 @@ A fast sparse LU-factorization which specializes on sparsity patterns with “le !!! note By default, the SparseArrays.jl are implemented for efficiency by caching the - symbolic factorization. - - If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`. + symbolic factorization. If the sparsity pattern of `A` may change between solves, set `reuse_symbolic=false`. If the pattern is assumed or known to be constant, set `reuse_symbolic=true` to avoid unnecessary recomputation. To further reduce computational overhead, you can disable pattern checks entirely by setting `check_pattern = false`. Note that this may error