Skip to content

Commit

Permalink
Merge pull request #77 from frankschae/change_solve
Browse files Browse the repository at this point in the history
change `solve` to lower level interface `__solve`
  • Loading branch information
ChrisRackauckas authored Jul 8, 2022
2 parents dea31f3 + 03257ce commit 6b20b44
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 6b20b44

Please sign in to comment.