Skip to content

Commit

Permalink
Incorrect rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 5, 2023
1 parent 731fb28 commit 97017f9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 36 deletions.
3 changes: 1 addition & 2 deletions src/linesearch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ function LineSearchesJLCache(ls::LineSearch, f::F, u, p, fu1, IIP::Val{iip}) whe
end

function g!(u, fu)
# FIXME: Upstream patch to allow non-square Jacobians
op = VecJac((args...) -> f(args..., p), u; autodiff)
op = VecJac(f, u, p; fu = fu1, autodiff)
if iip
mul!(g₀, op, fu)
return g₀
Expand Down
34 changes: 0 additions & 34 deletions test/basictests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ 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])
<<<<<<< HEAD

=======
>>>>>>> 1a0df4e (Improve termination conditions)
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN, NewtonRaphson(); termination_condition).u .≈ sqrt(2.0))
end
Expand Down Expand Up @@ -301,10 +297,6 @@ end

@testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS,
u0 in (1.0, [1.0, 1.0])
<<<<<<< HEAD

=======
>>>>>>> 1a0df4e (Improve termination conditions)
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN, TrustRegion(); termination_condition).u .≈ sqrt(2.0))
end
Expand Down Expand Up @@ -421,10 +413,6 @@ end

@testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS,
u0 in (1.0, [1.0, 1.0])
<<<<<<< HEAD

=======
>>>>>>> 1a0df4e (Improve termination conditions)
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN, LevenbergMarquardt(); termination_condition).u .≈ sqrt(2.0))
end
Expand Down Expand Up @@ -559,10 +547,6 @@ end

@testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS,
u0 in (1.0, [1.0, 1.0])
<<<<<<< HEAD

=======
>>>>>>> 1a0df4e (Improve termination conditions)
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN, DFSane(); termination_condition).u .≈ sqrt(2.0))
end
Expand Down Expand Up @@ -683,10 +667,6 @@ end

@testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS,
u0 in (1.0, [1.0, 1.0])
<<<<<<< HEAD

=======
>>>>>>> 1a0df4e (Improve termination conditions)
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 @@ -784,10 +764,6 @@ end

@testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS,
u0 in (1.0, [1.0, 1.0])
<<<<<<< HEAD

=======
>>>>>>> 1a0df4e (Improve termination conditions)
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN, GeneralBroyden(); termination_condition).u .≈ sqrt(2.0))
end
Expand Down Expand Up @@ -884,14 +860,9 @@ end

@testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS,
u0 in (1.0, [1.0, 1.0])
<<<<<<< HEAD

probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN, GeneralKlement(); termination_condition).u .≈ sqrt(2.0))
=======
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN,GeneralKlement(); termination_condition).u .≈ sqrt(2.0))
>>>>>>> 1a0df4e (Improve termination conditions)
end
end

Expand Down Expand Up @@ -990,14 +961,9 @@ end

@testset "Termination condition: $(termination_condition) u0: $(_nameof(u0))" for termination_condition in TERMINATION_CONDITIONS,
u0 in (1.0, [1.0, 1.0])
<<<<<<< HEAD

probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN, LimitedMemoryBroyden();
=======
probN = NonlinearProblem(quadratic_f, u0, 2.0)
@test all(solve(probN, LimitedMemoryBroyden();
>>>>>>> 1a0df4e (Improve termination conditions)
termination_condition).u .≈ sqrt(2.0))
end
end

0 comments on commit 97017f9

Please sign in to comment.