From 21653e44761ef6c707fdb417db35c99b6937a170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Fuhrmann?= Date: Mon, 13 Jul 2026 21:08:52 +0200 Subject: [PATCH] Allow for LinearSolve v5 Much better usage pattern regarding linear solver cache. This, however was possible since at least LinearSolve v2. --- Project.toml | 2 +- test/test_linearsolve.jl | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 39c6514..878a82d 100644 --- a/Project.toml +++ b/Project.toml @@ -36,7 +36,7 @@ IncompleteLU = "^0.2.1" InteractiveUtils = "1.11.0" IterativeSolvers = "0.9" LinearAlgebra = "1.10" -LinearSolve = "2.36.0, 3.7.1,4" +LinearSolve = "2.36.0, 3.7.1,4,5" Metis = "1" MultiFloats = "1, 2, 3" OhMyThreads = "0.6, 0.7, 0.8" diff --git a/test/test_linearsolve.jl b/test/test_linearsolve.jl index c7a5faf..60221aa 100644 --- a/test/test_linearsolve.jl +++ b/test/test_linearsolve.jl @@ -28,9 +28,8 @@ function test_ls2(T, k, l, m; linsolver = SparspakFactorization()) A = fdrand(T, k, l, m; rand = () -> 1, matrixtype = ExtendableSparseMatrix) b = T.(rand(k * l * m)) p = LinearProblem(A, b) - x0 = solve(p, linsolver) - cache = x0.cache - x0 = copy(x0) + cache = init(p, linsolver) + x0 = copy(solve!(cache)) nonzeros(A) .-= 1.0e-4 for i in 1:(k * l * m) A[i, i] += 1.0e-4