Skip to content

Commit 2e63a13

Browse files
committed
Docs, scaling factor
1 parent 76556a1 commit 2e63a13

File tree

1 file changed

+10
-4
lines changed
  • lib/SimpleNonlinearSolve/src/bracketing

1 file changed

+10
-4
lines changed

lib/SimpleNonlinearSolve/src/bracketing/itp.jl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,22 @@ I. F. D. Oliveira and R. H. C. Takahashi.
1515
The following keyword parameters are accepted.
1616
1717
- `n₀::Int = 10`, the 'slack'. Must not be negative. When n₀ = 0 the worst-case is
18-
identical to that of bisection, but increacing n₀ provides greater oppotunity for
18+
identical to that of bisection, but increasing n₀ provides greater opportunity for
1919
superlinearity.
20-
- `scaled_κ₁::Float64 = 0.2`. Must not be negative. The recomended value is `0.2`.
20+
- `scaled_κ₁::Float64 = 0.2`. Must not be negative. The recommended value is `0.2`.
2121
Lower values produce tighter asymptotic behaviour, while higher values improve the
2222
steady-state behaviour when truncation is not helpful.
2323
- `κ₂::Real = 2`. Must lie in [1, 1+ϕ ≈ 2.62). Higher values allow for a greater
2424
convergence rate, but also make the method more succeptable to worst-case performance.
25-
In practice, κ=1, 2 seems to work well due to the computational simplicity, as κ₂ is
25+
In practice, κ=1, 2 seems to work well due to the computational simplicity, as κ₂ is
2626
used as an exponent in the method.
2727
28+
### Computation of κ₁
29+
30+
In the current implementation, we compute κ₁ = scaled_κ₁·|Δx₀|^(1 - κ₂); this allows κ₁ to
31+
adapt to the dimension of the problem in order to keep the proposed initial step
32+
proportional to Δx₀.
33+
2834
### Worst Case Performance
2935
3036
n½ + `n₀` iterations, where n½ is the number of iterations using bisection
@@ -72,8 +78,8 @@ function SciMLBase.solve(prob::IntervalNonlinearProblem, alg::ITP, args...;
7278
end
7379
ϵ = abstol
7480
#defining variables/cache
75-
k1 = alg.scaled_k1 / abs(right - left)
7681
k2 = alg.k2
82+
k1 = alg.scaled_k1 * abs(right - left)^(1 - k2)
7783
n0 = alg.n0
7884
n_h = ceil(log2(abs(right - left) / (2 * ϵ)))
7985
mid = (left + right) / 2

0 commit comments

Comments
 (0)