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

Commit 0916acf

Browse files
committed
Run formatter
1 parent 7497aa4 commit 0916acf

28 files changed

+310
-315
lines changed

.JuliaFormatter.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
style = "sciml"
22
format_markdown = true
33
annotate_untyped_fields_with_any = false
4-
format_docstrings = true
4+
format_docstrings = true
5+
join_lines_based_on_source = false

ext/SimpleNonlinearSolveChainRulesCoreExt.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ using SimpleNonlinearSolve: SimpleNonlinearSolve
88
# The expectation here is that no-one is using this directly inside a GPU kernel. We can
99
# eventually lift this requirement using a custom adjoint
1010
function ChainRulesCore.rrule(::typeof(SimpleNonlinearSolve.__internal_solve_up),
11-
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg, u0,
12-
u0_changed, p, p_changed, alg, args...; kwargs...)
13-
out, ∇internal = DiffEqBase._solve_adjoint(prob, sensealg, u0, p,
14-
ChainRulesOriginator(), alg, args...; kwargs...)
11+
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem},
12+
sensealg, u0, u0_changed, p, p_changed, alg, args...; kwargs...)
13+
out, ∇internal = DiffEqBase._solve_adjoint(
14+
prob, sensealg, u0, p, ChainRulesOriginator(), alg, args...; kwargs...)
1515
function ∇__internal_solve_up(Δ)
1616
∂f, ∂prob, ∂sensealg, ∂u0, ∂p, ∂originator, ∂args... = ∇internal(Δ)
17-
return (∂f, ∂prob, ∂sensealg, ∂u0, NoTangent(), ∂p, NoTangent(), NoTangent(),
18-
∂args...)
17+
return (
18+
f, ∂prob, ∂sensealg, ∂u0, NoTangent(), ∂p, NoTangent(), NoTangent(), ∂args...)
1919
end
2020
return out, ∇__internal_solve_up
2121
end

ext/SimpleNonlinearSolvePolyesterForwardDiffExt.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ using SimpleNonlinearSolve: SimpleNonlinearSolve
55

66
@inline SimpleNonlinearSolve.__is_extension_loaded(::Val{:PolyesterForwardDiff}) = true
77

8-
@inline function SimpleNonlinearSolve.__polyester_forwarddiff_jacobian!(f!::F, y, J, x,
9-
chunksize) where {F}
8+
@inline function SimpleNonlinearSolve.__polyester_forwarddiff_jacobian!(
9+
f!::F, y, J, x, chunksize) where {F}
1010
PolyesterForwardDiff.threaded_jacobian!(f!, y, J, x, chunksize)
1111
return J
1212
end
1313

14-
@inline function SimpleNonlinearSolve.__polyester_forwarddiff_jacobian!(f::F, J, x,
15-
chunksize) where {F}
14+
@inline function SimpleNonlinearSolve.__polyester_forwarddiff_jacobian!(
15+
f::F, J, x, chunksize) where {F}
1616
PolyesterForwardDiff.threaded_jacobian!(f, J, x, chunksize)
1717
return J
1818
end

ext/SimpleNonlinearSolveReverseDiffExt.jl

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,52 +9,53 @@ using SimpleNonlinearSolve: SimpleNonlinearSolve
99
function SimpleNonlinearSolve.__internal_solve_up(
1010
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg,
1111
u0::TrackedArray, u0_changed, p::TrackedArray, p_changed, alg, args...; kwargs...)
12-
return ReverseDiff.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg, u0,
13-
u0_changed, p, p_changed, alg, args...; kwargs...)
12+
return ReverseDiff.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg,
13+
u0, u0_changed, p, p_changed, alg, args...; kwargs...)
1414
end
1515

1616
function SimpleNonlinearSolve.__internal_solve_up(
17-
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg, u0, u0_changed,
18-
p::TrackedArray, p_changed, alg, args...; kwargs...)
19-
return ReverseDiff.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg, u0,
20-
u0_changed, p, p_changed, alg, args...; kwargs...)
17+
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg,
18+
u0, u0_changed, p::TrackedArray, p_changed, alg, args...; kwargs...)
19+
return ReverseDiff.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg,
20+
u0, u0_changed, p, p_changed, alg, args...; kwargs...)
2121
end
2222

