Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format & Comment custom integrators #2218

Merged
18 changes: 12 additions & 6 deletions src/semidiscretization/semidiscretization_euler_gravity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,21 @@ end
function timestep_gravity_carpenter_kennedy_erk54_2N!(cache, u_euler, tau, dtau,
gravity_parameters, semi_gravity)
# Coefficients for Carpenter's 5-stage 4th-order low-storage Runge-Kutta method
a = SVector(0.0, 567301805773.0 / 1357537059087.0,
a = SVector(0.0,
567301805773.0 / 1357537059087.0,
2404267990393.0 / 2016746695238.0,
3550918686646.0 / 2091501179385.0, 1275806237668.0 / 842570457699.0)
b = SVector(1432997174477.0 / 9575080441755.0, 5161836677717.0 / 13612068292357.0,
1720146321549.0 / 2090206949498.0, 3134564353537.0 / 4481467310338.0,
3550918686646.0 / 2091501179385.0,
1275806237668.0 / 842570457699.0)
b = SVector(1432997174477.0 / 9575080441755.0,
5161836677717.0 / 13612068292357.0,
1720146321549.0 / 2090206949498.0,
3134564353537.0 / 4481467310338.0,
2277821191437.0 / 14882151754819.0)
c = SVector(0.0, 1432997174477.0 / 9575080441755.0,
c = SVector(0.0,
1432997174477.0 / 9575080441755.0,
2526269341429.0 / 6820363962896.0,
2006345519317.0 / 3224310063776.0, 2802321613138.0 / 2924317926251.0)
2006345519317.0 / 3224310063776.0,
2802321613138.0 / 2924317926251.0)

timestep_gravity_2N!(cache, u_euler, tau, dtau, gravity_parameters, semi_gravity,
a, b, c)
Expand Down
23 changes: 17 additions & 6 deletions src/time_integration/methods_2N.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ abstract type SimpleAlgorithm2N end
The following structures and methods provide a minimal implementation of
the low-storage explicit Runge-Kutta method of

Carpenter, Kennedy (1994) Fourth order 2N storage RK schemes, Solution 3
- Carpenter, Kennedy (1994)
Fourth-order 2N-storage Runge-Kutta schemes (Solution 3)
URL: https://ntrs.nasa.gov/citations/19940028444
File: https://ntrs.nasa.gov/api/citations/19940028444/downloads/19940028444.pdf

using the same interface as OrdinaryDiffEq.jl.
"""
Expand All @@ -24,15 +27,18 @@ struct CarpenterKennedy2N54 <: SimpleAlgorithm2N
c::SVector{5, Float64}

function CarpenterKennedy2N54()
a = SVector(0.0, 567301805773.0 / 1357537059087.0,
a = SVector(0.0,
567301805773.0 / 1357537059087.0,
2404267990393.0 / 2016746695238.0,
3550918686646.0 / 2091501179385.0, 1275806237668.0 / 842570457699.0)
3550918686646.0 / 2091501179385.0,
1275806237668.0 / 842570457699.0)
b = SVector(1432997174477.0 / 9575080441755.0,
5161836677717.0 / 13612068292357.0,
1720146321549.0 / 2090206949498.0,
3134564353537.0 / 4481467310338.0,
2277821191437.0 / 14882151754819.0)
c = SVector(0.0, 1432997174477.0 / 9575080441755.0,
c = SVector(0.0,
1432997174477.0 / 9575080441755.0,
2526269341429.0 / 6820363962896.0,
2006345519317.0 / 3224310063776.0,
2802321613138.0 / 2924317926251.0)
Expand All @@ -42,9 +48,14 @@ struct CarpenterKennedy2N54 <: SimpleAlgorithm2N
end

"""
CarpenterKennedy2N43()
CarpenterKennedy2N43()
The following structures and methods provide a minimal implementation of
DanielDoehring marked this conversation as resolved.
Show resolved Hide resolved
the low-storage explicit Runge-Kutta method of

Carpenter, Kennedy (1994) Third order 2N storage RK schemes with error control
- Carpenter, Kennedy (1994)
Third-order 2N-storage Runge-Kutta schemes with error control
URL: https://ntrs.nasa.gov/citations/19940028444
File: https://ntrs.nasa.gov/api/citations/19940028444/downloads/19940028444.pdf
"""
struct CarpenterKennedy2N43 <: SimpleAlgorithm2N
a::SVector{4, Float64}
Expand Down
8 changes: 4 additions & 4 deletions src/time_integration/methods_3Sstar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ end
"""
ParsaniKetchesonDeconinck3Sstar94()

Parsani, Ketcheson, Deconinck (2013)
- Parsani, Ketcheson, Deconinck (2013)
Optimized explicit RK schemes for the spectral difference method applied to wave propagation problems
[DOI: 10.1137/120885899](https://doi.org/10.1137/120885899)
[DOI: 10.1137/120885899](https://doi.org/10.1137/120885899)
"""
struct ParsaniKetchesonDeconinck3Sstar94 <: SimpleAlgorithm3Sstar
gamma1::SVector{9, Float64}
Expand Down Expand Up @@ -100,9 +100,9 @@ end
"""
ParsaniKetchesonDeconinck3Sstar32()

Parsani, Ketcheson, Deconinck (2013)
- Parsani, Ketcheson, Deconinck (2013)
Optimized explicit RK schemes for the spectral difference method applied to wave propagation problems
[DOI: 10.1137/120885899](https://doi.org/10.1137/120885899)
[DOI: 10.1137/120885899](https://doi.org/10.1137/120885899)
"""
struct ParsaniKetchesonDeconinck3Sstar32 <: SimpleAlgorithm3Sstar
gamma1::SVector{3, Float64}
Expand Down
Loading