File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ Then refactorization will occur when a new `A` is given:
5555
5656``` julia
5757A2 = rand (n,n)
58- linsolve = LinearSolve. set_A (linsolve ,A2)
58+ linsolve = LinearSolve. set_A (sol2 . cache ,A2)
5959sol3 = solve (linsolve)
6060
6161sol3. 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+
7175The advantage of course with using LinearSolve.jl in this form is that it is
7276efficient while being agnostic to the linear solver. One can easily swap in
7377iterative solvers, sparse solvers, etc. and it will do all of the tricks like
You can’t perform that action at this time.
0 commit comments