Skip to content

Commit

Permalink
move to lower level interface
Browse files Browse the repository at this point in the history
  • Loading branch information
frankschae committed Jul 8, 2022
1 parent dea31f3 commit 03257ce
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/solve.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
function SciMLBase.solve(prob::NonlinearProblem,
alg::AbstractNonlinearSolveAlgorithm, args...;
kwargs...)
function SciMLBase.__solve(prob::NonlinearProblem,
alg::AbstractNonlinearSolveAlgorithm, args...;
kwargs...)
solver = init(prob, alg, args...; kwargs...)
sol = solve!(solver)
end

function SciMLBase.init(prob::NonlinearProblem{uType, iip},
alg::AbstractBracketingAlgorithm, args...;
alias_u0 = false,
maxiters = 1000,
kwargs...) where {uType, iip}
function SciMLBase.__init(prob::NonlinearProblem{uType, iip},
alg::AbstractBracketingAlgorithm, args...;
alias_u0 = false,
maxiters = 1000,
kwargs...) where {uType, iip}
if !(prob.u0 isa Tuple)
error("You need to pass a tuple of u0 in bracketing algorithms.")
end
Expand All @@ -32,13 +32,13 @@ function SciMLBase.init(prob::NonlinearProblem{uType, iip},
DEFAULT, cache, iip, prob)
end

function SciMLBase.init(prob::NonlinearProblem{uType, iip}, alg::AbstractNewtonAlgorithm,
args...;
alias_u0 = false,
maxiters = 1000,
tol = 1e-6,
internalnorm = DEFAULT_NORM,
kwargs...) where {uType, iip}
function SciMLBase.__init(prob::NonlinearProblem{uType, iip}, alg::AbstractNewtonAlgorithm,
args...;
alias_u0 = false,
maxiters = 1000,
tol = 1e-6,
internalnorm = DEFAULT_NORM,
kwargs...) where {uType, iip}
if alias_u0
u = prob.u0
else
Expand Down

0 comments on commit 03257ce

Please sign in to comment.