Skip to content

Commit 8fa5975

Browse files
Merge pull request #110 from SciML/docs
Add steady state docs and MINPACK
2 parents 87d4ae9 + 0000f7d commit 8fa5975

17 files changed

+303
-112
lines changed

docs/Project.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
33
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
44
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
5+
NonlinearSolveMINPACK = "c100e077-885d-495a-a2ea-599e143bf69d"
6+
SciMLNLSolve = "e9a6253c-8580-4d32-9898-8661bb511710"
7+
SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
58
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
9+
SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f"
10+
Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4"
611

712
[compat]
813
BenchmarkTools = "1"
914
Documenter = "0.27"
1015
NonlinearSolve = "1"
16+
NonlinearSolveMINPACK = "0.1"
17+
SciMLNLSolve = "0.1"
18+
SimpleNonlinearSolve = "0.1"
1119
StaticArrays = "1"
20+
SteadyStateDiffEq = "1.10"
21+
Sundials = "4.11"

docs/make.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Documenter, NonlinearSolve
1+
using Documenter, NonlinearSolve, SimpleNonlinearSolve, Sundials, SciMLNLSolve,
2+
NonlinearSolveMINPACK, SteadyStateDiffEq
23

34
cp("./docs/Manifest.toml", "./docs/src/assets/Manifest.toml", force = true)
45
cp("./docs/Project.toml", "./docs/src/assets/Project.toml", force = true)
@@ -7,7 +8,8 @@ include("pages.jl")
78

