Skip to content

Commit fb1a069

Browse files
Merge pull request #35 from mkg33/mg/docs
Minor documentation changes
2 parents 4d22408 + bf32833 commit fb1a069

File tree

6 files changed

+40
-37
lines changed

6 files changed

+40
-37
lines changed

docs/src/basics/NonlinearFunctions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The SciML ecosystem provides an extensive interface for declaring extra function
44
associated with the differential equation's data. In traditional libraries there
55
is usually only one option: the Jacobian. However, we allow for a large array
66
of pre-computed functions to speed up the calculations. This is offered via the
7-
`NonlinearFunction` types which can be passed to the problems.
7+
`NonlinearFunction` types, which can be passed to the problems.
88

99
## Function Type Definitions
1010

docs/src/basics/NonlinearProblem.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and an initial guess ``u₀`` of where `f(u,p)=0`. `f` should be specified as `f
1313
(or in-place as `f(du,u,p)`), and `u₀` should be an AbstractArray (or number)
1414
whose geometry matches the desired geometry of `u`. Note that we are not limited
1515
to numbers or vectors for `u₀`; one is allowed to provide `u₀` as arbitrary
16-
matrices / higher dimension tensors as well.
16+
matrices / higher-dimension tensors as well.
1717

1818
## Problem Type
1919

@@ -24,11 +24,11 @@ NonlinearProblem(f::NonlinearFunction,u0,p=NullParameters();kwargs...)
2424
NonlinearProblem{isinplace}(f,u0,p=NullParameters();kwargs...)
2525
```
2626

27-
`isinplace` optionally sets whether the function is inplace or not. This is
27+
`isinplace` optionally sets whether the function is in-place or not. This is
2828
determined automatically, but not inferred.
2929

30-
Parameters are optional, and if not given then a `NullParameters()` singleton
31-
will be used which will throw nice errors if you try to index non-existent
30+
Parameters are optional, and if not given, then a `NullParameters()` singleton
31+
will be used, which will throw nice errors if you try to index non-existent
3232
parameters. Any extra keyword arguments are passed on to the solvers. For example,
3333
if you set a `callback` in the problem, then that `callback` will be added in
3434
every solve call.
@@ -40,5 +40,5 @@ page.
4040

4141
* `f`: The function in the ODE.
4242
* `u0`: The initial guess for the steady state.
43-
* `p`: The parameters for the problem. Defaults to `NullParameters`
44-
* `kwargs`: The keyword arguments passed onto the solves.
43+
* `p`: The parameters for the problem. Defaults to `NullParameters`.
44+
* `kwargs`: The keyword arguments passed on to the solvers.

docs/src/index.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
# NonlinearSolve.jl: High-Performance Unified Nonlinear Solvers
22

