Skip to content

Commit 0149f39

Browse files
Merge pull request #6 from JuliaComputing/ChrisRackauckas-patch-1
Add some documentation
2 parents 15a612a + cd8b719 commit 0149f39

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

README.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
11
# NonlinearSolve.jl
22

3-
Root finding algorithms in Julia
3+
Fast implementations of root finding algorithms in Julia that satisfy the SciML common interface.
4+
5+
```julia
6+
using NonlinearSolve
7+
8+
f(u,p) = u .* u .- 2
9+
u0 = @SVector[1.0, 1.0]
10+
probN = NonlinearProblem{false}(f, u0)
11+
solver = solve(probN, NewtonRaphson(), tol = 1e-9)
12+
13+
## Bracketing Methods
14+
15+
f(u, p) = u .* u .- 2.0
16+
u0 = (1.0, 2.0) # brackets
17+
probB = NonlinearProblem(f, u0)
18+
sol = solve(probB, Falsi())
19+
```
20+
21+
## Current Algorithms
22+
23+
### Non-Bracketing
24+
25+
- `NewtonRaphson()`
26+
27+
### Bracketing
28+
29+
- `Falsi()`
30+
- `Bisection()`
31+
32+
## Features
33+
34+
Performance is key: the current methods are made to be highly performant on scalar and statically sized small
35+
problems. If you run into any performance issues, please file an issue.
36+
37+
There is an iterator form of the nonlinear solver which mirrors the DiffEq integrator interface:
38+
39+
```julia
40+
f(u, p) = u .* u .- 2.0
41+
u0 = (1.0, 2.0) # brackets
42+
probB = NonlinearProblem(f, u0)
43+
solver = init(probB, Falsi()) # Can iterate the solver object
44+
solve!(solver)
45+
```
46+
47+
## Roadmap
48+
49+
The current algorithms should support automatic differentiation, though improved adjoint overloads are planned
50+
to be added in the current update (which will make use of the `f(u,p)` form). Future updates will include
51+
standard methods for larger scale nonlinear solving like Newton-Krylov methods.

0 commit comments

Comments
 (0)