2323
function SimpleNonlinearSolve.__internal_solve_up(
2424
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg,
2525
u0::TrackedArray, u0_changed, p, p_changed, alg, args...; kwargs...)
26-
return ReverseDiff.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg, u0,
27-
u0_changed, p, p_changed, alg, args...; kwargs...)
26+
return ReverseDiff.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg,
27+
u0, u0_changed, p, p_changed, alg, args...; kwargs...)
2828
end
2929

3030
function SimpleNonlinearSolve.__internal_solve_up(
31-
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg,
32-
u0::AbstractArray{<:TrackedReal}, u0_changed, p::AbstractArray{<:TrackedReal},
33-
p_changed, alg, args...; kwargs...)
31+
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem},
32+
sensealg, u0::AbstractArray{<:TrackedReal}, u0_changed,
33+
p::AbstractArray{<:TrackedReal}, p_changed, alg, args...; kwargs...)
3434
return SimpleNonlinearSolve.__internal_solve_up(
3535
prob, sensealg, ArrayInterface.aos_to_soa(u0), true,
3636
ArrayInterface.aos_to_soa(p), true, alg, args...; kwargs...)
3737
end
3838

3939
function SimpleNonlinearSolve.__internal_solve_up(
40-
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg, u0, u0_changed,
41-
p::AbstractArray{<:TrackedReal}, p_changed, alg, args...; kwargs...)
40+
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg, u0,
41+
u0_changed, p::AbstractArray{<:TrackedReal}, p_changed, alg, args...; kwargs...)
4242
return SimpleNonlinearSolve.__internal_solve_up(
43-
prob, sensealg, u0, true, ArrayInterface.aos_to_soa(p), true, alg, args...;
44-
kwargs...)
43+
prob, sensealg, u0, true, ArrayInterface.aos_to_soa(p),
44+
true, alg, args...; kwargs...)
4545
end
4646

4747
function SimpleNonlinearSolve.__internal_solve_up(
48-
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg,
49-
u0::AbstractArray{<:TrackedReal}, u0_changed, p, p_changed, alg, args...; kwargs...)
48+
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem},
49+
sensealg, u0::AbstractArray{<:TrackedReal},
50+
u0_changed, p, p_changed, alg, args...; kwargs...)
5051
return SimpleNonlinearSolve.__internal_solve_up(
51-
prob, sensealg, u0, true, ArrayInterface.aos_to_soa(p), true, alg, args...;
52-
kwargs...)
52+
prob, sensealg, u0, true, ArrayInterface.aos_to_soa(p),
53+
true, alg, args...; kwargs...)
5354
end
5455

5556
ReverseDiff.@grad function SimpleNonlinearSolve.__internal_solve_up(
56-
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg, u0,
57-
u0_changed, p, p_changed, alg, args...; kwargs...)
57+
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem},
58+
sensealg, u0, u0_changed, p, p_changed, alg, args...; kwargs...)
5859
out, ∇internal = DiffEqBase._solve_adjoint(
5960
prob, sensealg, ReverseDiff.value(u0), ReverseDiff.value(p),
6061
ReverseDiffOriginator(), alg, args...; kwargs...)

ext/SimpleNonlinearSolveTrackerExt.jl

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,33 @@ using SimpleNonlinearSolve: SimpleNonlinearSolve
66
using Tracker: Tracker, TrackedArray
77

88
function SimpleNonlinearSolve.__internal_solve_up(
9-
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem},
10-
sensealg, u0::TrackedArray, u0_changed, p, p_changed, alg, args...; kwargs...)
11-
return Tracker.track(
12-
SimpleNonlinearSolve.__internal_solve_up, prob, sensealg, u0, u0_changed,
13-
p, p_changed, alg, args...; kwargs...)
9+
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg,
10+
u0::TrackedArray, u0_changed, p, p_changed, alg, args...; kwargs...)
11+
return Tracker.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg,
12+
u0, u0_changed, p, p_changed, alg, args...; kwargs...)
1413
end
1514

1615
function SimpleNonlinearSolve.__internal_solve_up(
1716
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg,
1817
u0::TrackedArray, u0_changed, p::TrackedArray, p_changed, alg, args...; kwargs...)
19-
return Tracker.track(
20-
SimpleNonlinearSolve.__internal_solve_up, prob, sensealg, u0, u0_changed,
21-
p, p_changed, alg, args...; kwargs...)
18+
return Tracker.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg,
19+
u0, u0_changed, p, p_changed, alg, args...; kwargs...)
2220
end
2321

