Skip to content

Commit b0504b3

Browse files
style: apply Runic formatting to fix runic CI (#3481)
Runs Runic.format_file on the 5 files flagged by the runic CI check. The formatting drift was introduced by recent merges (most notably the SymplecticRK refactor in #3473) and now blocks format-check on every open PR. No semantic changes. Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com>
1 parent 8597d06 commit b0504b3

5 files changed

Lines changed: 64 additions & 42 deletions

File tree

lib/OrdinaryDiffEqCore/src/integrators/integrator_utils.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,12 @@ function modify_dt_for_tstops!(integrator)
184184
# just past the last tstop and produce a spurious micro-step.
185185
tstop_tol = if integrator.t isa AbstractFloat && isfinite(tdir_tstop) &&
186186
isfinite(integrator.t)
187-
100 * eps(float(max(abs(integrator.t), abs(tdir_tstop)) /
188-
oneunit(integrator.t))) * oneunit(integrator.t)
187+
100 * eps(
188+
float(
189+
max(abs(integrator.t), abs(tdir_tstop)) /
190+
oneunit(integrator.t)
191+
)
192+
) * oneunit(integrator.t)
189193
else
190194
zero(distance_to_tstop)
191195
end

lib/OrdinaryDiffEqFIRK/src/algorithms.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ year={1999},
99
publisher={Elsevier}}"""
1010

1111
AdaptiveRadauPaper = """@article{AdaptiveRadauPaper,
12-
author={Ekanathan, Shreyas and Smith, Oscar and Rackauckas, Christopher},
13-
booktitle={2025 IEEE High Performance Extreme Computing Conference (HPEC)},
14-
title={A Fully Adaptive Radau Method for the Efficient Solution of Stiff Ordinary Differential Equations at Low Tolerances},
15-
year={2025},
16-
pages={1-9},
17-
doi={10.1109/HPEC67600.2025.11196706}}"""
12+
author={Ekanathan, Shreyas and Smith, Oscar and Rackauckas, Christopher},
13+
booktitle={2025 IEEE High Performance Extreme Computing Conference (HPEC)},
14+
title={A Fully Adaptive Radau Method for the Efficient Solution of Stiff Ordinary Differential Equations at Low Tolerances},
15+
year={2025},
16+
pages={1-9},
17+
doi={10.1109/HPEC67600.2025.11196706}}"""
1818

1919
extra_keyword_description = """
2020
- `extrapolant`: TBD

lib/OrdinaryDiffEqStabilizedRK/src/rkc_perform_step.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ end
12121212
onemq = 1 - q
12131213
onepq = 1 + q
12141214
onepq2 = onepq * onepq
1215-
1215+
12161216
# The first and possibly second steps are calculated via the one-step RKC method.
12171217
rkcstep = q < 0.49
12181218

@@ -1325,4 +1325,4 @@ end
13251325
integrator.k[1] = integrator.fsalfirst
13261326
integrator.k[2] = integrator.fsallast
13271327
integrator.u = u
1328-
end
1328+
end

lib/OrdinaryDiffEqSymplecticRK/src/symplectic_caches.jl

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,23 +150,23 @@ end
150150

151151
# Mapping from algorithm to tableau constructor
152152
_symplectic_tableau(::PseudoVerletLeapfrog, ::Type{T}, ::Type{T2}) where {T, T2} = PseudoVerletLeapfrogConstantCache(T, T2)
153-
_symplectic_tableau(::McAte2, ::Type{T}, ::Type{T2}) where {T,T2} = McAte2ConstantCache(T, T2)
154-
_symplectic_tableau(::Ruth3, ::Type{T}, ::Type{T2}) where {T,T2} = Ruth3ConstantCache(T, T2)
155-
_symplectic_tableau(::McAte3, ::Type{T}, ::Type{T2}) where {T,T2} = McAte3ConstantCache(T, T2)
156-
_symplectic_tableau(::CandyRoz4, ::Type{T}, ::Type{T2}) where {T,T2} = CandyRoz4ConstantCache(T, T2)
157-
_symplectic_tableau(::McAte4, ::Type{T}, ::Type{T2}) where {T,T2} = McAte4ConstantCache(T, T2)
158-
_symplectic_tableau(::CalvoSanz4, ::Type{T}, ::Type{T2}) where {T,T2} = CalvoSanz4ConstantCache(T, T2)
159-
_symplectic_tableau(::McAte42, ::Type{T}, ::Type{T2}) where {T,T2} = McAte42ConstantCache(T, T2)
160-
_symplectic_tableau(::McAte5, ::Type{T}, ::Type{T2}) where {T,T2}= McAte5ConstantCache(T, T2)
161-
_symplectic_tableau(::Yoshida6, ::Type{T}, ::Type{T2}) where {T,T2} = Yoshida6ConstantCache(T, T2)
162-
_symplectic_tableau(::KahanLi6, ::Type{T}, ::Type{T2}) where {T,T2} = KahanLi6ConstantCache(T, T2)
163-
_symplectic_tableau(::McAte8, ::Type{T}, ::Type{T2}) where {T,T2} = McAte8ConstantCache(T, T2)
164-
_symplectic_tableau(::KahanLi8, ::Type{T}, ::Type{T2}) where {T,T2} = KahanLi8ConstantCache(T, T2)
165-
_symplectic_tableau(::SofSpa10, ::Type{T}, ::Type{T2}) where {T,T2} = SofSpa10ConstantCache(T, T2)
153+
_symplectic_tableau(::McAte2, ::Type{T}, ::Type{T2}) where {T, T2} = McAte2ConstantCache(T, T2)
154+
_symplectic_tableau(::Ruth3, ::Type{T}, ::Type{T2}) where {T, T2} = Ruth3ConstantCache(T, T2)
155+
_symplectic_tableau(::McAte3, ::Type{T}, ::Type{T2}) where {T, T2} = McAte3ConstantCache(T, T2)
156+
_symplectic_tableau(::CandyRoz4, ::Type{T}, ::Type{T2}) where {T, T2} = CandyRoz4ConstantCache(T, T2)
157+
_symplectic_tableau(::McAte4, ::Type{T}, ::Type{T2}) where {T, T2} = McAte4ConstantCache(T, T2)
158+
_symplectic_tableau(::CalvoSanz4, ::Type{T}, ::Type{T2}) where {T, T2} = CalvoSanz4ConstantCache(T, T2)
159+
_symplectic_tableau(::McAte42, ::Type{T}, ::Type{T2}) where {T, T2} = McAte42ConstantCache(T, T2)
160+
_symplectic_tableau(::McAte5, ::Type{T}, ::Type{T2}) where {T, T2} = McAte5ConstantCache(T, T2)
161+
_symplectic_tableau(::Yoshida6, ::Type{T}, ::Type{T2}) where {T, T2} = Yoshida6ConstantCache(T, T2)
162+
_symplectic_tableau(::KahanLi6, ::Type{T}, ::Type{T2}) where {T, T2} = KahanLi6ConstantCache(T, T2)
163+
_symplectic_tableau(::McAte8, ::Type{T}, ::Type{T2}) where {T, T2} = McAte8ConstantCache(T, T2)
164+
_symplectic_tableau(::KahanLi8, ::Type{T}, ::Type{T2}) where {T, T2} = KahanLi8ConstantCache(T, T2)
165+
_symplectic_tableau(::SofSpa10, ::Type{T}, ::Type{T2}) where {T, T2} = SofSpa10ConstantCache(T, T2)
166166

167167
const SymplecticGenericAlgorithm = Union{
168168
PseudoVerletLeapfrog, McAte2, Ruth3, McAte3, CandyRoz4, McAte4,
169-
CalvoSanz4, McAte42, McAte5, Yoshida6, KahanLi6, McAte8, KahanLi8, SofSpa10
169+
CalvoSanz4, McAte42, McAte5, Yoshida6, KahanLi6, McAte8, KahanLi8, SofSpa10,
170170
}
171171

172172
function alg_cache(
@@ -179,7 +179,8 @@ function alg_cache(
179179
k = zero(rate_prototype)
180180
fsalfirst = zero(rate_prototype)
181181
tab = _symplectic_tableau(
182-
alg, constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits))
182+
alg, constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)
183+
)
183184
return SymplecticGenericCache(u, uprev, k, tmp, fsalfirst, tab)
184185
end
185186

@@ -190,7 +191,8 @@ function alg_cache(
190191
::Val{false}, verbose
191192
) where {uEltypeNoUnits, uBottomEltypeNoUnits, tTypeNoUnits}
192193
return _symplectic_tableau(
193-
alg, constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits))
194+
alg, constvalue(uBottomEltypeNoUnits), constvalue(tTypeNoUnits)
195+
)
194196
end
195197

196198
function get_fsalfirstlast(

lib/OrdinaryDiffEqSymplecticRK/src/symplectic_tableaus.jl

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,14 @@ function KahanLi8ConstantCache(T::Type{<:CompiledFloats}, T2::Type{<:CompiledFlo
345345
b17 = b2
346346
b18 = b1
347347
return SymplecticTableau(
348-
(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
349-
a14, a15, a16, a17, a18),
350-
(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13,
351-
b14, b15, b16, b17, b18)
348+
(
349+
a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
350+
a14, a15, a16, a17, a18,
351+
),
352+
(
353+
b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13,
354+
b14, b15, b16, b17, b18,
355+
)
352356
)
353357
end
354358

@@ -390,10 +394,14 @@ function KahanLi8ConstantCache(T::Type, T2::Type)
390394
b17 = b2
391395
b18 = b1
392396
return SymplecticTableau(
393-
(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
394-
a14, a15, a16, a17, a18),
395-
(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13,
396-
b14, b15, b16, b17, b18)
397+
(
398+
a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
399+
a14, a15, a16, a17, a18,
400+
),
401+
(
402+
b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13,
403+
b14, b15, b16, b17, b18,
404+
)
397405
)
398406
end
399407

@@ -471,14 +479,18 @@ function SofSpa10ConstantCache(T::Type{<:CompiledFloats}, T2::Type{<:CompiledFlo
471479
b35 = b2
472480
b36 = b1
473481
return SymplecticTableau(
474-
(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
482+
(
483+
a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
475484
a14, a15, a16, a17, a18,
476485
a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30,
477-
a31, a32, a33, a34, a35, a36),
478-
(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13,
486+
a31, a32, a33, a34, a35, a36,
487+
),
488+
(
489+
b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13,
479490
b14, b15, b16, b17, b18,
480491
b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30,
481-
b31, b32, b33, b34, b35, b36)
492+
b31, b32, b33, b34, b35, b36,
493+
)
482494
)
483495
end
484496

@@ -556,13 +568,17 @@ function SofSpa10ConstantCache(T::Type, T2::Type)
556568
b35 = b2
557569
b36 = b1
558570
return SymplecticTableau(
559-
(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
571+
(
572+
a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13,
560573
a14, a15, a16, a17, a18,
561574
a19, a20, a21, a22, a23, a24, a25, a26, a27, a28, a29, a30,
562-
a31, a32, a33, a34, a35, a36),
563-
(b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13,
575+
a31, a32, a33, a34, a35, a36,
576+
),
577+
(
578+
b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13,
564579
b14, b15, b16, b17, b18,
565580
b19, b20, b21, b22, b23, b24, b25, b26, b27, b28, b29, b30,
566-
b31, b32, b33, b34, b35, b36)
581+
b31, b32, b33, b34, b35, b36,
582+
)
567583
)
568584
end

0 commit comments

Comments
 (0)