@@ -39,7 +39,7 @@ export quadratic_f, quadratic_f!, quadratic_f2, newton_fails, TERMINATION_CONDIT
39
39
40
40
end
41
41
42
- @testitem " First Order Methods" setup= [RootfindingTesting] begin
42
+ @testitem " First Order Methods" setup= [RootfindingTesting] tags = [ :core ] begin
43
43
@testset " $(alg) " for alg in (SimpleNewtonRaphson, SimpleTrustRegion,
44
44
(args... ; kwargs... ) -> SimpleTrustRegion (args... ; nlsolve_update_rule = Val (true ),
45
45
kwargs... ))
70
70
end
71
71
end
72
72
73
- @testitem " SimpleHalley" setup= [RootfindingTesting] begin
73
+ @testitem " SimpleHalley" setup= [RootfindingTesting] tags = [ :core ] begin
74
74
@testset " AutoDiff: $(nameof (typeof (autodiff))) " for autodiff in (AutoFiniteDiff (),
75
75
AutoForwardDiff ())
76
76
@testset " [OOP] u0: $(nameof (typeof (u0))) " for u0 in ([1.0 , 1.0 ],
89
89
end
90
90
end
91
91
92
- @testitem " Derivative Free Metods" setup= [RootfindingTesting] begin
92
+ @testitem " Derivative Free Metods" setup= [RootfindingTesting] tags = [ :core ] begin
93
93
@testset " $(nameof (typeof (alg))) " for alg in [SimpleBroyden (), SimpleKlement (),
94
94
SimpleDFSane (), SimpleLimitedMemoryBroyden (),
95
95
SimpleBroyden (; linesearch = Val (true )),
115
115
end
116
116
end
117
117
118
- @testitem " Newton Fails" setup= [RootfindingTesting] begin
118
+ @testitem " Newton Fails" setup= [RootfindingTesting] tags = [ :core ] begin
119
119
u0 = [- 10.0 , - 1.0 , 1.0 , 2.0 , 3.0 , 4.0 , 10.0 ]
120
120
p = [0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ]
121
121
@@ -127,13 +127,13 @@ end
127
127
end
128
128
end
129
129
130
- @testitem " Kwargs Propagation" setup= [RootfindingTesting] begin
130
+ @testitem " Kwargs Propagation" setup= [RootfindingTesting] tags = [ :core ] begin
131
131
prob = NonlinearProblem (quadratic_f, ones (4 ), 2.0 ; maxiters = 2 )
132
132
sol = solve (prob, SimpleNewtonRaphson ())
133
133
@test sol. retcode === ReturnCode. MaxIters
134
134
end
135
135
136
- @testitem " Allocation Checks" setup= [RootfindingTesting] begin
136
+ @testitem " Allocation Checks" setup= [RootfindingTesting] tags = [ :core ] begin
137
137
if Sys. islinux () # Very slow on other OS
138
138
@testset " $(nameof (typeof (alg))) " for alg in (SimpleNewtonRaphson (),
139
139
SimpleHalley (), SimpleBroyden (), SimpleKlement (), SimpleLimitedMemoryBroyden (),
165
165
end
166
166
end
167
167
168
- @testitem " Interval Nonlinear Problems" setup= [RootfindingTesting] begin
168
+ @testitem " Interval Nonlinear Problems" setup= [RootfindingTesting] tags = [ :core ] begin
169
169
@testset " $(nameof (typeof (alg))) " for alg in (Bisection (), Falsi (), Ridder (), Brent (),
170
170
ITP (), Alefeld ())
171
171
tspan = (1.0 , 20.0 )
209
209
end
210
210
end
211
211
212
- @testitem " Tolerance Tests Interval Methods" setup= [RootfindingTesting] begin
212
+ @testitem " Tolerance Tests Interval Methods" setup= [RootfindingTesting] tags = [ :core ] begin
213
213
@testset " $(nameof (typeof (alg))) " for alg in (Bisection (), Falsi (), ITP ())
214
214
tspan = (1.0 , 20.0 )
215
215
probB = IntervalNonlinearProblem (quadratic_f, tspan, 2.0 )
224
224
end
225
225
end
226
226
227
- @testitem " Tolerance Tests Interval Methods 2" setup= [RootfindingTesting] begin
227
+ @testitem " Tolerance Tests Interval Methods 2" setup= [RootfindingTesting] tags = [ :core ] begin
228
228
@testset " $(nameof (typeof (alg))) " for alg in (Ridder (), Brent ())
229
229
tspan = (1.0 , 20.0 )
230
230
probB = IntervalNonlinearProblem (quadratic_f, tspan, 2.0 )
239
239
end
240
240
end
241
241
242
- @testitem " Flipped Signs and Reversed Tspan" setup= [RootfindingTesting] begin
242
+ @testitem " Flipped Signs and Reversed Tspan" setup= [RootfindingTesting] tags = [ :core ] begin
243
243
@testset " $(nameof (typeof (alg))) " for alg in (Alefeld (), Bisection (), Falsi (), Brent (),
244
244
ITP (), Ridder ())
245
245
f1 (u, p) = u * u - p
257
257
end
258
258
end
259
259
end
260
-
261
- # The following tests were included in the previos versions but these kwargs never did
262
- # anything!
263
- # # Garuntee Tests for Bisection
264
- # f = function (u, p)
265
- # if u < 2.0
266
- # return u - 2.0
267
- # elseif u > 3.0
268
- # return u - 3.0
269
- # else
270
- # return 0.0
271
- # end
272
- # end
273
- # probB = IntervalNonlinearProblem(f, (0.0, 4.0))
274
-
275
- # sol = solve(probB, Bisection(; exact_left = true))
276
- # @test f(sol.left, nothing) < 0.0
277
- # @test f(nextfloat(sol.left), nothing) >= 0.0
278
-
279
- # sol = solve(probB, Bisection(; exact_right = true))
280
- # @test f(sol.right, nothing) >= 0.0
281
- # @test f(prevfloat(sol.right), nothing) <= 0.0
282
-
283
- # sol = solve(probB, Bisection(; exact_left = true, exact_right = true); immutable = false)
284
- # @test f(sol.left, nothing) < 0.0
285
- # @test f(nextfloat(sol.left), nothing) >= 0.0
286
- # @test f(sol.right, nothing) >= 0.0
287
- # @test f(prevfloat(sol.right), nothing) <= 0.0
0 commit comments