Skip to content

Commit 25792cd

Browse files
author
SciML Bot
committed
Apply JuliaFormatter to fix code formatting
- Applied JuliaFormatter with SciML style guide - Formatted 3 files 🤖 Generated by OrgMaintenanceScripts.jl
1 parent a0f70de commit 25792cd

File tree

3 files changed

+32
-19
lines changed

3 files changed

+32
-19
lines changed

lib/NonlinearProblemLibrary/src/NonlinearProblemLibrary.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ p12_dict = Dict("n" => n, "start" => x_start, "sol" => x_sol,
264264

265265
@inbounds function p13_f!(out, x, p = nothing)
266266
n = length(x)
267-
out[1] = broyden_tridiag_kernel(x[1]) -2.0 * x[2]
267+
out[1] = broyden_tridiag_kernel(x[1]) - 2.0 * x[2]
268268
for k in 2:(n - 1)
269269
out[k] = broyden_tridiag_kernel(x[k]) - x[k - 1] - 2.0 * x[k + 1]
270270
end

lib/ODEProblemLibrary/src/ode_simple_nonlinear_prob.jl

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ with ``μ=1.0`` and ``u_0=[x => \\sqrt{3}, y => 0]``
7070
7171
Non-stiff parameters.
7272
"""
73-
prob_ode_vanderpol = ODEProblem(van, [y => 0, x => sqrt(3), μ => 1.0], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
73+
prob_ode_vanderpol = ODEProblem(van, [y => 0, x => sqrt(3), μ => 1.0], (0.0, 1.0),
74+
jac = true, eval_module = @__MODULE__)
7475

7576
"""
7677
Van der Pol Equations
@@ -86,7 +87,8 @@ with ``μ=10^6`` and ``u_0=[x => \\sqrt{3}, y => 0]``
8687
8788
Stiff parameters.
8889
"""
89-
prob_ode_vanderpol_stiff = ODEProblem(van, [y => 0, x => sqrt(3), μ => 1e6], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
90+
prob_ode_vanderpol_stiff = ODEProblem(van, [y => 0, x => sqrt(3), μ => 1e6], (0.0, 1.0),
91+
jac = true, eval_module = @__MODULE__)
9092

9193
# ROBER
9294
@parameters k₁ k₂ k₃
@@ -116,7 +118,9 @@ Hairer Norsett Wanner Solving Ordinary Differential Equations I - Nonstiff Probl
116118
117119
Usually solved on ``[0,1e11]``
118120
"""
119-
prob_ode_rober = ODEProblem(rober, [[y₁, y₂, y₃] .=> [1.0; 0.0; 0.0]; [k₁, k₂, k₃] .=> (0.04, 3e7, 1e4)], (0.0, 1e11), jac = true, eval_module = @__MODULE__)
121+
prob_ode_rober = ODEProblem(
122+
rober, [[y₁, y₂, y₃] .=> [1.0; 0.0; 0.0]; [k₁, k₂, k₃] .=> (0.04, 3e7, 1e4)],
123+
(0.0, 1e11), jac = true, eval_module = @__MODULE__)
120124

121125
# Three Body
122126
const threebody_μ = big(0.012277471);
@@ -200,8 +204,10 @@ or Hairer Norsett Wanner Solving Ordinary Differential Equations I - Nonstiff Pr
200204
201205
Usually solved from 0 to 20.
202206
"""
203-
prob_ode_rigidbody = ODEProblem(rigid, [[y₁, y₂, y₃] .=> [1.0, 0.0, 0.9]; [I₁, I₂, I₃] .=> (-2.0, 1.25, -0.5)], (0.0, 20.0),
204-
jac = true, eval_module = @__MODULE__)
207+
prob_ode_rigidbody = ODEProblem(
208+
rigid, [[y₁, y₂, y₃] .=> [1.0, 0.0, 0.9]; [I₁, I₂, I₃] .=> (-2.0, 1.25, -0.5)],
209+
(0.0, 20.0),
210+
jac = true, eval_module = @__MODULE__)
205211

206212
# Pleiades Problem
207213

@@ -365,8 +371,9 @@ u0[1] = 1
365371
u0[8] = 0.0057
366372

367373
u0 = [y1, y2, y3, y4, y5, y6, y7, y8] .=> u0
368-
p = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12] .=> (1.71, 0.43, 8.32, 0.0007, 8.75,
369-
10.03, 0.035, 1.12, 1.745, 280.0, 0.69, 1.81)
374+
p = [p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12] .=>
375+
(1.71, 0.43, 8.32, 0.0007, 8.75,
376+
10.03, 0.035, 1.12, 1.745, 280.0, 0.69, 1.81)
370377

371378
"""
372379
Hires Problem (Stiff)
@@ -390,7 +397,8 @@ where ``f`` is defined by
390397
Reference: [demohires.pdf](http://www.radford.edu/~thompson/vodef90web/problems/demosnodislin/Demos_Pitagora/DemoHires/demohires.pdf)
391398
Notebook: [Hires.ipynb](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Hires.ipynb)
392399
"""
393-
prob_ode_hires = ODEProblem(hires, [u0; p], (0.0, 321.8122), jac = true, eval_module = @__MODULE__)
400+
prob_ode_hires = ODEProblem(
401+
hires, [u0; p], (0.0, 321.8122), jac = true, eval_module = @__MODULE__)
394402

395403
@parameters p1 p2 p3
396404
@variables y1(t) y2(t) y3(t)
@@ -418,4 +426,6 @@ where ``s=77.27``, ``w=0.161`` and ``q=8.375⋅10^{-6}``.
418426
Reference: [demoorego.pdf](http://www.radford.edu/~thompson/vodef90web/problems/demosnodislin/Demos_Pitagora/DemoOrego/demoorego.pdf)
419427
Notebook: [Orego.ipynb](http://nbviewer.jupyter.org/github/JuliaDiffEq/DiffEqBenchmarks.jl/blob/master/StiffODE/Orego.ipynb)
420428
"""
421-
prob_ode_orego = ODEProblem(orego, [[y1, y2, y3] .=> [1.0, 2.0, 3.0]; [p1, p2, p3] .=> [77.27, 8.375e-6, 0.161]], (0.0, 30.0), jac = true, eval_module = @__MODULE__)
429+
prob_ode_orego = ODEProblem(
430+
orego, [[y1, y2, y3] .=> [1.0, 2.0, 3.0]; [p1, p2, p3] .=> [77.27, 8.375e-6, 0.161]],
431+
(0.0, 30.0), jac = true, eval_module = @__MODULE__)

lib/ODEProblemLibrary/src/strange_attractors.jl

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $(latexify(thomas))
2323
2424
[Wikipedia](https://en.wikipedia.org/wiki/Thomas%27_cyclically_symmetric_attractor)
2525
"""
26-
prob_ode_thomas = ODEProblem(thomas, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
26+
prob_ode_thomas = ODEProblem(thomas, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)
2727

2828
# Lorenz
2929
@parameters σ=10 ρ=28 β=8 / 3
@@ -46,7 +46,7 @@ $(latexify(lorenz))
4646
4747
[Wikipedia](https://en.wikipedia.org/wiki/Lorenz_system)
4848
"""
49-
prob_ode_lorenz = ODEProblem(lorenz, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
49+
prob_ode_lorenz = ODEProblem(lorenz, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)
5050

5151
# Aizawa
5252
@parameters a=0.95 b=0.7 c=0.6 d=3.5 e=0.25 f=0.1
@@ -68,7 +68,7 @@ $(latexify(aizawa))
6868
[Reference](https://journals.ametsoc.org/view/journals/atsc/20/2/1520-0469_1963_020_0130_dnf_2_0_co_2.xml)
6969
7070
"""
71-
prob_ode_aizawa = ODEProblem(aizawa, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
71+
prob_ode_aizawa = ODEProblem(aizawa, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)
7272

7373
# Dadras
7474
@parameters a=3 b=2.7 c=1.7 d=2 e=9
@@ -90,7 +90,7 @@ $(latexify(dadras))
9090
[Reference](https://www.sciencedirect.com/science/article/abs/pii/S0375960109009591)
9191
9292
"""
93-
prob_ode_dadras = ODEProblem(dadras, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
93+
prob_ode_dadras = ODEProblem(dadras, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)
9494

9595
# chen
9696
@parameters a=35 b=3 c=28
@@ -112,7 +112,7 @@ $(latexify(chen))
112112
[Reference](https://www.worldscientific.com/doi/abs/10.1142/S0218127499001024)
113113
114114
"""
115-
prob_ode_chen = ODEProblem(chen, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
115+
prob_ode_chen = ODEProblem(chen, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)
116116

117117
# rossler
118118
@parameters a=0.2 b=0.2 c=5.7
@@ -135,7 +135,8 @@ $(latexify(rossler))
135135
[Wikipedia](https://en.wikipedia.org/wiki/R%C3%B6ssler_attractor)
136136
137137
"""
138-
prob_ode_rossler = ODEProblem(rossler, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
138+
prob_ode_rossler = ODEProblem(
139+
rossler, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)
139140

140141
# rabinovich_fabrikant
141142
@parameters a=0.14 b=0.10
@@ -157,7 +158,8 @@ $(latexify(rabinovich_fabrikant))
157158
[Reference](https://en.wikipedia.org/wiki/Rabinovich%E2%80%93Fabrikant_equations)
158159
159160
"""
160-
prob_ode_rabinovich_fabrikant = ODEProblem(rabinovich_fabrikant, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
161+
prob_ode_rabinovich_fabrikant = ODEProblem(
162+
rabinovich_fabrikant, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)
161163

162164
# sprott
163165
@parameters a=2.07 b=1.79
@@ -179,7 +181,7 @@ $(latexify(sprott))
179181
[Reference](https://sprott.physics.wisc.edu/pubs/paper423.pdf)
180182
181183
"""
182-
prob_ode_sprott = ODEProblem(sprott, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
184+
prob_ode_sprott = ODEProblem(sprott, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)
183185

184186
# hindmarsh_rose
185187
@parameters a=1 b=3 c=1 d=5 r=1e-2 s=4 xr=-8 / 5 i=5
@@ -201,4 +203,5 @@ $(latexify(hindmarsh_rose))
201203
[Reference](https://en.wikipedia.org/wiki/Hindmarsh%E2%80%93Rose_model)
202204
203205
"""
204-
prob_ode_hindmarsh_rose = ODEProblem(hindmarsh_rose, [], (0.0, 1.0), jac=true, eval_module = @__MODULE__)
206+
prob_ode_hindmarsh_rose = ODEProblem(
207+
hindmarsh_rose, [], (0.0, 1.0), jac = true, eval_module = @__MODULE__)

0 commit comments

Comments
 (0)