89
makedocs(sitename = "NonlinearSolve.jl",
910
authors = "Chris Rackauckas",
10-
modules = [NonlinearSolve, NonlinearSolve.SciMLBase],
11+
modules = [NonlinearSolve, NonlinearSolve.SciMLBase, SimpleNonlinearSolve,
12+
Sundials, SciMLNLSolve, NonlinearSolveMINPACK, SteadyStateDiffEq],
1113
clean = true, doctest = false,
1214
strict = [
1315
:doctest,

docs/pages.jl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ pages = ["index.md",
55
"tutorials/iterator_interface.md"],
66
"Basics" => Any["basics/NonlinearProblem.md",
77
"basics/NonlinearFunctions.md",
8+
"basics/NonlinearSolution.md",
89
"basics/FAQ.md"],
9-
"Solvers" => Any["solvers/NonlinearSystemSolvers.md",
10-
"solvers/BracketingSolvers.md"],
10+
"Solver Summaries and Recommendations" => Any["solvers/NonlinearSystemSolvers.md",
11+
"solvers/BracketingSolvers.md",
12+
"solvers/SteadyStateSolvers.md"],
13+
"Detailed Solver APIs" => Any["api/nonlinearsolve.md",
14+
"api/simplenonlinearsolve.md",
15+
"api/minpack.md",
16+
"api/nlsolve.md",
17+
"api/sundials.md",
18+
"api/steadystatediffeq.md"],
1119
]

docs/src/api/minpack.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# MINPACK.jl
2+
3+
This is a wrapper package for importing solvers from Sundials into the SciML interface.
4+
Note that these solvers do not come by default, and thus one needs to install
5+
the package before using these solvers:
6+
7+
```julia
8+
]add NonlinearSolveMINPACK
9+
using NonlinearSolveMINPACK
10+
```
11+
12+
These methods can be used independently of the rest of NonlinearSolve.jl
13+
14+
## Solver API
15+
16+
```@docs
17+
CMINPACK
18+
```

docs/src/api/nlsolve.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# NLsolve.jl
2+
3+
This is a wrapper package for importing solvers from NLsolve.jl into the SciML interface.
4+
Note that these solvers do not come by default, and thus one needs to install
5+
the package before using these solvers:
6+
7+
```julia
8+
]add SciMLNLSolve
9+
using SciMLNLSolve
10+
```
11+
12+
## Solver API
13+
14+
```@docs
15+
NLsolveJL
16+
```

docs/src/api/nonlinearsolve.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# NonlinearSolve.jl Native Solvers
2+
3+
These are the native solvers of NonlinearSolve.jl.
4+
5+
## Solver API
6+
7+
```@docs
8+
NewtonRaphson
9+
```

docs/src/api/simplenonlinearsolve.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SimpleNonlinearSolve.jl
2+
3+
These methods can be used independently of the rest of NonlinearSolve.jl
4+
5+
## Solver API
6+
7+
```@docs
8+
Bisection
9+
Falsi
10+
SimpleNewtonRaphson
11+
```

docs/src/api/steadystatediffeq.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SteadyStateDiffEq.jl
2+
3+
This is a wrapper package for using ODE solvers from
4+
[DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/) into the SciML interface.
5+
Note that these solvers do not come by default, and thus one needs to install
6+
the package before using these solvers:
7+
8+
```julia
9+
]add SteadyStateDiffEq
10+
using SteadyStateDiffEq
11+
```
12+
13+
These methods can be used independently of the rest of NonlinearSolve.jl
14+
15+
## Solver API
16+
17+
```@docs
18+
DynamicSS
19+
```

docs/src/api/sundials.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Sundials.jl
2+
3+
This is a wrapper package for importing solvers from Sundials into the SciML interface.
4+
Note that these solvers do not come by default, and thus one needs to install
5+
the package before using these solvers:
6+
7+
```julia
8+
]add Sundials
9+
using Sundials
10+
```
11+
12+
These methods can be used independently of the rest of NonlinearSolve.jl
13+
14+
## Solver API
15+
16+
```@docs
17+
KINSOL
18+
```

docs/src/basics/FAQ.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ MATLAB 2022a achieves 1.66s. Try this code yourself: we receive 0.06 seconds, or
3535
This example is still not optimized in the Julia code and we expect an improvement in a near
3636
future version.
3737

38-
For more information on performance of SciML, see the [SciMLBenchmarks](https://docs.sciml.ai/SciMLBenchmarksOutput/stable/)
38+
For more information on performance of SciML, see the [SciMLBenchmarks](https://docs.sciml.ai/SciMLBenchmarksOutput/stable/).

docs/src/basics/NonlinearProblem.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,46 @@
11
# Nonlinear Problems
22

3-
## The Two Types of Nonlinear Problems
3+
## The Three Types of Nonlinear Problems
44

55
NonlinearSolve.jl tackles two related types of nonlinear systems:
66

77
1. Interval rootfinding problems. I.e., find the ``t in [t_0, t_f]`` such that `f(t) = 0`.
88
2. Systems of nonlinear equations, i.e. find the `u` such that `f(u) = 0`.
9+
3. Steady state problems, i.e. find the `u` such that `u' = f(u,t)` has reached steady state,
10+
i.e. `0 = f(u, ∞)`.
911

10-
The former is for solving scalar rootfinding problems, i.e. finding a single number, and
12+
The first is for solving scalar rootfinding problems, i.e. finding a single number, and
1113
requires that a bracketing interval is known. For a bracketing interval, one must have that
1214
the sign of `f(t_0)` is opposite the sign of `f(t_f)`, thus guaranteeing a root in the
1315
interval.
1416

15-
The latter type of nonlinear system can be multidimensional and thus no ordering nor
16-
boundaries are assumed to be known. For a system of nonlinear equations, `f` can return
17-
an array and the solver seeks to find the value of `u` for which all outputs of `f` are
18-
simultaniously zero.
19-
2017
!!! note
2118

2219
Interval rootfinding problems allow for `f` to return an array, in which case the interval
2320
rootfinding problem is interpreted as finding the first `t` such that any of the components
2421
of the array hit zero.
2522

23+
The second type of nonlinear system can be multidimensional and thus no ordering nor
24+
boundaries are assumed to be known. For a system of nonlinear equations, `f` can return
25+
an array and the solver seeks to find the value of `u` for which all outputs of `f` are
26+
simultaniously zero.
27+
28+
The last type if equivalent to a nonlinear system but with the extra interpretion of
29+
having a potentially preferred unique root. That is, when there are multiple `u` such
30+
that `f(u) = 0`, the `NonlinearProblem` does not have a preferred solution, while for the
31+
`SteadyStateProblem` the preferred solution is the `u(∞)` that would arise from solving the
32+
ODE `u' = f(u,t)`.
33+
34+
!!! warn
35+
36+
Most solvers for `SteadyStateProblem` do not guarentee the preferred solution and
37+
instead will solve for some `u` in the set of solutions. The documentation of the
38+
nonlinear solvers will note if they return the preferred solution.
2639

2740
## Problem Construction Details
2841

2942
```@docs
3043
SciMLBase.IntervalNonlinearProblem
3144
SciMLBase.NonlinearProblem
45+
SciMLBase.SteadyStateProblem
3246
```

docs/src/basics/NonlinearSolution.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Nonlinear Solutions
2+
3+
```@docs
4+
SciMLBase.NonlinearSolution
5+
```

docs/src/index.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ ability to use sparse automatic differentiation for Jacobian construction and
77
Jacobian-vector products. It interfaces with other packages of the Julia ecosystem
88
to make it easy to test alternative solver packages and pass small types to
99
control algorithm swapping. It also interfaces with the
10-
[ModelingToolkit.jl](https://docs.sciml.ai/ModelingToolkit/stable/) world of symbolic modeling to
11-
allow for automatically generating high-performance code.
10+
[ModelingToolkit.jl](https://docs.sciml.ai/ModelingToolkit/stable/) world of symbolic
11+
modeling to allow for automatically generating high-performance code.
1212

1313
Performance is key: the current methods are made to be highly performant on
1414
scalar and statically sized small problems, with options for large-scale systems.
@@ -39,14 +39,8 @@ Pkg.add("NonlinearSolve")
3939
- On the [Julia Discourse forums](https://discourse.julialang.org)
4040
- See also [SciML Community page](https://sciml.ai/community/)
4141

42-
## Roadmap
43-
44-
The current algorithms should support automatic differentiation, though improved
45-
adjoint overloads are planned to be added in the current update (which will make
46-
use of the `f(u,p)` form). Future updates will include standard methods for
47-
larger scale nonlinear solving like Newton-Krylov methods.
48-
4942
## Reproducibility
43+
5044
```@raw html
5145
<details><summary>The documentation of this SciML package was built using these direct dependencies,</summary>
5246
```

docs/src/solvers/BracketingSolvers.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
Solves for ``f(t)=0`` in the problem defined by `prob` using the algorithm
66
`alg`. If no algorithm is given, a default algorithm will be chosen.
77

8-
This page is solely focused on the bracketing methods for scalar nonlinear equations.
9-
108
## Recommended Methods
119

1210
`Falsi()` can have a faster convergence and is discretely differentiable, but is

0 commit comments

Comments
 (0)