Skip to content

Commit 679e4c7

Browse files
Format & Comment custom integrators (trixi-framework#2218)
* Format & Comment custom integrators * Update src/time_integration/methods_2N.jl Co-authored-by: Joshua Lampert <[email protected]> --------- Co-authored-by: Joshua Lampert <[email protected]>
1 parent a1be62b commit 679e4c7

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed

src/semidiscretization/semidiscretization_euler_gravity.jl

+12-6
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,21 @@ end
360360
function timestep_gravity_carpenter_kennedy_erk54_2N!(cache, u_euler, tau, dtau,
361361
gravity_parameters, semi_gravity)
362362
# Coefficients for Carpenter's 5-stage 4th-order low-storage Runge-Kutta method
363-
a = SVector(0.0, 567301805773.0 / 1357537059087.0,
363+
a = SVector(0.0,
364+
567301805773.0 / 1357537059087.0,
364365
2404267990393.0 / 2016746695238.0,
365-
3550918686646.0 / 2091501179385.0, 1275806237668.0 / 842570457699.0)
366-
b = SVector(1432997174477.0 / 9575080441755.0, 5161836677717.0 / 13612068292357.0,
367-
1720146321549.0 / 2090206949498.0, 3134564353537.0 / 4481467310338.0,
366+
3550918686646.0 / 2091501179385.0,
367+
1275806237668.0 / 842570457699.0)
368+
b = SVector(1432997174477.0 / 9575080441755.0,
369+
5161836677717.0 / 13612068292357.0,
370+
1720146321549.0 / 2090206949498.0,
371+
3134564353537.0 / 4481467310338.0,
368372
2277821191437.0 / 14882151754819.0)
369-
c = SVector(0.0, 1432997174477.0 / 9575080441755.0,
373+
c = SVector(0.0,
374+
1432997174477.0 / 9575080441755.0,
370375
2526269341429.0 / 6820363962896.0,
371-
2006345519317.0 / 3224310063776.0, 2802321613138.0 / 2924317926251.0)
376+
2006345519317.0 / 3224310063776.0,
377+
2802321613138.0 / 2924317926251.0)
372378

373379
timestep_gravity_2N!(cache, u_euler, tau, dtau, gravity_parameters, semi_gravity,
374380
a, b, c)

src/time_integration/methods_2N.jl

+18-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ abstract type SimpleAlgorithm2N end
1414
The following structures and methods provide a minimal implementation of
1515
the low-storage explicit Runge-Kutta method of
1616
17-
Carpenter, Kennedy (1994) Fourth order 2N storage RK schemes, Solution 3
17+
- Carpenter, Kennedy (1994)
18+
Fourth-order 2N-storage Runge-Kutta schemes (Solution 3)
19+
URL: https://ntrs.nasa.gov/citations/19940028444
20+
File: https://ntrs.nasa.gov/api/citations/19940028444/downloads/19940028444.pdf
1821
1922
using the same interface as OrdinaryDiffEq.jl.
2023
"""
@@ -24,15 +27,18 @@ struct CarpenterKennedy2N54 <: SimpleAlgorithm2N
2427
c::SVector{5, Float64}
2528

2629
function CarpenterKennedy2N54()
27-
a = SVector(0.0, 567301805773.0 / 1357537059087.0,
30+
a = SVector(0.0,
31+
567301805773.0 / 1357537059087.0,
2832
2404267990393.0 / 2016746695238.0,
29-
3550918686646.0 / 2091501179385.0, 1275806237668.0 / 842570457699.0)
33+
3550918686646.0 / 2091501179385.0,
34+
1275806237668.0 / 842570457699.0)
3035
b = SVector(1432997174477.0 / 9575080441755.0,
3136
5161836677717.0 / 13612068292357.0,
3237
1720146321549.0 / 2090206949498.0,
3338
3134564353537.0 / 4481467310338.0,
3439
2277821191437.0 / 14882151754819.0)
35-
c = SVector(0.0, 1432997174477.0 / 9575080441755.0,
40+
c = SVector(0.0,
41+
1432997174477.0 / 9575080441755.0,
3642
2526269341429.0 / 6820363962896.0,
3743
2006345519317.0 / 3224310063776.0,
3844
2802321613138.0 / 2924317926251.0)
@@ -42,9 +48,15 @@ struct CarpenterKennedy2N54 <: SimpleAlgorithm2N
4248
end
4349

4450
"""
45-
CarpenterKennedy2N43()
51+
CarpenterKennedy2N43()
4652
47-
Carpenter, Kennedy (1994) Third order 2N storage RK schemes with error control
53+
The following structures and methods provide a minimal implementation of
54+
the low-storage explicit Runge-Kutta method of
55+
56+
- Carpenter, Kennedy (1994)
57+
Third-order 2N-storage Runge-Kutta schemes with error control
58+
URL: https://ntrs.nasa.gov/citations/19940028444
59+
File: https://ntrs.nasa.gov/api/citations/19940028444/downloads/19940028444.pdf
4860
"""
4961
struct CarpenterKennedy2N43 <: SimpleAlgorithm2N
5062
a::SVector{4, Float64}

src/time_integration/methods_3Sstar.jl

+4-4
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ end
4949
"""
5050
ParsaniKetchesonDeconinck3Sstar94()
5151
52-
Parsani, Ketcheson, Deconinck (2013)
52+
- Parsani, Ketcheson, Deconinck (2013)
5353
Optimized explicit RK schemes for the spectral difference method applied to wave propagation problems
54-
[DOI: 10.1137/120885899](https://doi.org/10.1137/120885899)
54+
[DOI: 10.1137/120885899](https://doi.org/10.1137/120885899)
5555
"""
5656
struct ParsaniKetchesonDeconinck3Sstar94 <: SimpleAlgorithm3Sstar
5757
gamma1::SVector{9, Float64}
@@ -100,9 +100,9 @@ end
100100
"""
101101
ParsaniKetchesonDeconinck3Sstar32()
102102
103-
Parsani, Ketcheson, Deconinck (2013)
103+
- Parsani, Ketcheson, Deconinck (2013)
104104
Optimized explicit RK schemes for the spectral difference method applied to wave propagation problems
105-
[DOI: 10.1137/120885899](https://doi.org/10.1137/120885899)
105+
[DOI: 10.1137/120885899](https://doi.org/10.1137/120885899)
106106
"""
107107
struct ParsaniKetchesonDeconinck3Sstar32 <: SimpleAlgorithm3Sstar
108108
gamma1::SVector{3, Float64}

0 commit comments

Comments
 (0)