|
1 | | -using NonlinearSolve, LinearAlgebra, LinearSolve, NonlinearProblemLibrary, Test |
| 1 | +using NonlinearSolve, LinearAlgebra, LinearSolve, NonlinearProblemLibrary, XUnit |
2 | 2 |
|
3 | 3 | problems = NonlinearProblemLibrary.problems |
4 | 4 | dicts = NonlinearProblemLibrary.dicts |
@@ -36,7 +36,7 @@ function test_on_library(problems, dicts, alg_ops, broken_tests, ϵ = 1e-4; |
36 | 36 | end |
37 | 37 | end |
38 | 38 |
|
39 | | -@testset "NewtonRaphson 23 Test Problems" begin |
| 39 | +@testcase "NewtonRaphson 23 Test Problems" begin |
40 | 40 | alg_ops = (NewtonRaphson(),) |
41 | 41 |
|
42 | 42 | broken_tests = Dict(alg => Int[] for alg in alg_ops) |
|
45 | 45 | test_on_library(problems, dicts, alg_ops, broken_tests) |
46 | 46 | end |
47 | 47 |
|
48 | | -# @testset "TrustRegion 23 Test Problems" begin |
49 | | -# alg_ops = (TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Simple), |
50 | | -# TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Fan), |
51 | | -# TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Hei), |
52 | | -# TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Yuan), |
53 | | -# TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Bastin), |
54 | | -# TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.NLsolve)) |
55 | | - |
56 | | -# broken_tests = Dict(alg => Int[] for alg in alg_ops) |
57 | | -# broken_tests[alg_ops[1]] = [11, 21] |
58 | | -# broken_tests[alg_ops[2]] = [11, 21] |
59 | | -# broken_tests[alg_ops[3]] = [11, 21] |
60 | | -# broken_tests[alg_ops[4]] = [11, 21] |
61 | | -# broken_tests[alg_ops[5]] = [21] |
62 | | -# broken_tests[alg_ops[6]] = [21] |
63 | | - |
64 | | -# test_on_library(problems, dicts, alg_ops, broken_tests) |
65 | | -# end |
66 | | - |
67 | | -@testset "LevenbergMarquardt 23 Test Problems" begin |
| 48 | +@testcase "TrustRegion 23 Test Problems" begin |
| 49 | + alg_ops = (TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Simple), |
| 50 | + TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Fan), |
| 51 | + TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Hei), |
| 52 | + TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Yuan), |
| 53 | + TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.Bastin), |
| 54 | + TrustRegion(; radius_update_scheme = RadiusUpdateSchemes.NLsolve)) |
| 55 | + |
| 56 | + broken_tests = Dict(alg => Int[] for alg in alg_ops) |
| 57 | + broken_tests[alg_ops[1]] = [11, 21] |
| 58 | + broken_tests[alg_ops[2]] = [11, 21] |
| 59 | + broken_tests[alg_ops[3]] = [11, 21] |
| 60 | + broken_tests[alg_ops[4]] = [8, 11, 21] |
| 61 | + broken_tests[alg_ops[5]] = [21] |
| 62 | + broken_tests[alg_ops[6]] = [11, 21] |
| 63 | + |
| 64 | + test_on_library(problems, dicts, alg_ops, broken_tests) |
| 65 | +end |
| 66 | + |
| 67 | +@testcase "LevenbergMarquardt 23 Test Problems" begin |
68 | 68 | alg_ops = (LevenbergMarquardt(), |
69 | 69 | LevenbergMarquardt(; α_geodesic = 0.1), |
70 | 70 | LevenbergMarquardt(; linsolve = CholeskyFactorization())) |
|
77 | 77 | test_on_library(problems, dicts, alg_ops, broken_tests) |
78 | 78 | end |
79 | 79 |
|
80 | | -@testset "DFSane 23 Test Problems" begin |
| 80 | +@testcase "DFSane 23 Test Problems" begin |
81 | 81 | alg_ops = (DFSane(),) |
82 | 82 |
|
83 | 83 | broken_tests = Dict(alg => Int[] for alg in alg_ops) |
|
86 | 86 | test_on_library(problems, dicts, alg_ops, broken_tests) |
87 | 87 | end |
88 | 88 |
|
89 | | -@testset "Broyden 23 Test Problems" begin |
| 89 | +@testcase "Broyden 23 Test Problems" begin |
90 | 90 | alg_ops = (Broyden(), |
91 | 91 | Broyden(; init_jacobian = Val(:true_jacobian)), |
92 | 92 | Broyden(; update_rule = Val(:bad_broyden)), |
|
101 | 101 | test_on_library(problems, dicts, alg_ops, broken_tests) |
102 | 102 | end |
103 | 103 |
|
104 | | -@testset "Klement 23 Test Problems" begin |
| 104 | +@testcase "Klement 23 Test Problems" begin |
105 | 105 | alg_ops = (Klement(), Klement(; init_jacobian = Val(:true_jacobian_diagonal))) |
106 | 106 |
|
107 | 107 | broken_tests = Dict(alg => Int[] for alg in alg_ops) |
|
111 | 111 | test_on_library(problems, dicts, alg_ops, broken_tests) |
112 | 112 | end |
113 | 113 |
|
114 | | -@testset "PseudoTransient 23 Test Problems" begin |
| 114 | +@testcase "PseudoTransient 23 Test Problems" begin |
115 | 115 | # PT relies on the root being a stable equilibrium for convergence, so it won't work on |
116 | 116 | # most problems |
117 | 117 | alg_ops = (PseudoTransient(),) |
|
0 commit comments