Skip to content

Commit 72a5232

Browse files
add backwards compat
1 parent 46fc62e commit 72a5232

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/SCCNonlinearSolve/src/SCCNonlinearSolve.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ function CommonSolve.solve(prob::SciMLBase.SCCNonlinearProblem; kwargs...)
2727
CommonSolve.solve(prob, SCCAlg(nothing, nothing); kwargs...)
2828
end
2929

30+
function CommonSolve.solve(prob::SciMLBase.SCCNonlinearProblem, alg::AbstractNonlinearAlgorithm; kwargs...)
31+
CommonSolve.solve(prob, SCCAlg(alg, nothing); kwargs...)
32+
end
33+
3034
probvec(prob::Union{NonlinearProblem, NonlinearLeastSquaresProblem}) = prob.u0
3135
probvec(prob::LinearProblem) = prob.b
3236

lib/SCCNonlinearSolve/test/core_tests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ end
6565
scc_sol=solve(sccprob, scc_alg)
6666
@test sol manualscc scc_sol
6767

68+
# Backwards compat of alg choice
69+
scc_sol=solve(sccprob, NewtonRaphson())
70+
@test sol manualscc scc_sol
71+
6872
import NonlinearSolve # Required for Default
6973

7074
# Test default interface

0 commit comments

Comments
 (0)