Skip to content

Commit add4122

Browse files
ErikQQYChrisRackauckas
authored andcommitted
format
1 parent d54bba8 commit add4122

File tree

7 files changed

+43
-42
lines changed

7 files changed

+43
-42
lines changed

docs/src/basics/plot.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,52 +75,49 @@ the following conveniences are provided:
7575
- Everywhere in a tuple position where we only find an integer, this
7676
variable is plotted as a function of time. For example, the list above
7777
is equivalent to:
78-
78+
7979
```julia
8080
idxs = [1, (1, 3), (4, 5)]
8181
```
82-
82+
8383
and
84-
84+
8585
```julia
8686
idxs = [1, 3, 4]
8787
```
88-
88+
8989
is the most concise way to plot the variables 1, 3, and 4 as a function
9090
of time.
9191

9292
- It is possible to omit the list if only one plot is wanted: `(2,3)`
9393
and `4` are respectively equivalent to `[(2,3)]` and `[(0,4)]`.
94-
9594
- A tuple containing one or several lists will be expanded by
9695
associating corresponding elements of the lists with each other:
97-
96+
9897
```julia
9998
idxs = ([1, 2, 3], [4, 5, 6])
10099
```
101-
100+
102101
is equivalent to
103-
102+
104103
```julia
105104
idxs = [(1, 4), (2, 5), (3, 6)]
106105
```
107-
106+
108107
and
109-
108+
110109
```julia
111110
idxs = (1, [2, 3, 4])
112111
```
113-
112+
114113
is equivalent to
115-
114+
116115
```julia
117116
idxs = [(1, 2), (1, 3), (1, 4)]
118117
```
119-
120118
- Instead of using integers, one can use the symbols from a `ParameterizedFunction`.
121119
For example, `idxs=(:x,:y)` will replace the symbols with the integer values for
122120
components `:x` and `:y`.
123-
124121
- n-dimensional groupings are allowed. For example, `(1,2,3,4,5)` would be a
125122
5-dimensional plot between the associated variables.
126123

