Skip to content

Commit c39aba7

Browse files
fix caching docs
1 parent 041896c commit c39aba7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/src/tutorials/caching_interface.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Then refactorization will occur when a new `A` is given:
5555

5656
```julia
5757
A2 = rand(n,n)
58-
linsolve = LinearSolve.set_A(linsolve,A2)
58+
linsolve = LinearSolve.set_A(sol2.cache,A2)
5959
sol3 = solve(linsolve)
6060

6161
sol3.u
@@ -68,6 +68,10 @@ sol3.u
6868
=#
6969
```
7070

71+
The factorization occurs on the first solve, and it stores the factorization in
72+
the cache. You can retrieve this cache via `sol.cache`, which is the same object
73+
as the `init` but updated to know not to re-solve the factorization.
74+
7175
The advantage of course with using LinearSolve.jl in this form is that it is
7276
efficient while being agnostic to the linear solver. One can easily swap in
7377
iterative solvers, sparse solvers, etc. and it will do all of the tricks like

0 commit comments

Comments
 (0)