33
NonlinaerSolve.jl is a unified interface for the nonlinear solving packages of
4-
Julia. It includes its own high-performance nonlinear solves which include the
4+
Julia. It includes its own high-performance nonlinear solvers which include the
55
ability to swap out to fast direct and iterative linear solvers, along with the
66
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
9-
control algorithm swapping. It interfaces with the
9+
control algorithm swapping. It also interfaces with the
1010
[ModelingToolkit.jl](https://mtk.sciml.ai/dev/) world of symbolic modeling to
11-
allow for automatically generating high performance code.
11+
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.
15-
If you run into any performance issues, please file an issue.
15+
If you run into any performance issues, please file an issue. Note that this
16+
package is distinct from [SciMLNLSolve.jl](https://github.com/SciML/SciMLNLSolve.jl).
17+
Consult the [NonlinearSystemSolvers](@ref nonlinearsystemsolvers) page for
18+
information on how to import solvers from different packages.
1619

1720
## Installation
1821

@@ -29,10 +32,10 @@ Pkg.add("NonlinearSolve")
2932
[SciML ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://github.com/SciML/ColPrac/blob/master/README.md)
3033
for guidance on PRs, issues, and other matters relating to contributing to ModelingToolkit.
3134
- There are a few community forums:
32-
- The #diffeq-bridged channel in the [Julia Slack](https://julialang.org/slack/)
35+
- the #diffeq-bridged channel in the [Julia Slack](https://julialang.org/slack/)
3336
- [JuliaDiffEq](https://gitter.im/JuliaDiffEq/Lobby) on Gitter
34-
- On the Julia Discourse forums (look for the [modelingtoolkit tag](https://discourse.julialang.org/tag/modelingtoolkit)
35-
- See also [SciML Community page](https://sciml.ai/community/)
37+
- on the Julia Discourse forums (look for the [modelingtoolkit tag](https://discourse.julialang.org/tag/modelingtoolkit)
38+
- see also [SciML Community page](https://sciml.ai/community/)
3639

3740
## Roadmap
3841

docs/src/solvers/BracketingSolvers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ less stable than `Bisection`.
1616

1717
### NonlinearSolve.jl
1818

19-
- `Falsi` : A non-allocating regula falsi method
19+
- `Falsi`: A non-allocating regula falsi method
2020
- `Bisection`: A common bisection method

docs/src/solvers/NonlinearSystemSolvers.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Nonlinear System Solvers
1+
# [Nonlinear System Solvers]((@id nonlinearsystemsolvers))
22

33
`solve(prob::NonlinearProblem,alg;kwargs)`
44

@@ -13,11 +13,11 @@ This page is solely focused on the methods for nonlinear systems.
1313
static arrays and thus really well-optimized for small systems, while for large
1414
systems it can make use of sparsity patterns for sparse automatic differentiation
1515
and sparse linear solving of very large systems. That said, as a classic Newton
16-
method, it's stability region can be smaller than other methods. `NLSolveJL`'s
16+
method, its stability region can be smaller than other methods. `NLSolveJL`'s
1717
`:trust_region` method can be a good choice for high stability, along with
1818
`CMINPACK`.
1919

20-
For a system which is very non-stiff (i.e. the condition number of the Jacobian
20+
For a system which is very non-stiff (i.e., the condition number of the Jacobian
2121
is small, or the eigenvalues of the Jacobian are within a few orders of magnitude),
2222
then `NLSolveJL`'s `:anderson` can be a good choice.
2323

@@ -34,7 +34,7 @@ These are the core solvers.
3434

3535
### SciMLNLSolve.jl
3636

37-
This is a wrapper package to import solvers from other packages into this interface.
37+
This is a wrapper package for importing solvers from other packages into this interface.
3838
Note that these solvers do not come by default, and thus one needs to install
3939
the package before using these solvers:
4040

@@ -64,13 +64,13 @@ NLSolveJL(;
6464

6565
Choices for methods in `NLSolveJL`:
6666

67-
- `:fixedpoint`: fixed point iteration
68-
- `:anderson`: Anderson accelerated fixed point iteration
67+
- `:fixedpoint`: Fixed-point iteration
68+
- `:anderson`: Anderson-accelerated fixed-point iteration
6969
- `:newton`: Classical Newton method with an optional line search
70-
- `:trust_region`: Trust region Newton method. The default
70+
- `:trust_region`: Trust region Newton method (the default choice)
7171

7272
For more information on these arguments, consult the
73-
[NLsolve.jl documentation](https://github.com/JuliaNLSolvers/NLsolve.jl)
73+
[NLsolve.jl documentation](https://github.com/JuliaNLSolvers/NLsolve.jl).
7474

7575
### Sundials.jl
7676

@@ -96,22 +96,22 @@ KINSOL(;
9696

9797
The choices for the linear solver are:
9898

99-
- `:Dense` - A dense linear solver.
100-
- `:Band` - A solver specialized for banded Jacobians. If used, you must set the
99+
- `:Dense`: A dense linear solver
100+
- `:Band`: A solver specialized for banded Jacobians. If used, you must set the
101101
position of the upper and lower non-zero diagonals via `jac_upper` and
102102
`jac_lower`.
103-
- `:LapackDense` - A version of the dense linear solver that uses the Julia-provided
103+
- `:LapackDense`: A version of the dense linear solver that uses the Julia-provided
104104
OpenBLAS-linked LAPACK for multithreaded operations. This will be faster than
105-
`:Dense` on larger systems but has noticable overhead on smaller (<100 ODE) systems.
106-
- `:LapackBand` - A version of the banded linear solver that uses the Julia-provided
105+
`:Dense` on larger systems but has noticeable overhead on smaller (<100 ODE) systems.
106+
- `:LapackBand`: A version of the banded linear solver that uses the Julia-provided
107107
OpenBLAS-linked LAPACK for multithreaded operations. This will be faster than
108-
`:Band` on larger systems but has noticable overhead on smaller (<100 ODE) systems.
109-
- `:Diagonal` - This method is specialized for diagonal Jacobians.
110-
- `:GMRES` - A GMRES method. Recommended first choice Krylov method
111-
- `:BCG` - A Biconjugate gradient method.
112-
- `:PCG` - A preconditioned conjugate gradient method. Only for symmetric
108+
`:Band` on larger systems but has noticeable overhead on smaller (<100 ODE) systems.
109+
- `:Diagonal`: This method is specialized for diagonal Jacobians.
110+
- `:GMRES`: A GMRES method. Recommended first choice Krylov method.
111+
- `:BCG`: A biconjugate gradient method
112+
- `:PCG`: A preconditioned conjugate gradient method. Only for symmetric
113113
linear systems.
114-
- `:TFQMR` - A TFQMR method.
115-
- `:KLU` - A sparse factorization method. Requires that the user specifies a
114+
- `:TFQMR`: A TFQMR method.
115+
- `:KLU`: A sparse factorization method. Requires that the user specify a
116116
Jacobian. The Jacobian must be set as a sparse matrix in the `ODEProblem`
117117
type.

docs/src/tutorials/nonlinear.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ solver = solve(probN, NewtonRaphson(), tol = 1e-9)
1616

1717
where `u0` is the initial condition for the rootfind. Native NonlinearSolve.jl
1818
solvers use the given type of `u0` to determine the type used within the solver
19-
and the return. Note that the parameters `p` can be any type, but most be an
19+
and the return. Note that the parameters `p` can be any type, but most are an
2020
AbstractArray for automatic differentiation.
2121

2222
## Using Bracketing Methods
2323

24-
For scalar rootfinding problems, bracketing methods exist. In this case one passes
24+
For scalar rootfinding problems, bracketing methods exist. In this case, one passes
2525
a bracket instead of an initial condition, for example:
2626

2727
```julia

0 commit comments

Comments
 (0)