From 2d3c057bb55824371a02469a2ea798957b9e8fd7 Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Tue, 24 Dec 2024 14:19:54 +0100 Subject: [PATCH 1/5] Format & Comment custom integrators --- src/time_integration/methods_2N.jl | 23 +++++++++++++++++------ src/time_integration/methods_3Sstar.jl | 8 ++++---- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/time_integration/methods_2N.jl b/src/time_integration/methods_2N.jl index fb2847e1c91..44b1beca7c0 100644 --- a/src/time_integration/methods_2N.jl +++ b/src/time_integration/methods_2N.jl @@ -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. """ @@ -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) @@ -42,9 +48,14 @@ struct CarpenterKennedy2N54 <: SimpleAlgorithm2N end """ - CarpenterKennedy2N43() + CarpenterKennedy2N43() +The following structures and methods provide a minimal implementation of +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} diff --git a/src/time_integration/methods_3Sstar.jl b/src/time_integration/methods_3Sstar.jl index f197ef60902..51501c6189e 100644 --- a/src/time_integration/methods_3Sstar.jl +++ b/src/time_integration/methods_3Sstar.jl @@ -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} @@ -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} From b2aaf75c2670dbcfaf221ef42cc4ff1908b6ac41 Mon Sep 17 00:00:00 2001 From: Daniel Doehring Date: Tue, 24 Dec 2024 17:33:50 +0100 Subject: [PATCH 2/5] Update src/time_integration/methods_2N.jl Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- src/time_integration/methods_2N.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/time_integration/methods_2N.jl b/src/time_integration/methods_2N.jl index 44b1beca7c0..a5bbfcfd112 100644 --- a/src/time_integration/methods_2N.jl +++ b/src/time_integration/methods_2N.jl @@ -48,7 +48,7 @@ struct CarpenterKennedy2N54 <: SimpleAlgorithm2N end """ - CarpenterKennedy2N43() + CarpenterKennedy2N43() The following structures and methods provide a minimal implementation of the low-storage explicit Runge-Kutta method of From f1f6fce04e4490f4d2fa70df770a079a1891eb82 Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Fri, 3 Jan 2025 10:29:47 +0100 Subject: [PATCH 3/5] Change CarpenterKennedy also in euler-gravity --- .../semidiscretization_euler_gravity.jl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/semidiscretization/semidiscretization_euler_gravity.jl b/src/semidiscretization/semidiscretization_euler_gravity.jl index 294cc69f471..721d89924c5 100644 --- a/src/semidiscretization/semidiscretization_euler_gravity.jl +++ b/src/semidiscretization/semidiscretization_euler_gravity.jl @@ -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) From 5aa96855dfb49bb218ba6637e94caa5e7c9cc4e1 Mon Sep 17 00:00:00 2001 From: Daniel_Doehring Date: Fri, 3 Jan 2025 10:30:10 +0100 Subject: [PATCH 4/5] fmt --- .../semidiscretization_euler_gravity.jl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/semidiscretization/semidiscretization_euler_gravity.jl b/src/semidiscretization/semidiscretization_euler_gravity.jl index 721d89924c5..88f388525d8 100644 --- a/src/semidiscretization/semidiscretization_euler_gravity.jl +++ b/src/semidiscretization/semidiscretization_euler_gravity.jl @@ -360,20 +360,20 @@ 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, + a = SVector(0.0, 567301805773.0 / 1357537059087.0, 2404267990393.0 / 2016746695238.0, - 3550918686646.0 / 2091501179385.0, + 3550918686646.0 / 2091501179385.0, 1275806237668.0 / 842570457699.0) - b = SVector(1432997174477.0 / 9575080441755.0, + b = SVector(1432997174477.0 / 9575080441755.0, 5161836677717.0 / 13612068292357.0, - 1720146321549.0 / 2090206949498.0, + 1720146321549.0 / 2090206949498.0, 3134564353537.0 / 4481467310338.0, 2277821191437.0 / 14882151754819.0) - c = SVector(0.0, + c = SVector(0.0, 1432997174477.0 / 9575080441755.0, 2526269341429.0 / 6820363962896.0, - 2006345519317.0 / 3224310063776.0, + 2006345519317.0 / 3224310063776.0, 2802321613138.0 / 2924317926251.0) timestep_gravity_2N!(cache, u_euler, tau, dtau, gravity_parameters, semi_gravity, From ee1013aaf49f62ba87492765b3d9db86cf97b65d Mon Sep 17 00:00:00 2001 From: Daniel Doehring Date: Wed, 8 Jan 2025 11:28:17 +0100 Subject: [PATCH 5/5] Update src/time_integration/methods_2N.jl Co-authored-by: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> --- src/time_integration/methods_2N.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/time_integration/methods_2N.jl b/src/time_integration/methods_2N.jl index a5bbfcfd112..71343b246fa 100644 --- a/src/time_integration/methods_2N.jl +++ b/src/time_integration/methods_2N.jl @@ -49,6 +49,7 @@ end """ CarpenterKennedy2N43() + The following structures and methods provide a minimal implementation of the low-storage explicit Runge-Kutta method of