Skip to content

Commit 3d6cabd

Browse files
committed
yingbo comments
1 parent 009d142 commit 3d6cabd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/common.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ struct LinearCache{TA,Tb,Tu,Tp,Talg,Tc,Tl,Tr}
66
alg::Talg
77
cacheval::Tc # store alg cache here
88
isfresh::Bool # false => cacheval is set wrt A, true => update cacheval wrt A
9-
#
109
Pl::Tl # store final preconditioner here. not being used rn
1110
Pr::Tr # wrappers are using preconditioner in cache.alg for now
1211
end
1312

14-
function set_A(cache::LinearCache, A) # and ! to function name
13+
function set_A(cache::LinearCache, A)
1514
@set! cache.A = A
1615
@set! cache.isfresh = true
1716
return cache
@@ -49,10 +48,10 @@ function SciMLBase.init(prob::LinearProblem, alg, args...;
4948
)
5049
@unpack A, b, u0, p = prob
5150

52-
u0 = (u0 == nothing) ? zero(b) : u0
51+
u0 = (u0 === nothing) ? zero(b) : u0
5352

5453
cacheval = init_cacheval(alg, A, b, u0)
55-
isfresh = cacheval == nothing
54+
isfresh = cacheval === nothing
5655
Tc = isfresh ? Any : typeof(cacheval)
5756

5857
Pl = LinearAlgebra.I

0 commit comments

Comments
 (0)