Skip to content

Commit bff7b31

Browse files
committed
Fix compat errors
Signed-off-by: ErikQQY <2283984853@qq.com>
1 parent e846557 commit bff7b31

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ NonlinearSolveZygoteExt = "Zygote"
5353
ADTypes = "0.2.5"
5454
Aqua = "0.8"
5555
ArrayInterface = "7.6"
56-
BandedMatrices = "0.17, 1.4"
56+
BandedMatrices = "1.4"
5757
BenchmarkTools = "1.4"
5858
ConcreteStructs = "0.2"
5959
DiffEqBase = "6.144"
@@ -67,7 +67,7 @@ LazyArrays = "1.8.2"
6767
LeastSquaresOptim = "0.8.5"
6868
LineSearches = "7.2"
6969
LinearAlgebra = "<0.0.1, 1"
70-
LinearSolve = "2"
70+
LinearSolve = "2.21"
7171
MINPACK = "1.2"
7272
MaybeInplace = "0.1.1"
7373
NLsolve = "4.5"
@@ -83,7 +83,7 @@ Reexport = "1.2"
8383
SafeTestsets = "0.1"
8484
SciMLBase = "2.11"
8585
SciMLOperators = "0.3.7"
86-
SIAMFANLEquations = "1.0.0"
86+
SIAMFANLEquations = "1.0.1"
8787
SimpleNonlinearSolve = "1.0.2"
8888
SparseArrays = "<0.0.1, 1"
8989
SparseDiffTools = "2.14"

ext/NonlinearSolveSIAMFANLEquationsExt.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import UnPack: @unpack
77
import FiniteDiff, ForwardDiff
88

99
function SciMLBase.__solve(prob::NonlinearProblem, alg::SIAMFANLEquationsJL, args...; abstol = 1e-8,
10-
reltol = 1e-8, alias_u0::Bool = false, maxiters = 1000, kwargs...)
10+
reltol = 1e-8, alias_u0::Bool = false, maxiters = 1000, termination_condition = nothing, kwargs...)
11+
@assert (termination_condition === nothing) || (termination_condition isa AbsNormTerminationMode) "SIAMFANLEquationsJL does not support termination conditions!"
12+
1113
@unpack method, autodiff, show_trace, delta, linsolve = alg
1214

1315
iip = SciMLBase.isinplace(prob)
@@ -39,7 +41,7 @@ function SciMLBase.__solve(prob::NonlinearProblem, alg::SIAMFANLEquationsJL, arg
3941
elseif res.errcode == -1
4042
retcode = ReturnCode.Default
4143
end
42-
stats = method == :pseudotransient ? nothing : (SciMLBase.NLStats(res.stats.ifun[1], res.stats.ijac[1], -1, -1, res.stats.iarm[1]))
44+
stats = method == :pseudotransient ? nothing : (SciMLBase.NLStats(res.stats.ifun[1], res.stats.ijac[1], 0, 0, res.stats.iarm[1]))
4345
return SciMLBase.build_solution(prob, alg, res.solution, res.history; retcode, stats)
4446
else
4547
u = NonlinearSolve.__maybe_unaliased(prob.u0, alias_u0)
@@ -86,7 +88,7 @@ function SciMLBase.__solve(prob::NonlinearProblem, alg::SIAMFANLEquationsJL, arg
8688
elseif res.errcode == -1
8789
retcode = ReturnCode.Default
8890
end
89-
stats = method == :pseudotransient ? nothing : (SciMLBase.NLStats(res.stats.ifun[1], res.stats.ijac[1], -1, -1, res.stats.iarm[1]))
91+
stats = method == :pseudotransient ? nothing : (SciMLBase.NLStats(res.stats.ifun[1], res.stats.ijac[1], 0, 0, res.stats.iarm[1]))
9092
return SciMLBase.build_solution(prob, alg, res.solution, res.history; retcode, stats)
9193
end
9294

@@ -163,7 +165,7 @@ function SciMLBase.__solve(prob::NonlinearProblem, alg::SIAMFANLEquationsJL, arg
163165

164166

165167
# pseudo transient continuation has a fixed cost per iteration, iteration statistics are not interesting here.
166-
stats = method == :pseudotransient ? nothing : (SciMLBase.NLStats(res.stats.ifun[1], res.stats.ijac[1], -1, -1, res.stats.iarm[1]))
168+
stats = method == :pseudotransient ? nothing : (SciMLBase.NLStats(res.stats.ifun[1], res.stats.ijac[1], 0, 0, res.stats.iarm[1]))
167169
return SciMLBase.build_solution(prob, alg, res.solution, res.history; retcode, stats)
168170
end
169171

0 commit comments

Comments
 (0)