Skip to content

Commit 2330b85

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 2a9ec11 commit 2330b85

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

src/DiffEqDevTools.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export test_convergence, analyticless_test_convergence, appxtrue!, appxtrue
4646
export get_sample_errors
4747

4848
#Tab Functions
49-
export stability_region, residual_order_condition, check_tableau, imaginary_stability_interval
49+
export stability_region, residual_order_condition, check_tableau,
50+
imaginary_stability_interval
5051

5152
#Tableaus
5253
export deduce_Butcher_tableau

src/tableau_info.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Calculates the length of the stability region in the real axis.
6767
See also [`imaginary_stability_interval`](@ref).
6868
"""
6969
function stability_region(tab_or_alg::Union{ODERKTableau, AbstractODEAlgorithm};
70-
initial_guess = -3.0, kw...)
70+
initial_guess = -3.0, kw...)
7171
residual! = function (resid, x)
7272
resid[1] = abs(stability_region(x[1], tab_or_alg)) - 1
7373
end
@@ -84,8 +84,8 @@ the size of the stability region on the imaginary axis.
8484
See also [`stability_region`](@ref).
8585
"""
8686
function imaginary_stability_interval(tab::ODERKTableau;
87-
initial_guess = length(tab) - one(eltype(tab.A)),
88-
kw...)
87+
initial_guess = length(tab) - one(eltype(tab.A)),
88+
kw...)
8989
residual! = function (resid, x)
9090
resid[1] = abs(stability_region(im * x[1], tab)) - 1
9191
end
@@ -102,8 +102,8 @@ the size of the stability region on the imaginary axis.
102102
See also [`stability_region`](@ref).
103103
"""
104104
function imaginary_stability_interval(alg::AbstractODEAlgorithm;
105-
initial_guess = 20.0,
106-
kw...)
105+
initial_guess = 20.0,
106+
kw...)
107107
residual! = function (resid, x)
108108
resid[1] = abs(stability_region(im * x[1], alg)) - 1
109109
end

test/stability_region_test.jl

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,22 @@ using OrdinaryDiffEq
55
@test stability_region(constructTsitourasPapakostas6(), initial_guess = -3.5)-3.95413 rtol=1e-3
66
@test stability_region(constructRadauIIA5(), initial_guess = 12.0)11.84 rtol=1e-2
77

8-
@test @inferred(stability_region(constructTsitouras5()))@inferred(stability_region(Tsit5()))
9-
@test @inferred(stability_region(constructSSPRK104()))@inferred(stability_region(SSPRK104()))
10-
@test @inferred(stability_region(constructImplicitEuler()))@inferred(stability_region(ImplicitEuler()))
11-
@test @inferred(abs(stability_region(nextfloat(typemin(Float64)), ImplicitEuler()))) < eps(Float64)
8+
@test @inferred(stability_region(constructTsitouras5()))
9+
@inferred(stability_region(Tsit5()))
10+
@test @inferred(stability_region(constructSSPRK104()))
11+
@inferred(stability_region(SSPRK104()))
12+
@test @inferred(stability_region(constructImplicitEuler()))
13+
@inferred(stability_region(ImplicitEuler()))
14+
@test @inferred(abs(stability_region(nextfloat(typemin(Float64)), ImplicitEuler()))) <
15+
eps(Float64)
1216

13-
@test @inferred(imaginary_stability_interval(constructSSPRK33()))sqrt(3)
14-
@test @inferred(imaginary_stability_interval(constructSSPRK33(Float32)))sqrt(3.0f0)
15-
@test @inferred(imaginary_stability_interval(constructKutta3()))sqrt(3)
16-
@test @inferred(imaginary_stability_interval(constructKutta3(Float32)))sqrt(3.0f0)
17-
@test @inferred(imaginary_stability_interval(constructRK4()))2.8284271247
17+
@test @inferred(imaginary_stability_interval(constructSSPRK33())) sqrt(3)
18+
@test @inferred(imaginary_stability_interval(constructSSPRK33(Float32))) sqrt(3.0f0)
19+
@test @inferred(imaginary_stability_interval(constructKutta3())) sqrt(3)
20+
@test @inferred(imaginary_stability_interval(constructKutta3(Float32))) sqrt(3.0f0)
21+
@test @inferred(imaginary_stability_interval(constructRK4())) 2.8284271247
1822

19-
@test @inferred(imaginary_stability_interval(SSPRK33()))sqrt(3)
20-
@test @inferred(imaginary_stability_interval(SSPRK33(), initial_guess = 5.0f0))sqrt(3.0f0)
21-
@test @inferred(imaginary_stability_interval(RK4()))2.8284271247
23+
@test @inferred(imaginary_stability_interval(SSPRK33())) sqrt(3)
24+
@test @inferred(imaginary_stability_interval(SSPRK33(), initial_guess = 5.0f0))
25+
sqrt(3.0f0)
26+
@test @inferred(imaginary_stability_interval(RK4())) 2.8284271247

0 commit comments

Comments
 (0)