Skip to content

Commit 3cd8ee0

Browse files
Merge pull request #637 from ArnoStrouwen/LT
[skip ci] LanguageTool 4
2 parents 626bad6 + 4daa749 commit 3cd8ee0

File tree

9 files changed

+99
-99
lines changed

9 files changed

+99
-99
lines changed

docs/src/getting_started.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ this material.
66

77
## Example 1 : Solving Scalar Equations
88

9-
In this example we will solve the equation
9+
In this example, we will solve the equation
1010

1111
```math
1212
\frac{du}{dt} = f(u,p,t)
@@ -111,12 +111,12 @@ which will only save the final time point.
111111

112112
#### Choosing a Solver Algorithm
113113

114-
DifferentialEquations.jl has a method for choosing the default solver algorithm
114+
DifferentialEquations.jl has a method for choosing the default solver algorithm,
115115
which will find an efficient method to solve your problem. To help users receive
116116
the right algorithm, DifferentialEquations.jl offers a method for choosing
117-
algorithms through hints. This default chooser utilizes the precisions of the
117+
algorithms through hints. This default chooser utilizes the precision of the
118118
number types and the keyword arguments (such as the tolerances) to select an
119-
algorithm. Additionally one can provide `alg_hints` to help choose good defaults
119+
algorithm. Additionally, one can provide `alg_hints` to help choose good defaults
120120
using properties of the problem and necessary features for the solution.
121121
For example, if we have a stiff problem where we need high accuracy,
122122
but don't know the best stiff algorithm for this problem, we can use:
@@ -128,7 +128,7 @@ sol = solve(prob,alg_hints=[:stiff],reltol=1e-8,abstol=1e-8)
128128
You can also explicitly choose the algorithm to use. DifferentialEquations.jl
129129
offers a much wider variety of solver algorithms than traditional differential
130130
equations libraries. Many of these algorithms are from recent research and have
131-
been shown to be more efficient than the "standard" algorithms.
131+
been shown to be more efficient than the standard algorithms.
132132
For example, we can choose a 5th order Tsitouras method:
133133

134134
```@example ODE2
@@ -143,7 +143,7 @@ via:
143143
sol = solve(prob,Tsit5(),reltol=1e-8,abstol=1e-8)
144144
```
145145

146-
In DifferentialEquations.jl, some good "go-to" choices for ODEs are:
146+
In DifferentialEquations.jl, some good go-to choices for ODEs are:
147147

148148
- `AutoTsit5(Rosenbrock23())` handles both stiff and non-stiff equations. This
149149
is a good algorithm to use if you know nothing about the equation.
@@ -154,13 +154,13 @@ In DifferentialEquations.jl, some good "go-to" choices for ODEs are:
154154
- `BS3()` for fast low accuracy non-stiff.
155155
- `Vern7()` for high accuracy non-stiff.
156156
- `Rodas4()` or `Rodas5()` for small stiff equations with Julia-defined types, events, etc.
157-
- `KenCarp4()` or `TRBDF2()` for medium sized (100-2000 ODEs) stiff equations
157+
- `KenCarp4()` or `TRBDF2()` for medium-sized (100-2000 ODEs) stiff equations
158158
- `RadauIIA5()` for really high accuracy stiff equations
159159
- `QNDF()` for large stiff equations
160160

161161
For a comprehensive list of the available algorithms and detailed recommendations,
162-
[Please see the solver documentation](@ref ode_solve). Every problem
163-
type has an associated page detailing all of the solvers associated with the problem.
162+
[please see the solver documentation](@ref ode_solve). Every problem
163+
type has an associated page detailing all the solvers associated with the problem.
164164

165165
### Step 3: Analyzing the Solution
166166

@@ -228,11 +228,11 @@ plot(sol)
228228
The plot function can be formatted using [the attributes available in Plots.jl](https://juliaplots.github.io/).
229229
Additional DiffEq-specific controls are documented [at the plotting page](@ref plot).
230230

231-
For example, from the Plots.jl attribute page we see that the line width can be
231+
For example, from the Plots.jl attribute page, we see that the line width can be
232232
set via the argument `linewidth`. Additionally, a title can be set with `title`.
233233
Thus we add these to our plot command to get the correct output, fix up some
234234
axis labels, and change the legend (note we can disable the legend with
235-
`legend=false`) to get a nice looking plot:
235+
`legend=false`) to get a nice-looking plot:
236236

237237
```@example ODE2
238238
plot(sol,linewidth=5,title="Solution to the linear ODE with a thick line",
@@ -247,7 +247,7 @@ plot!(sol.t,t->0.5*exp(1.01t),lw=3,ls=:dash,label="True Solution!")
247247

248248
## Example 2: Solving Systems of Equations
249249

250-
In this example we will solve the Lorenz equations:
250+
In this example, we will solve the Lorenz equations:
251251

252252
```math
253253
\begin{aligned}
@@ -293,19 +293,19 @@ using Plots
293293
plot(sol,idxs=(1,2,3))
294294
```
295295

296-
Note that the default plot for multi-dimensional systems is an overlay of
296+
Note that the default plot for multidimensional systems is an overlay of
297297
each timeseries. We can plot the timeseries of just the second component using
298298
the variable choices interface once more:
299299

300300
```@example ODE3
301301
plot(sol,idxs=(0,2))
302302
```
303303

304-
Note that here "variable 0" corresponds to the independent variable ("time").
304+
Note that here variable 0 corresponds to the independent variable (time).
305305

306306
## Defining Parameterized Functions
307307

308-
In many cases you may want to explicitly have parameters associated with your
308+
Often, you want to explicitly have parameters associated with your
309309
differential equations. This can be used by things like
310310
[parameter estimation routines](https://docs.sciml.ai/Overview/stable/highlevels/inverse_problems/).
311311
In this case, you use the `p` values via the syntax:
@@ -467,7 +467,7 @@ is the value of the 5th component (by linear indexing) at the 3rd timepoint, or
467467
sol[2,1,:]
468468
```
469469

470-
is the timeseries for the component which is the 2nd row and 1 column.
470+
is the timeseries for the component, which is the 2nd row and 1 column.
471471

472472
## Going Beyond ODEs: How to Use the Documentation
473473

docs/src/index.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ include:
2424

2525
The well-optimized DifferentialEquations solvers benchmark as some of the fastest
2626
implementations, using classic algorithms and ones from recent research which
27-
routinely outperform the "standard" C/Fortran methods, and include algorithms
27+
routinely outperform the standard C/Fortran methods, and include algorithms
2828
optimized for high-precision and HPC applications. At the same time, it wraps
2929
the classic C/Fortran methods, making it easy to switch over to them whenever
3030
necessary. Solving differential equations with different methods from
@@ -75,7 +75,7 @@ Additionally, DifferentialEquations.jl comes with built-in analysis features, in
7575
## Supporting and Citing
7676

7777
The software in this ecosystem was developed as part of academic research.
78-
If you would like to help support it, please star the repository as such
78+
If you would like to help support it, please star the repository, as such
7979
metrics may help us secure funding in the future. If you use SciML
8080
software as part of your research, teaching, or other activities, we would
8181
be grateful if you could cite our work.
@@ -95,7 +95,7 @@ be grateful if you could cite our work.
9595
is necessary for any use of DifferentialEquations.jl or the packages that are
9696
maintained as part of its suite (OrdinaryDiffEq.jl, Sundials.jl, DiffEqDevTools.jl, etc.).
9797
Additionally, many of the solvers utilize novel algorithms, and if these algorithms
98-
are used we asked that you cite the methods. [Please see our citation page for guidelines](http://sciml.ai/citing.html).
98+
are used, we ask that you cite the methods. [Please see our citation page for guidelines](http://sciml.ai/citing.html).
9999

100100
## Getting Started: Installation And First Steps
101101

@@ -116,7 +116,7 @@ using DifferentialEquations
116116
This will add solvers and dependencies
117117
for all kinds of Differential Equations (e.g. ODEs or SDEs etc., see the Supported
118118
Equations section below). If you are interested in only one type of equation
119-
solvers of `DifferentialEquations.jl` or simply want a more lightweight
119+
solver of `DifferentialEquations.jl` or simply want a more lightweight
120120
version, see the
121121
[Reduced Compile Time and Low Dependency Usage](@ref low_dep)
122122
page.
@@ -125,9 +125,9 @@ To understand the package in more detail, check out the following tutorials in
125125
this manual. **It is highly recommended that new users start with the
126126
[ODE tutorial](@ref ode_example)**. Example IJulia notebooks
127127
[can also be found in DiffEqTutorials.jl](https://github.com/SciML/DiffEqTutorials.jl).
128-
If you find any example where there seems to be an error, please open an issue.
128+
If you find any example where there appears to be an error, please open an issue.
129129

130-
For the most up to date information on using the package, please join [the Gitter channel](https://gitter.im/JuliaDiffEq/Lobby).
130+
For the most up-to-date information on using the package, please join [the Gitter channel](https://gitter.im/JuliaDiffEq/Lobby).
131131

132132
Using the bleeding edge for the latest features and development is only recommended
133133
for power users. Information on how to get to the bleeding edge is found in the
@@ -154,7 +154,7 @@ interpreter then run:
154154
>>> diffeqpy.install()
155155
```
156156

157-
and you're good! In addition, to improve the performance of your code it is
157+
and you're good! In addition, to improve the performance of your code, it is
158158
recommended that you use Numba to JIT compile your derivative functions. To
159159
install Numba, use:
160160

@@ -220,13 +220,13 @@ Depth = 2
220220

221221
### Removing and Reducing Compile Times
222222

223-
In some situations one may wish to decrease the compile time associated with DifferentialEquations.jl
224-
usage. If that's the case, there's two strategies to employ. One strategy is to use the
223+
In some situations, one may wish to decrease the compile time associated with DifferentialEquations.jl
224+
usage. If that's the case, there are two strategies to employ. One strategy is to use the
225225
[low dependency usage](https://diffeq.sciml.ai/stable/features/low_dep/). DifferentialEquations.jl
226226
is a metapackage composed of many smaller packages, and thus one could directly use a single component,
227227
such as `OrdinaryDiffEq.jl` for the pure Julia ODE solvers, and decrease the compile times by ignoring
228-
the rest (note: the interface is exactly the same, except using a solver other than those in OrdinaryDiffEq.jl
229-
will error). We recommend that downstream packages only rely on exactly the packages they need.
228+
the rest (note: the interface is exactly the same, except using a solver apart from those in OrdinaryDiffEq.jl
229+
will error). We recommend that downstream packages rely solely on the packages they need.
230230

231231
The other strategy is to use [PackageCompiler.jl](https://julialang.github.io/PackageCompiler.jl/dev/) to create
232232
a system image that precompiles the whole package. To do this, one simply does:
@@ -236,10 +236,10 @@ using PackageCompiler
236236
PackageCompiler.create_sysimage([:DifferentialEquations,:Plots];replace_default=true)
237237
```
238238

239-
Note that there are some drawbacks to adding a package in your system image, for example
239+
Note that there are some drawbacks to adding a package in your system image. For example,
240240
the package will never update until you manually rebuild the system image again. For more
241241
information on the consequences,
242-
[see this portion of the PackageCompiler manual](https://julialang.github.io/PackageCompiler.jl/dev/sysimages/#Drawbacks-to-custom-sysimages-1)
242+
[see this portion of the PackageCompiler manual](https://julialang.github.io/PackageCompiler.jl/dev/sysimages/#Drawbacks-to-custom-sysimages-1).
243243

244244
### Basics
245245

docs/src/tutorials/advanced_ode_example.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# [Solving Large Stiff Equations](@id stiff)
22

33
This tutorial is for getting into the extra features for solving large stiff ordinary
4-
differential equations in an efficient manner. Solving stiff ordinary
4+
differential equations efficiently. Solving stiff ordinary
55
differential equations requires specializing the linear solver on properties of
66
the Jacobian in order to cut down on the ``\mathcal{O}(n^3)`` linear solve and
77
the ``\mathcal{O}(n^2)`` back-solves. Note that these same functions and
@@ -110,7 +110,7 @@ prob_ode_brusselator_2d = ODEProblem(brusselator_2d_loop,u0,(0.,11.5),p)
110110
## Choosing Jacobian Types
111111

112112
When one is using an implicit or semi-implicit differential equation solver,
113-
the Jacobian must be built at many iterations and this can be one of the most
113+
the Jacobian must be built at many iterations, and this can be one of the most
114114
expensive steps. There are two pieces that must be optimized in order to reach
115115
maximal efficiency when solving stiff equations: the sparsity pattern and the
116116
construction of the Jacobian. The construction is filling the matrix
@@ -142,7 +142,7 @@ One of the useful companion tools for DifferentialEquations.jl is
142142
[Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl).
143143
This allows for automatic declaration of Jacobian sparsity types. To see this
144144
in action, we can give an example `du` and `u` and call `jacobian_sparsity`
145-
on our function with the example arguments and it will kick out a sparse matrix
145+
on our function with the example arguments, and it will kick out a sparse matrix
146146
with our pattern, that we can turn into our `jac_prototype`.
147147

148148
```@example stiff1
@@ -151,7 +151,7 @@ du0 = copy(u0)
151151
jac_sparsity = Symbolics.jacobian_sparsity((du,u)->brusselator_2d_loop(du,u,p,0.0),du0,u0)
152152
```
153153

154-
Notice Julia gives a nice print out of the sparsity pattern. That's neat, and
154+
Notice that Julia gives a nice print out of the sparsity pattern. That's neat, and
155155
would be tedious to build by hand! Now we just pass it to the `ODEFunction`
156156
like as before:
157157

@@ -182,7 +182,7 @@ or `TRBDF2(linsolve = UMFPACKFactorization())`.
182182
## Using Jacobian-Free Newton-Krylov
183183

184184
A completely different way to optimize the linear solvers for large sparse
185-
matrices is to use a Krylov subpsace method. This requires choosing a linear
185+
matrices is to use a Krylov subspace method. This requires choosing a linear
186186
solver for changing to a Krylov method. To swap the linear solver out, we use
187187
the `linsolve` command and choose the GMRES linear solver.
188188

@@ -192,7 +192,7 @@ nothing # hide
192192
```
193193

194194
Notice that this acceleration does not require the definition of a sparsity
195-
pattern and can thus be an easier way to scale for large problems. For more
195+
pattern, and can thus be an easier way to scale for large problems. For more
196196
information on linear solver choices, see the
197197
[linear solver documentation](@ref linear_nonlinear). `linsolve` choices are any
198198
valid [LinearSolve.jl](http://linearsolve.sciml.ai/dev/) solver.
@@ -235,8 +235,8 @@ Notice a few things about this preconditioner. This preconditioner uses the
235235
sparse Jacobian, and thus we set `concrete_jac=true` to tell the algorithm to
236236
generate the Jacobian (otherwise, a Jacobian-free algorithm is used with GMRES
237237
by default). Then `newW = true` whenever a new `W` matrix is computed, and
238-
`newW=nothing` during the startup phase of the solver. Thus we do a check
239-
`newW === nothing || newW` and when true, it's only at these points when we
238+
`newW=nothing` during the startup phase of the solver. Thus, we do a check
239+
`newW === nothing || newW` and when true, it's only at these points when
240240
we update the preconditioner, otherwise we just pass on the previous version.
241241
We use `convert(AbstractMatrix,W)` to get the concrete `W` matrix (matching
242242
`jac_prototype`, thus `SpraseMatrixCSC`) which we can use in the preconditioner's
@@ -299,7 +299,7 @@ the linear solver choice is done with a Symbol in the `linear_solver` from a
299299
preset list. Particular choices of note are `:Band` for a banded matrix and
300300
`:GMRES` for using GMRES. If you are using Sundials, `:GMRES` will not require
301301
defining the JacVecOperator, and instead will always make use of a Jacobian-Free
302-
Newton Krylov (with numerical differentiation). Thus on this problem we could do:
302+
Newton Krylov (with numerical differentiation). Thus, on this problem we could do:
303303

304304
```@example stiff1
305305
using Sundials
@@ -368,7 +368,7 @@ function precilu(z,r,p,t,y,fy,gamma,delta,lr)
368368
end
369369
```
370370

371-
We then simply pass these functions to the Sundials solver with a choice of
371+
We then simply pass these functions to the Sundials solver, with a choice of
372372
`prec_side=1` to indicate that it is a left-preconditioner:
373373

374374
```julia

docs/src/tutorials/bvp_example.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ introductions can be found by [checking out SciMLTutorials.jl](https://docs.scim
77

88
This tutorial assumes you have read the [Ordinary Differential Equations tutorial](@ref ode_example).
99

10-
In this example we will solve the ODE that satisfies the boundary condition in the form of
10+
In this example, we will solve the ODE that satisfies the boundary condition in the form of
1111

1212
```math
1313
\begin{aligned}
@@ -37,7 +37,7 @@ end
3737
### Boundary Condition
3838

3939
There are two problem types available:
40-
- A problem type for general boundary conditions `BVProblem` ( including conditions that may be anywhere/ everywhere on the integration interval ).
40+
- A problem type for general boundary conditions `BVProblem` (including conditions that may be anywhere/ everywhere on the integration interval).
4141
- A problem type for boundaries that are specified at the beginning and the end of the integration interval `TwoPointBVProblem`
4242

4343
#### `BVProblem`
@@ -68,16 +68,16 @@ end
6868
bvp3 = BVProblem(simplependulum!, bc3!, u₀_2, tspan)
6969
sol3 = solve(bvp3, Shooting(Vern7()))
7070
```
71-
The initial guess can also be supplied via a function of `t` or a previous solution type, this is espacially handy for parameter analysis.
72-
We changed `u` to `sol` to emphasize the fact that in this case the boundary condition can be written on the solution object. Thus all of the features on the solution type such as interpolations are available when using the `Shooting` method (i.e. you can have a boundary condition saying that the maximum over the interval is `1` using an optimization function on the continuous output). Note that user has to import the IVP solver before it can be used. Any common interface ODE solver is acceptable.
71+
The initial guess can also be supplied via a function of `t` or a previous solution type, this is especially handy for parameter analysis.
72+
We changed `u` to `sol` to emphasize the fact that in this case, the boundary condition can be written on the solution object. Thus, all the features on the solution type such as interpolations are available when using the `Shooting` method. (i.e. you can have a boundary condition saying that the maximum over the interval is `1` using an optimization function on the continuous output). Note that user has to import the IVP solver before it can be used. Any common interface ODE solver is acceptable.
7373

7474
```@example bvp
7575
plot(sol3)
7676
```
7777

7878
#### `TwoPointBVProblem`
7979

80-
Defining a similar problem as `TwoPointBVProblem` is shown in the following example. At the moment `MIRK4` is the only solver for `TwoPointBVProblem`s.
80+
Defining a similar problem as `TwoPointBVProblem` is shown in the following example. Currently, `MIRK4` is the only solver for `TwoPointBVProblem`s.
8181

8282
```@example bvp
8383
function bc2!(residual, u, p, t) # u[1] is the beginning of the time span, and u[end] is the ending

docs/src/tutorials/dae_example.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Mu' = f(u,p,t)
2020
```
2121

2222
where ``M`` is known as the mass matrix. Let's solve the Robertson equation.
23-
In previous tutorials we wrote this equation as:
23+
In previous tutorials, we wrote this equation as:
2424

2525
```math
2626
\begin{aligned}
@@ -72,7 +72,7 @@ plot(sol, xscale=:log10, tspan=(1e-6, 1e5), layout=(3,1))
7272

7373
## Implicitly-Defined Differential-Algebraic Equations (DAEs)
7474

75-
In this example we will solve the Robertson equation in its implicit form:
75+
In this example, we will solve the Robertson equation in its implicit form:
7676

7777
```math
7878
f(du,u,p,t) = 0
@@ -104,7 +104,7 @@ with initial conditions ``y_1(0) = 1``, ``y_2(0) = 0``, ``y_3(0) = 0``,
104104
The workflow for DAEs is the same as for the other types of equations, where all
105105
you need to know is how to define the problem. A `DAEProblem` is specified by defining
106106
an in-place update `f(out,du,u,p,t)` which uses the values to mutate `out` as the
107-
output. To makes this into a DAE, we move all of the variables to one side.
107+
output. To makes this into a DAE, we move all the variables to one side.
108108
Thus, we can define the function:
109109

110110
```@example dae

0 commit comments

Comments
 (0)