2422
function SimpleNonlinearSolve.__internal_solve_up(
25-
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem},
26-
sensealg, u0, u0_changed, p::TrackedArray, p_changed, alg, args...; kwargs...)
27-
return Tracker.track(
28-
SimpleNonlinearSolve.__internal_solve_up, prob, sensealg, u0, u0_changed,
29-
p, p_changed, alg, args...; kwargs...)
23+
prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}, sensealg,
24+
u0, u0_changed, p::TrackedArray, p_changed, alg, args...; kwargs...)
25+
return Tracker.track(SimpleNonlinearSolve.__internal_solve_up, prob, sensealg,
26+
u0, u0_changed, p, p_changed, alg, args...; kwargs...)
3027
end
3128

3229
Tracker.@grad function SimpleNonlinearSolve.__internal_solve_up(
3330
_prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem},
3431
sensealg, u0_, u0_changed, p_, p_changed, alg, args...; kwargs...)
3532
u0, p = Tracker.data(u0_), Tracker.data(p_)
3633
prob = remake(_prob; u0, p)
37-
out, ∇internal = DiffEqBase._solve_adjoint(prob, sensealg, u0, p,
38-
SciMLBase.TrackerOriginator(), alg, args...; kwargs...)
34+
out, ∇internal = DiffEqBase._solve_adjoint(
35+
prob, sensealg, u0, p, SciMLBase.TrackerOriginator(), alg, args...; kwargs...)
3936

4037
function ∇__internal_solve_up(Δ)
4138
∂prob, ∂sensealg, ∂u0, ∂p, ∂originator, ∂args... = ∇internal(Δ)

src/SimpleNonlinearSolve.jl

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,15 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Nothing, args...;
5656
end
5757

