Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 2c81605

Browse files
Fix return codes
1 parent e4193de commit 2c81605

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SimpleNonlinearSolve"
22
uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7"
33
authors = ["SciML"]
4-
version = "0.1.1"
4+
version = "0.1.2"
55

66
[deps]
77
ArrayInterfaceCore = "30b0a656-2188-435a-8636-2ec0e6a096e2"

src/raphson.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ function SciMLBase.solve(prob::NonlinearProblem,
4040
fx)
4141
end
4242
iszero(fx) &&
43-
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.Default)
43+
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.Success)
4444
Δx = dfx \ fx
4545
x -= Δx
4646
if isapprox(x, xo, atol = atol, rtol = rtol)
47-
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.Default)
47+
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.Success)
4848
end
4949
xo = x
5050
end

test/basictests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ end
1818
const csu0 = 1.0
1919

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

2424
@test (@ballocated benchmark_scalar(sf, csu0)) == 0

0 commit comments

Comments
 (0)