Skip to content

Commit 5ddd166

Browse files
committed
Changed name of algorithm to SimpleMuller
1 parent 29d63c5 commit 5ddd166

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

Diff for: src/SimpleNonlinearSolve.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ end
116116
end
117117

118118
export SimpleBroyden, SimpleDFSane, SimpleGaussNewton, SimpleHalley, SimpleKlement,
119-
SimpleLimitedMemoryBroyden, SimpleNewtonRaphson, SimpleTrustRegion, Muller
119+
SimpleLimitedMemoryBroyden, SimpleNewtonRaphson, SimpleTrustRegion, SimpleMuller
120120
export Alefeld, Bisection, Brent, Falsi, ITP, Ridder
121121

122122
end # module

Diff for: src/nlsolve/muller.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
2-
Muller()
2+
SimpleMuller()
33
44
Muller's method.
55
"""
6-
struct Muller <: AbstractSimpleNonlinearSolveAlgorithm end
6+
struct SimpleMuller <: AbstractSimpleNonlinearSolveAlgorithm end
77

8-
function SciMLBase.solve(prob::NonlinearProblem, alg::Muller, args...;
8+
function SciMLBase.solve(prob::NonlinearProblem, alg::SimpleMuller, args...;
99
abstol = nothing, maxiters = 1000, kwargs...)
10-
@assert !isinplace(prob) "`Muller` only supports OOP problems."
10+
@assert !isinplace(prob) "`SimpleMuller` only supports OOP problems."
1111
xᵢ₋₂, xᵢ₋₁, xᵢ = prob.u0
1212
@assert xᵢ₋₂ xᵢ₋₁ xᵢ xᵢ₋₂
1313
f = Base.Fix2(prob.f, prob.p)

Diff for: test/core/muller_tests.jl

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
@testitem "Muller" begin
1+
@testitem "SimpleMuller" begin
22
@testset "Quadratic function" begin
33
f(u, p) = u^2 - p
44

55
u0 = (10, 20, 30)
66
p = 612
77
prob = NonlinearProblem{false}(f, u0, p)
8-
sol = solve(prob, Muller())
8+
sol = solve(prob, SimpleMuller())
99

1010
@test sol.u 612
1111

1212
u0 = (-10, -20, -30)
1313
prob = NonlinearProblem{false}(f, u0, p)
14-
sol = solve(prob, Muller())
14+
sol = solve(prob, SimpleMuller())
1515

1616
@test sol.u -√612
1717
end
@@ -21,13 +21,13 @@
2121

2222
u0 = (1, 2, 3)
2323
prob = NonlinearProblem{false}(f, u0)
24-
sol = solve(prob, Muller())
24+
sol = solve(prob, SimpleMuller())
2525

2626
@test sol.u π
2727

2828
u0 = (2, 4, 6)
2929
prob = NonlinearProblem{false}(f, u0)
30-
sol = solve(prob, Muller())
30+
sol = solve(prob, SimpleMuller())
3131

3232
@test sol.u 2*π
3333
end
@@ -37,19 +37,19 @@
3737

3838
u0 = (-2, -3, -4)
3939
prob = NonlinearProblem{false}(f, u0)
40-
sol = solve(prob, Muller())
40+
sol = solve(prob, SimpleMuller())
4141

4242
@test sol.u -π
4343

4444
u0 = (-1, 0, 1/2)
4545
prob = NonlinearProblem{false}(f, u0)
46-
sol = solve(prob, Muller())
46+
sol = solve(prob, SimpleMuller())
4747

4848
@test sol.u 0
4949

5050
u0 = (-1, 0, 1)
5151
prob = NonlinearProblem{false}(f, u0)
52-
sol = solve(prob, Muller())
52+
sol = solve(prob, SimpleMuller())
5353

5454
@test sol.u π
5555
end

0 commit comments

Comments
 (0)