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

Commit 9a5b4c7

Browse files
fix naming
1 parent cf21fcf commit 9a5b4c7

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/SimpleNonlinearSolve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ include("ridder.jl")
3636
include("brent.jl")
3737
include("dfsane.jl")
3838
include("ad.jl")
39-
include("halley.jl")
39+
include("SimpleHalley.jl")
4040
include("alefeld.jl")
4141
include("itp.jl")
4242

@@ -64,7 +64,7 @@ import PrecompileTools
6464
PrecompileTools.@compile_workload begin
6565
for T in (Float32, Float64)
6666
prob_no_brack = NonlinearProblem{false}((u, p) -> u .* u .- p, T(0.1), T(2))
67-
for alg in (SimpleNewtonRaphson, Halley, Broyden, Klement, SimpleTrustRegion,
67+
for alg in (SimpleNewtonRaphson, SimpleHalley, Broyden, Klement, SimpleTrustRegion,
6868
SimpleDFSane)
6969
solve(prob_no_brack, alg(), abstol = T(1e-2))
7070
end

src/halley.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SimpleHalley(; chunk_size = Val{0}(), autodiff = Val{true}(),
44
diff_type = Val{:forward})
55
```
66
7-
A low-overhead implementation of Halley's Method. This method is non-allocating on scalar
7+
A low-overhead implementation of SimpleHalley's Method. This method is non-allocating on scalar
88
and static array problems.
99
1010
!!! note
@@ -49,7 +49,7 @@ function SciMLBase.__solve(prob::NonlinearProblem,
4949
T = typeof(x)
5050

5151
if SciMLBase.isinplace(prob)
52-
error("Halley currently only supports out-of-place nonlinear problems")
52+
error("SimpleHalley currently only supports out-of-place nonlinear problems")
5353
end
5454

5555
atol = abstol !== nothing ? abstol :

test/basictests.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ if VERSION >= v"1.7"
5656
@test (@ballocated benchmark_scalar(sf, csu0)) == 0
5757
end
5858

59-
# Halley
59+
# SimpleHalley
6060
function benchmark_scalar(f, u0)
6161
probN = NonlinearProblem{false}(f, u0)
62-
sol = (solve(probN, Halley()))
62+
sol = (solve(probN, SimpleHalley()))
6363
end
6464

6565
function ff(u, p)
@@ -139,7 +139,7 @@ using ForwardDiff
139139
f, u0 = (u, p) -> u .* u .- p, @SVector[1.0, 1.0]
140140

141141
for alg in (SimpleNewtonRaphson(), LBroyden(), Klement(), SimpleTrustRegion(),
142-
SimpleDFSane(), Halley(), BROYDEN_SOLVERS...)
142+
SimpleDFSane(), SimpleHalley(), BROYDEN_SOLVERS...)
143143
g = function (p)
144144
probN = NonlinearProblem{false}(f, csu0, p)
145145
sol = solve(probN, alg, abstol = 1e-9)
@@ -162,7 +162,7 @@ end
162162
# Scalar
163163
f, u0 = (u, p) -> u * u - p, 1.0
164164
for alg in (SimpleNewtonRaphson(), Klement(), SimpleTrustRegion(),
165-
SimpleDFSane(), Halley(), BROYDEN_SOLVERS..., LBROYDEN_SOLVERS...)
165+
SimpleDFSane(), SimpleHalley(), BROYDEN_SOLVERS..., LBROYDEN_SOLVERS...)
166166
g = function (p)
167167
probN = NonlinearProblem{false}(f, oftype(p, u0), p)
168168
sol = solve(probN, alg)
@@ -271,7 +271,7 @@ for alg in [Bisection(), Falsi(), Ridder(), Brent(), ITP()]
271271
end
272272

273273
for alg in (SimpleNewtonRaphson(), Klement(), SimpleTrustRegion(),
274-
SimpleDFSane(), Halley(), BROYDEN_SOLVERS..., LBROYDEN_SOLVERS...)
274+
SimpleDFSane(), SimpleHalley(), BROYDEN_SOLVERS..., LBROYDEN_SOLVERS...)
275275
global g, p
276276
g = function (p)
277277
probN = NonlinearProblem{false}(f, 0.5, p)
@@ -288,7 +288,7 @@ probN = NonlinearProblem(f, u0)
288288

289289
for alg in (SimpleNewtonRaphson(), SimpleNewtonRaphson(; autodiff = false),
290290
SimpleTrustRegion(),
291-
SimpleTrustRegion(; autodiff = false), Halley(), Halley(; autodiff = false),
291+
SimpleTrustRegion(; autodiff = false), SimpleHalley(), SimpleHalley(; autodiff = false),
292292
Klement(), SimpleDFSane(),
293293
BROYDEN_SOLVERS..., LBROYDEN_SOLVERS...)
294294
sol = solve(probN, alg)

0 commit comments

Comments
 (0)