docs/src/examples/kepler_problem.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ sol = solve(prob, KahanLi6(), dt = 1 // 10);
2727
```
2828

2929
!!! note
30+
3031
Note that NonlinearSolve.jl is required to be imported for ManifoldProjection
3132

3233
Let's plot the orbit and check the energy and angular momentum variation. We know that energy and angular momentum should be constant, and they are also called first integrals.

docs/src/extras/timestepping.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ end
190190

191191
function StochasticDiffEq.stepsize_controller!(integrator::StochasticDiffEq.SDEIntegrator,
192192
controller::CustomController, alg)
193-
integrator.q11 = DiffEqBase.value(FastPower.fastpower(integrator.EEst, controller.beta1))
193+
integrator.q11 = DiffEqBase.value(FastPower.fastpower(
194+
integrator.EEst, controller.beta1))
194195
integrator.q = DiffEqBase.value(integrator.q11 /
195196
FastPower.fastpower(integrator.qold, controller.beta2))
196197
integrator.q = DiffEqBase.value(max(inv(integrator.opts.qmax),

docs/src/features/io.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ work. If none of these are put into scope, the solution type
8181
will still load and hold all of the values (so `sol.u` and `sol.t`
8282
will work), but none of the interface will be available.
8383

84-
If you want a copy of the solution that contains no function information
84+
If you want a copy of the solution that contains no function information
8585
you can use the function `SciMLBase.strip_solution(sol)`.
86-
This will return a copy of the solution that doesn't have any functions,
86+
This will return a copy of the solution that doesn't have any functions,
8787
which you can serialize and deserialize without having any of the problems
88-
that typically come with serializing functions.
88+
that typically come with serializing functions.
8989

9090
## JLD
9191

docs/src/solvers/bvp_solve.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# [BVP Solvers](@id bvp_solve)
22

33
```julia
4-
solve(prob::BVProblem,alg,dt;kwargs)
5-
solve(prob::TwoPointBVProblem,alg,dt;kwargs)
6-
solve(prob::SecondOrderBVProblem,alg,dt;kwargs)
7-
solve(prob::SecondOrderTwoPointBVProblem,alg,dt;kwargs)
4+
solve(prob::BVProblem, alg, dt; kwargs)
5+
solve(prob::TwoPointBVProblem, alg, dt; kwargs)
6+
solve(prob::SecondOrderBVProblem, alg, dt; kwargs)
7+
solve(prob::SecondOrderTwoPointBVProblem, alg, dt; kwargs)
88
```
99

1010
Solves the BVP defined by `prob` using the algorithm `alg`. All algorithms except `Shooting` and `MultipleShooting` methods should specify a `dt` which is the step size for the discretized mesh.
@@ -39,20 +39,18 @@ off via the keyword argument `adaptive = false`.
3939
Similar to `MIRK` methods, fully implicit Runge-Kutta methods construct nonlinear problems from the collocation equations of a BVP and solve such nonlinear systems to obtain numerical solutions of BVP. When solving large boundary value problems, choose a nested NonlinearSolve.jl solver by setting `nested_nlsolve=true` in FIRK solvers can achieve better performance.
4040

4141
- `LobattoIIIa2` - A 2nd stage LobattoIIIa collocation method.
42+
4243
- `LobattoIIIa3` - A 3rd stage LobattoIIIa collocation method.
4344
- `LobattoIIIa4` - A 4th stage LobattoIIIa collocation method.
4445
- `LobattoIIIa5` - A 5th stage LobattoIIIa collocation method.
45-
4646
- `LobattoIIIb2` - A 2nd stage LobattoIIIa collocation method, doesn't support defect control adaptivity.
4747
- `LobattoIIIb3` - A 3rd stage LobattoIIIa collocation method.
4848
- `LobattoIIIb4` - A 4th stage LobattoIIIa collocation method.
4949
- `LobattoIIIb5` - A 5th stage LobattoIIIa collocation method.
50-
5150
- `LobattoIIIc2` - A 2nd stage LobattoIIIa collocation method, doesn't support defect control adaptivity.
5251
- `LobattoIIIc3` - A 3rd stage LobattoIIIa collocation method.
5352
- `LobattoIIIc4` - A 4th stage LobattoIIIa collocation method.
5453
- `LobattoIIIc5` - A 5th stage LobattoIIIa collocation method.
55-
5654
- `RadauIIa1` - A 1st stage Radau collocation method, doesn't support defect control adaptivity.
5755
- `RadauIIa2` - A 2nd stage Radau collocation method.
5856
- `RadauIIa3` - A 3rd stage Radau collocation method.

docs/src/solvers/ode_solve.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -959,20 +959,24 @@ using IRKGaussLegendre
959959
960960
`IRKGL16(;kwargs...)` has the following arguments:
961961
962-
- second_order_ode (boolean):
963-
- =false (default): for a ODEProblem type
964-
- =true: for a second-order differential equation
965-
- simd (boolean):
966-
- =true: SIMD-vectorized implementation only available for Float32 or Float64 computations
967-
- =false (default): generic implementation that can use with arbitrary Julia-defined number systems
968-
- mstep: output saved at every 'mstep' steps. Default 1.
969-
- initial_extrapolation: initialization method for stages.
970-
- =false: simplest initialization
971-
- =true (default): extrapolation from the stage values of previous step
972-
- maxtrials: maximum number of attempts to accept adaptive step size
973-
- threading
974-
- =false (default): sequential execution of the numerical integration
975-
- =true: computations using threads (shared memory multi-threading) for stage-wise parallelization
962+
- second_order_ode (boolean):
963+
964+
+ =false (default): for a ODEProblem type
965+
+ =true: for a second-order differential equation
966+
- simd (boolean):
967+
968+
+ =true: SIMD-vectorized implementation only available for Float32 or Float64 computations
969+
+ =false (default): generic implementation that can use with arbitrary Julia-defined number systems
970+
- mstep: output saved at every 'mstep' steps. Default 1.
971+
- initial_extrapolation: initialization method for stages.
972+
973+
+ =false: simplest initialization
974+
+ =true (default): extrapolation from the stage values of previous step
975+
- maxtrials: maximum number of attempts to accept adaptive step size
976+
- threading
977+
978+
+ =false (default): sequential execution of the numerical integration
979+
+ =true: computations using threads (shared memory multi-threading) for stage-wise parallelization
976980
977981
### SimpleDiffEq.jl
978982

docs/src/tutorials/bvp_example.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ The boundary conditions are specified by a function that calculates the residual
4040

4141
```@example bvp
4242
function bc1!(residual, u, p, t)
43-
residual[1] = u(pi/4)[1] + pi / 2 # the solution at the middle of the time span should be -pi/2
44-
residual[2] = u(pi/2)[1] - pi / 2 # the solution at the end of the time span should be pi/2
43+
residual[1] = u(pi / 4)[1] + pi / 2 # the solution at the middle of the time span should be -pi/2
44+
residual[2] = u(pi / 2)[1] - pi / 2 # the solution at the end of the time span should be pi/2
4545
end
4646
bvp1 = BVProblem(simplependulum!, bc1!, [pi / 2, pi / 2], tspan)
4747
sol1 = solve(bvp1, MIRK4(), dt = 0.05)
@@ -174,4 +174,4 @@ tspan = (0.0, 1.0)
174174
fun = BVPFunction(f!, bc!, mass_matrix = [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 0])
175175
prob = BVProblem(fun, u0, tspan)
176176
sol = solve(prob, Ascher4(zeta = [0.0, 0.0, 1.0]), dt = 0.01)
177-
```
177+
```

0 commit comments

Comments
 (0)