I think the documentation on how to use reuse_symbolic for some of the direct solvers is lacking. If I understand everything correctly, I think you have to manually trigger the isfresh field:
linsolve = LS.init(prob, solver)
sol1 = LS.solve!(linsolve)
# Update matrix but not pattern
# linsolve.A = 2 * K #BAD: This triggers new refactorization
linsolve.A.nzval .= 2 .* K.nzval #This does not update isfresh to true
linsolve.isfresh = true #Manually trigger isfresh
sol2 = LS.solve!(linsolve)
As far I can see, this is not described in the documentation. I would suggest adding a how-to here: https://docs.sciml.ai/LinearSolve/stable/tutorials/caching_interface/
I think the documentation on how to use
reuse_symbolicfor some of the direct solvers is lacking. If I understand everything correctly, I think you have to manually trigger the isfresh field:As far I can see, this is not described in the documentation. I would suggest adding a how-to here: https://docs.sciml.ai/LinearSolve/stable/tutorials/caching_interface/