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

Commit 142542f

Browse files
fix tolerances
1 parent 2bdfe64 commit 142542f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/raphson.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ struct SimpleNewtonRaphson{CS, AD, FDT} <: AbstractNewtonAlgorithm{CS, AD, FDT}
77
end
88

99
function SciMLBase.solve(prob::NonlinearProblem,
10-
alg::SimpleNewtonRaphson, args...; xatol = nothing,
11-
xrtol = nothing,
10+
alg::SimpleNewtonRaphson, args...; abstol = nothing,
11+
reltol = nothing,
1212
maxiters = 1000, kwargs...)
1313
f = Base.Fix2(prob.f, prob.p)
1414
x = float(prob.u0)
@@ -19,8 +19,8 @@ function SciMLBase.solve(prob::NonlinearProblem,
1919
error("SimpleNewtonRaphson currently only supports out-of-place nonlinear problems")
2020
end
2121

22-
atol = xatol !== nothing ? xatol : oneunit(eltype(T)) * (eps(one(eltype(T))))^(4 // 5)
23-
rtol = xrtol !== nothing ? xrtol : eps(one(eltype(T)))^(4 // 5)
22+
atol = abstol !== nothing ? abstol : oneunit(eltype(T)) * (eps(one(eltype(T))))^(4 // 5)
23+
rtol = reltol !== nothing ? reltol : eps(one(eltype(T)))^(4 // 5)
2424

2525
if typeof(x) <: Number
2626
xo = oftype(one(eltype(x)), Inf)

0 commit comments

Comments
 (0)