5858
# By Pass the highlevel checks for NonlinearProblem for Simple Algorithms
59-
function SciMLBase.solve(
60-
prob::NonlinearProblem, alg::AbstractSimpleNonlinearSolveAlgorithm,
59+
function SciMLBase.solve(prob::NonlinearProblem, alg::AbstractSimpleNonlinearSolveAlgorithm,
6160
args...; sensealg = nothing, u0 = nothing, p = nothing, kwargs...)
6261
if sensealg === nothing && haskey(prob.kwargs, :sensealg)
6362
sensealg = prob.kwargs[:sensealg]
6463
end
6564
new_u0 = u0 !== nothing ? u0 : prob.u0
6665
new_p = p !== nothing ? p : prob.p
67-
return __internal_solve_up(
68-
prob, sensealg, new_u0, u0 === nothing, new_p, p === nothing,
69-
alg, args...; prob.kwargs..., kwargs...)
66+
return __internal_solve_up(prob, sensealg, new_u0, u0 === nothing, new_p,
67+
p === nothing, alg, args...; prob.kwargs..., kwargs...)
7068
end
7169

7270
function __internal_solve_up(_prob::NonlinearProblem, sensealg, u0, u0_changed,
@@ -78,10 +76,10 @@ end
7876
@setup_workload begin
7977
for T in (Float32, Float64)
8078
prob_no_brack_scalar = NonlinearProblem{false}((u, p) -> u .* u .- p, T(0.1), T(2))
81-
prob_no_brack_iip = NonlinearProblem{true}((du, u, p) -> du .= u .* u .- p,
82-
T.([1.0, 1.0, 1.0]), T(2))
83-
prob_no_brack_oop = NonlinearProblem{false}((u, p) -> u .* u .- p,
84-
T.([1.0, 1.0, 1.0]), T(2))
79+
prob_no_brack_iip = NonlinearProblem{true}(
80+
(du, u, p) -> du .= u .* u .- p, T.([1.0, 1.0, 1.0]), T(2))
81+
prob_no_brack_oop = NonlinearProblem{false}(
82+
(u, p) -> u .* u .- p, T.([1.0, 1.0, 1.0]), T(2))
8583

8684
algs = [SimpleNewtonRaphson(), SimpleBroyden(), SimpleKlement(), SimpleDFSane(),
8785
SimpleTrustRegion(), SimpleLimitedMemoryBroyden(; threshold = 2)]
@@ -101,8 +99,8 @@ end
10199
end
102100
end
103101

104-
prob_brack = IntervalNonlinearProblem{false}((u, p) -> u * u - p,
105-
T.((0.0, 2.0)), T(2))
102+
prob_brack = IntervalNonlinearProblem{false}(
103+
(u, p) -> u * u - p, T.((0.0, 2.0)), T(2))
106104
algs = [Bisection(), Falsi(), Ridder(), Brent(), Alefeld(), ITP()]
107105
@compile_workload begin
108106
for alg in algs

src/ad.jl

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
function SciMLBase.solve(
2-
prob::NonlinearProblem{<:Union{Number, <:AbstractArray},
3-
iip, <:Union{<:Dual{T, V, P}, <:AbstractArray{<:Dual{T, V, P}}}},
4-
alg::AbstractSimpleNonlinearSolveAlgorithm, args...; kwargs...) where {T, V, P, iip}
2+
prob::NonlinearProblem{<:Union{Number, <:AbstractArray}, iip,
3+
<:Union{<:Dual{T, V, P}, <:AbstractArray{<:Dual{T, V, P}}}},
4+
alg::AbstractSimpleNonlinearSolveAlgorithm,
5+
args...;
6+
kwargs...) where {T, V, P, iip}
57
sol, partials = __nlsolve_ad(prob, alg, args...; kwargs...)
68
dual_soln = __nlsolve_dual_soln(sol.u, partials, prob.p)
79
return SciMLBase.build_solution(
810
prob, alg, dual_soln, sol.resid; sol.retcode, sol.stats, sol.original)
911
end
1012

1113
function SciMLBase.solve(
12-
prob::NonlinearLeastSquaresProblem{<:AbstractArray,
13-
iip, <:Union{<:AbstractArray{<:Dual{T, V, P}}}},
14-
alg::AbstractSimpleNonlinearSolveAlgorithm, args...; kwargs...) where {T, V, P, iip}
14+
prob::NonlinearLeastSquaresProblem{
15+
<:AbstractArray, iip, <:Union{<:AbstractArray{<:Dual{T, V, P}}}},
16+
alg::AbstractSimpleNonlinearSolveAlgorithm,
17+
args...;
18+
kwargs...) where {T, V, P, iip}
1519
sol, partials = __nlsolve_ad(prob, alg, args...; kwargs...)
1620
dual_soln = __nlsolve_dual_soln(sol.u, partials, prob.p)
1721
return SciMLBase.build_solution(
@@ -21,13 +25,16 @@ end
2125
for algType in (Bisection, Brent, Alefeld, Falsi, ITP, Ridder)
2226
@eval begin
2327
function SciMLBase.solve(
24-
prob::IntervalNonlinearProblem{uType, iip,
25-
<:Union{<:Dual{T, V, P}, <:AbstractArray{<:Dual{T, V, P}}}},
26-
alg::$(algType), args...; kwargs...) where {uType, T, V, P, iip}
28+
prob::IntervalNonlinearProblem{
29+
uType, iip, <:Union{<:Dual{T, V, P}, <:AbstractArray{<:Dual{T, V, P}}}},
30+
alg::$(algType),
31+
args...;
32+
kwargs...) where {uType, T, V, P, iip}
2733
sol, partials = __nlsolve_ad(prob, alg, args...; kwargs...)
2834
dual_soln = __nlsolve_dual_soln(sol.u, partials, prob.p)
29-
return SciMLBase.build_solution(prob, alg, dual_soln, sol.resid; sol.retcode,
30-
sol.stats, sol.original, left = Dual{T, V, P}(sol.left, partials),
35+
return SciMLBase.build_solution(
36+
prob, alg, dual_soln, sol.resid; sol.retcode, sol.stats,
37+
sol.original, left = Dual{T, V, P}(sol.left, partials),
3138
right = Dual{T, V, P}(sol.right, partials))
3239
end
3340
end
@@ -125,9 +132,8 @@ function __nlsolve_ad(prob::NonlinearLeastSquaresProblem, alg, args...; kwargs..
125132
else
126133
_F = @closure (u, p) -> begin
127134
T = promote_type(eltype(u), eltype(p))
128-
res = DiffResults.DiffResult(
129-
similar(u, T, size(sol.resid)), similar(
130-
u, T, length(sol.resid), length(u)))
135+
res = DiffResults.DiffResult(similar(u, T, size(sol.resid)),
136+
similar(u, T, length(sol.resid), length(u)))
131137
ForwardDiff.jacobian!(res, Base.Fix2(prob.f, p), u)
132138
return reshape(
133139
2 .* vec(DiffResults.value(res))' * DiffResults.jacobian(res),

src/bracketing/alefeld.jl

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Alefeld, args...;
1515
c = a - (b - a) / (f(b) - f(a)) * f(a)
1616

1717
fc = f(c)
18-
(a == c || b == c) &&
19-
return build_solution(prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit,
20-
left = a, right = b)
21-
iszero(fc) &&
22-
return build_solution(prob, alg, c, fc; retcode = ReturnCode.Success, left = a,
23-
right = b)
18+
(a == c || b == c) && return build_solution(
19+
prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit, left = a, right = b)
20+
iszero(fc) && return build_solution(
21+
prob, alg, c, fc; retcode = ReturnCode.Success, left = a, right = b)
2422
a, b, d = _bracket(f, a, b, c)
2523
e = zero(a) # Set e as 0 before iteration to avoid a non-value f(e)
2624

@@ -38,12 +36,10 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Alefeld, args...;
3836
end
3937
ē, fc = d, f(c)
4038
(a == c || b == c) &&
41-
return build_solution(
42-
prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit,
43-
left = a, right = b)
44-
iszero(fc) &&
45-
return build_solution(prob, alg, c, fc; retcode = ReturnCode.Success,
39+
return build_solution(prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit,
4640
left = a, right = b)
41+
iszero(fc) && return build_solution(
42+
prob, alg, c, fc; retcode = ReturnCode.Success, left = a, right = b)
4743
ā, b̄, d̄ = _bracket(f, a, b, c)
4844

4945
# The second bracketing block
@@ -58,12 +54,10 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Alefeld, args...;
5854
end
5955
fc = f(c)
6056
(ā == c ||== c) &&
61-
return build_solution(
62-
prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit,
63-
left = ā, right = b̄)
64-
iszero(fc) &&
65-
return build_solution(prob, alg, c, fc; retcode = ReturnCode.Success,
57+
return build_solution(prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit,
6658
left = ā, right = b̄)
59+
iszero(fc) && return build_solution(
60+
prob, alg, c, fc; retcode = ReturnCode.Success, left = ā, right = b̄)
6761
ā, b̄, d̄ = _bracket(f, ā, b̄, c)
6862

6963
# The third bracketing block
@@ -78,12 +72,10 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Alefeld, args...;
7872
end
7973
fc = f(c)
8074
(ā == c ||== c) &&
81-
return build_solution(
82-
prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit,
83-
left = ā, right = b̄)
84-
iszero(fc) &&
85-
return build_solution(prob, alg, c, fc; retcode = ReturnCode.Success,
75+
return build_solution(prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit,
8676
left = ā, right = b̄)
77+
iszero(fc) && return build_solution(
78+
prob, alg, c, fc; retcode = ReturnCode.Success, left = ā, right = b̄)
8779
ā, b̄, d = _bracket(f, ā, b̄, c)
8880

8981
# The last bracketing block
@@ -93,12 +85,11 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Alefeld, args...;
9385
e = d
9486
c = 0.5 * (ā + b̄)
9587
fc = f(c)
96-
(ā == c ||== c) &&
97-
return build_solution(prob, alg, c, fc;
98-
retcode = ReturnCode.FloatingPointLimit, left = ā, right = b̄)
99-
iszero(fc) &&
100-
return build_solution(prob, alg, c, fc; retcode = ReturnCode.Success,
101-
left = ā, right = b̄)
88+
(ā == c ||== c) && return build_solution(
89+
prob, alg, c, fc; retcode = ReturnCode.FloatingPointLimit,
90+
left = ā, right = b̄)
91+
iszero(fc) && return build_solution(
92+
prob, alg, c, fc; retcode = ReturnCode.Success, left = ā, right = b̄)
10293
a, b, d = _bracket(f, ā, b̄, c)
10394
end
10495
end
@@ -112,8 +103,8 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::Alefeld, args...;
112103
fc = f(c)
113104

114105
# Reuturn solution when run out of max interation
115-
return build_solution(prob, alg, c, fc; retcode = ReturnCode.MaxIters,
116-
left = a, right = b)
106+
return build_solution(
107+
prob, alg, c, fc; retcode = ReturnCode.MaxIters, left = a, right = b)
117108
end
118109

119110
# Define subrotine function bracket, check fc before bracket to return solution

0 commit comments

Comments
 (0)