@@ -8,8 +8,6 @@ struct LinearCache{TA,Tb,Tu,Tp,Talg,Tc,Tl,Tr,Ttol}
8
8
isfresh:: Bool # false => cacheval is set wrt A, true => update cacheval wrt A
9
9
Pl:: Tl # store final preconditioner here. not being used rn
10
10
Pr:: Tr # wrappers are using preconditioner in cache.alg for now
11
-
12
- # common arguments
13
11
abstol:: Ttol
14
12
reltol:: Ttol
15
13
maxiters:: Int
@@ -52,7 +50,10 @@ SciMLBase.init(prob::LinearProblem, args...; kwargs...) = SciMLBase.init(prob,no
52
50
53
51
function SciMLBase. init (prob:: LinearProblem , alg:: Union{SciMLLinearSolveAlgorithm,Nothing} , args... ;
54
52
alias_A = false , alias_b = false ,
55
- abstol= 0 , reltol= 0 , maxiters= 0 , verbose= false ,
53
+ abstol= √ eps (eltype (prob. A)),
54
+ reltol= √ eps (eltype (prob. A)),
55
+ maxiters= length (prob. b),
56
+ verbose= false ,
56
57
kwargs... ,
57
58
)
58
59
@unpack A, b, u0, p = prob
@@ -69,11 +70,6 @@ function SciMLBase.init(prob::LinearProblem, alg::Union{SciMLLinearSolveAlgorith
69
70
A = alias_A ? A : deepcopy (A)
70
71
b = alias_b ? b : deepcopy (b)
71
72
72
-
73
- abstol = (abstol == 0 ) ? √ eps (eltype (A)) : abstol
74
- reltol = (reltol == 0 ) ? √ eps (eltype (A)) : reltol
75
- maxiters = (maxiters == 0 ) ? length (b) : maxiters
76
-
77
73
cache = LinearCache{
78
74
typeof (A),
79
75
typeof (b),
@@ -84,7 +80,6 @@ function SciMLBase.init(prob::LinearProblem, alg::Union{SciMLLinearSolveAlgorith
84
80
typeof (Pl),
85
81
typeof (Pr),
86
82
typeof (reltol),
87
- typeof (maxiters)
88
83
}(
89
84
A,
90
85
b,
0 commit comments