Skip to content

Commit 36e4dd7

Browse files
committed
default_precond kwarg
1 parent c5bd4cb commit 36e4dd7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/common.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function SciMLBase.init(prob::LinearProblem, alg::Union{SciMLLinearSolveAlgorith
6060
reltol=eps(eltype(prob.A)),
6161
maxiters=length(prob.b),
6262
verbose=false,
63+
preconditioner_scale=one(eltype(prob.A)),
6364
kwargs...,
6465
)
6566
@unpack A, b, u0, p = prob
@@ -70,8 +71,8 @@ function SciMLBase.init(prob::LinearProblem, alg::Union{SciMLLinearSolveAlgorith
7071
isfresh = cacheval === nothing
7172
Tc = isfresh ? Any : typeof(cacheval)
7273

73-
Pl = default_preconditioner(one(eltype(A)), true)
74-
Pr = default_preconditioner(one(eltype(A)), false)
74+
Pl = default_preconditioner(preconditioner_scale, true)
75+
Pr = default_preconditioner(preconditioner_scale, false)
7576

7677
A = alias_A ? A : deepcopy(A)
7778
b = alias_b ? b : deepcopy(b)

0 commit comments

Comments
 (0)