Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SimpleNonlinearSolve"
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
authors = ["SciML"]
version = "0.1.1"
version = "0.1.2"

[deps]
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"
Expand Down
4 changes: 2 additions & 2 deletions src/raphson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ function SciMLBase.solve(prob::NonlinearProblem,
fx)
end
iszero(fx) &&
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.Default)
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.Success)
Δx = dfx \ fx
x -= Δx
if isapprox(x, xo, atol = atol, rtol = rtol)
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.Default)
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.Success)
end
xo = x
end
Expand Down
2 changes: 1 addition & 1 deletion test/basictests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end
const csu0 = 1.0

sol = benchmark_scalar(sf, csu0)
@test sol.retcode === ReturnCode.Default
@test sol.retcode === ReturnCode.Success
@test sol.u * sol.u - 2 < 1e-9

@test (@ballocated benchmark_scalar(sf, csu0)) == 0
Expand Down