Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 4bc41c7

Browse files
committed
Use a mutable struct instead of Dict for Safe termination
1 parent 5876bba commit 4bc41c7

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Manifest.toml
2-
2+
.vscode
33
wip

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SimpleBatchedNonlinearSolveExt = "NNlib"
2323

2424
[compat]
2525
ArrayInterface = "6, 7"
26-
DiffEqBase = "6.119"
26+
DiffEqBase = "6.123.0"
2727
FiniteDiff = "2"
2828
ForwardDiff = "0.10.3"
2929
NNlib = "0.8"

ext/SimpleBatchedNonlinearSolveExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ function SciMLBase.__solve(prob::NonlinearProblem, alg::Broyden{true}, args...;
5959
error("Broyden currently doesn't support SAFE_BEST termination modes")
6060
end
6161

62-
storage = mode DiffEqBase.SAFE_TERMINATION_MODES ? Dict() : nothing
62+
storage = mode DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() :
63+
nothing
6364
termination_condition = tc(storage)
6465

6566
xₙ = x

src/broyden.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ function SciMLBase.__solve(prob::NonlinearProblem, alg::Broyden{false}, args...;
4848
error("Broyden currently doesn't support SAFE_BEST termination modes")
4949
end
5050

51-
storage = mode DiffEqBase.SAFE_TERMINATION_MODES ? Dict() : nothing
51+
storage = mode DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() :
52+
nothing
5253
termination_condition = tc(storage)
5354

5455
xₙ = x

src/lbroyden.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ end
6363
error("LBroyden currently doesn't support SAFE_BEST termination modes")
6464
end
6565

66-
storage = mode DiffEqBase.SAFE_TERMINATION_MODES ? Dict() : nothing
66+
storage = mode DiffEqBase.SAFE_TERMINATION_MODES ? NLSolveSafeTerminationResult() :
67+
nothing
6768
termination_condition = tc(storage)
6869

6970
xₙ = x

0 commit comments

Comments
 (0)