diff --git a/test/basictests.jl b/test/basictests.jl index e5d7aad88..b1f9d3cb7 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -133,6 +133,7 @@ const TERMINATION_CONDITIONS = [ @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, NewtonRaphson(); termination_condition).u .≈ sqrt(2.0)) end @@ -297,6 +298,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, TrustRegion(); termination_condition).u .≈ sqrt(2.0)) end @@ -413,6 +415,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, LevenbergMarquardt(); termination_condition).u .≈ sqrt(2.0)) end @@ -547,6 +550,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, DFSane(); termination_condition).u .≈ sqrt(2.0)) end @@ -667,6 +671,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, PseudoTransient(; alpha_initial = 10.0); termination_condition).u .≈ sqrt(2.0)) @@ -764,6 +769,7 @@ end @testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS, u0 in (1.0, [1.0, 1.0]) + probN = NonlinearProblem(quadratic_f, u0, 2.0) @test all(solve(probN, GeneralBroyden(); termination_condition).u .≈ sqrt(2.0)) end diff --git a/test/nonlinear_least_squares.jl b/test/nonlinear_least_squares.jl index f4c9f9f7d..07a310196 100644 --- a/test/nonlinear_least_squares.jl +++ b/test/nonlinear_least_squares.jl @@ -28,7 +28,7 @@ prob_iip = NonlinearLeastSquaresProblem(NonlinearFunction(loss_function; nlls_problems = [prob_oop, prob_iip] solvers = vec(Any[GaussNewton(; linsolve, linesearch) - for linsolve in [nothing, LUFactorization()], + for linsolve in [nothing, LUFactorization()], linesearch in [Static(), BackTracking(), HagerZhang(), StrongWolfe(), MoreThuente()]]) append!(solvers, [