@@ -70,16 +70,15 @@ function CommonSolve.solve(
70
70
left, abstol, promote_type (eltype (left), eltype (right))
71
71
)
72
72
73
- stats = SciMLBase. NLStats (2 ,0 ,0 ,0 ,0 )
74
73
if iszero (fl)
75
74
return SciMLBase. build_solution (
76
- prob, alg, left, fl; retcode = ReturnCode. ExactSolutionLeft, left, right, stats
75
+ prob, alg, left, fl; retcode = ReturnCode. ExactSolutionLeft, left, right
77
76
)
78
77
end
79
78
80
79
if iszero (fr)
81
80
return SciMLBase. build_solution (
82
- prob, alg, right, fr; retcode = ReturnCode. ExactSolutionRight, left, right, stats
81
+ prob, alg, right, fr; retcode = ReturnCode. ExactSolutionRight, left, right
83
82
)
84
83
end
85
84
@@ -88,7 +87,7 @@ function CommonSolve.solve(
88
87
@warn " The interval is not an enclosing interval, opposite signs at the \
89
88
boundaries are required."
90
89
return SciMLBase. build_solution (
91
- prob, alg, left, fl; retcode = ReturnCode. InitialFailure, left, right, stats
90
+ prob, alg, left, fl; retcode = ReturnCode. InitialFailure, left, right
92
91
)
93
92
end
94
93
@@ -103,7 +102,6 @@ function CommonSolve.solve(
103
102
104
103
i = 1
105
104
while i ≤ maxiters
106
- stats. nsteps += 1
107
105
span = right - left
108
106
mid = (left + right) / 2
109
107
r = ϵ_s - (span / 2 )
@@ -118,19 +116,18 @@ function CommonSolve.solve(
118
116
xp = ifelse (abs (xt - mid) ≤ r, xt, mid - copysign (r, diff)) # Projection Step
119
117
if span < 2 ϵ
120
118
return SciMLBase. build_solution (
121
- prob, alg, xt, f (xt); retcode = ReturnCode. Success, left, right, stats
119
+ prob, alg, xt, f (xt); retcode = ReturnCode. Success, left, right
122
120
)
123
121
end
124
122
yp = f (xp)
125
- stats. nf += 1
126
123
yps = yp * sign (fr)
127
124
if yps > T0
128
125
right, fr = xp, yp
129
126
elseif yps < T0
130
127
left, fl = xp, yp
131
128
else
132
129
return SciMLBase. build_solution (
133
- prob, alg, xp, yps; retcode = ReturnCode. Success, left, right, stats
130
+ prob, alg, xp, yps; retcode = ReturnCode. Success, left, right
134
131
)
135
132
end
136
133
@@ -139,12 +136,12 @@ function CommonSolve.solve(
139
136
140
137
if nextfloat (left) == right
141
138
return SciMLBase. build_solution (
142
- prob, alg, right, fr; retcode = ReturnCode. FloatingPointLimit, left, right, stats
139
+ prob, alg, right, fr; retcode = ReturnCode. FloatingPointLimit, left, right
143
140
)
144
141
end
145
142
end
146
143
147
144
return SciMLBase. build_solution (
148
- prob, alg, left, fl; retcode = ReturnCode. MaxIters, left, right, stats
145
+ prob, alg, left, fl; retcode = ReturnCode. MaxIters, left, right
149
146
)
150
147
end
0 commit comments