Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 5, 2023
1 parent 97017f9 commit 77be3a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions test/basictests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/nonlinear_least_squares.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
[
Expand Down

0 comments on commit 77be3a2

Please sign in to comment.