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

Commit 29ae939

Browse files
committed
Add Halley to 23 test problems
1 parent fb2f20d commit 29ae939

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

test/core/23_test_problems_tests.jl

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ end
4141
export problems, dicts, test_on_library
4242
end
4343

44-
@testitem "SimpleNewtonRaphson" setup=[RobustnessTesting] tags=[:core] begin
44+
@testitem "23 Test Problems: SimpleNewtonRaphson" setup=[RobustnessTesting] tags=[:core] begin
4545
alg_ops = (SimpleNewtonRaphson(),)
4646

4747
broken_tests = Dict(alg => Int[] for alg in alg_ops)
@@ -50,7 +50,20 @@ end
5050
test_on_library(problems, dicts, alg_ops, broken_tests)
5151
end
5252

53-
@testitem "SimpleTrustRegion" setup=[RobustnessTesting] tags=[:core] begin
53+
@testitem "23 Test Problems: SimpleHalley" setup=[RobustnessTesting] tags=[:core] begin
54+
alg_ops = (SimpleHalley(),)
55+
56+
broken_tests = Dict(alg => Int[] for alg in alg_ops)
57+
if Sys.isapple()
58+
broken_tests[alg_ops[1]] = [1, 5, 11, 15, 16, 18]
59+
else
60+
broken_tests[alg_ops[1]] = [1, 5, 15, 16, 18]
61+
end
62+
63+
test_on_library(problems, dicts, alg_ops, broken_tests)
64+
end
65+
66+
@testitem "23 Test Problems: SimpleTrustRegion" setup=[RobustnessTesting] tags=[:core] begin
5467
alg_ops = (SimpleTrustRegion(), SimpleTrustRegion(; nlsolve_update_rule = Val(true)))
5568

5669
broken_tests = Dict(alg => Int[] for alg in alg_ops)
@@ -60,7 +73,7 @@ end
6073
test_on_library(problems, dicts, alg_ops, broken_tests)
6174
end
6275

63-
@testitem "SimpleDFSane" setup=[RobustnessTesting] tags=[:core] begin
76+
@testitem "23 Test Problems: SimpleDFSane" setup=[RobustnessTesting] tags=[:core] begin
6477
alg_ops = (SimpleDFSane(),)
6578

6679
broken_tests = Dict(alg => Int[] for alg in alg_ops)
@@ -73,7 +86,7 @@ end
7386
test_on_library(problems, dicts, alg_ops, broken_tests)
7487
end
7588

76-
@testitem "SimpleBroyden" retries=5 setup=[RobustnessTesting] tags=[:core] begin
89+
@testitem "23 Test Problems: SimpleBroyden" retries=5 setup=[RobustnessTesting] tags=[:core] begin
7790
alg_ops = (SimpleBroyden(),)
7891

7992
broken_tests = Dict(alg => Int[] for alg in alg_ops)
@@ -82,7 +95,7 @@ end
8295
test_on_library(problems, dicts, alg_ops, broken_tests)
8396
end
8497

85-
@testitem "SimpleKlement" setup=[RobustnessTesting] tags=[:core] begin
98+
@testitem "23 Test Problems: SimpleKlement" setup=[RobustnessTesting] tags=[:core] begin
8699
alg_ops = (SimpleKlement(),)
87100

88101
broken_tests = Dict(alg => Int[] for alg in alg_ops)

test/core/rootfind_tests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ end
7676
@test SciMLBase.successful_retcode(sol)
7777
@test all(abs.(sol.u .* sol.u .- 2) .< 1e-9)
7878
end
79+
80+
@testset "[IIP] u0: $(nameof(typeof(u0)))" for u0 in ([1.0, 1.0],)
81+
sol = benchmark_nlsolve_iip(quadratic_f!, u0; solver = SimpleHalley(; autodiff))
82+
@test SciMLBase.successful_retcode(sol)
83+
@test all(abs.(sol.u .* sol.u .- 2) .< 1e-9)
84+
end
7985
end
8086

8187
@testset "Termination condition: $(nameof(typeof(termination_condition))) u0: $(nameof(typeof(u0)))" for termination_condition in TERMINATION_CONDITIONS,

0 commit comments

Comments
 (0)