Skip to content

Commit

Permalink
All polyalg in 23 test problems
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Mar 5, 2024
1 parent 75c0fb6 commit 5911835
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/algorithms/lbroyden.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ function LinearAlgebra.mul!(y::AbstractVector, x::AbstractVector, J::BroydenLowR
return y
end

function LinearAlgebra.mul!(
J::BroydenLowRankJacobian, u, vᵀ::LinearAlgebra.AdjOrTransAbsVec, α::Bool, β::Bool)
function LinearAlgebra.mul!(J::BroydenLowRankJacobian, u::AbstractArray,
vᵀ::LinearAlgebra.AdjOrTransAbsVec, α::Bool, β::Bool)
@assert α & β
idx_update = mod1(J.idx + 1, size(J.U, 2))
copyto!(@view(J.U[:, idx_update]), _vec(u))
Expand Down
12 changes: 11 additions & 1 deletion test/core/23_test_problems_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ end
export test_on_library, problems, dicts
end

@testitem "PolyAlgorithms" setup=[RobustnessTesting] begin
alg_ops = (RobustMultiNewton(), FastShortcutNonlinearPolyalg())

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

test_on_library(problems, dicts, alg_ops, broken_tests)
end

@testitem "NewtonRaphson" setup=[RobustnessTesting] begin
alg_ops = (NewtonRaphson(),)

Expand Down Expand Up @@ -91,7 +101,7 @@ end
test_on_library(problems, dicts, alg_ops, broken_tests)
end

@testitem "Broyden" retries=5 setup=[RobustnessTesting] begin
@testitem "Broyden" setup=[RobustnessTesting] begin
alg_ops = (Broyden(), Broyden(; init_jacobian = Val(:true_jacobian)),
Broyden(; update_rule = Val(:bad_broyden)),
Broyden(; init_jacobian = Val(:true_jacobian), update_rule = Val(:bad_broyden)))
Expand Down

0 comments on commit 5911835

Please sign in to comment.