+
Skip to content

added rks10 #41

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

Merged
merged 3 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
gcc_v: [10] # Version of GFortran we want to use.
python-version: [3.9]
gcc_v: [14] # Version of GFortran we want to use.
python-version: [3.12]
env:
FC: gfortran-${{ matrix.gcc_v }}
GCC_V: ${{ matrix.gcc_v }}
Expand All @@ -31,7 +31,7 @@ jobs:
uses: ts-graphviz/setup-graphviz@v1

- name: Setup Fortran Package Manager
uses: fortran-lang/setup-fpm@v5
uses: fortran-lang/setup-fpm@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ The focus of this library is single-step, explicit Runge-Kutta solvers for 1st o

### Available Runge-Kutta methods:

* Number of fixed-step methods: 27
* Number of fixed-step methods: 28
* Number of variable-step methods: 48
* Total number of methods: 75
* Total number of methods: 76

### Fixed-step methods:

Expand Down Expand Up @@ -56,6 +56,7 @@ Name | Description| Properties | Order | Stages | Registers | CFL | Ref
`rk8_10` | 10-stage, 8th order Runge-Kutta Shanks | | 8 | 10 | 10 | | [Shanks (1965)](http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19650022581.pdf)
`rkcv8` | 11-stage, 8th order Runge-Kutta Cooper-Verner | | 8 | 11 | 11 | | [Cooper & Verner (1972)](https://epubs.siam.org/doi/abs/10.1137/0709037)
`rk8_12` | 12-stage, 8th order Runge-Kutta Shanks | | 8 | 12 | 12 | | [Shanks (1965)](http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19650022581.pdf)
`rks10` | 10th order Runge-Kutta Stepanov | | 10 | 15 | 15 | | [Stepanov (2025)](https://arxiv.org/abs/2504.17329)
`rkz10` | 10th order Runge-Kutta Zhang | | 10 | 16 | 16 | | [Zhang (2019)](https://arxiv.org/abs/1911.00318)
`rko10` | 10th order Runge-Kutta Ono | | 10 | 17 | 17 | | [Ono (2003)](http://www.peterstone.name/Maplepgs/Maple/nmthds/RKcoeff/Runge_Kutta_schemes/RK10/RKcoeff10f_1.pdf)
`rkh10` | 10th order Runge-Kutta Hairer | | 10 | 17 | 17 | | [Hairer (1978)](https://www.researchgate.net/publication/31221486_A_Runge-Kutta_Method_of_Order_10)
Expand Down Expand Up @@ -182,7 +183,9 @@ xf = -0.1360372426E+01 0.1325538438E+01

### Example performance comparison

Running the unit tests will generate some performance plots. The following is for the variable-step methods compiled with quadruple precision (e.g, `fpm test rk_test_variable_step --compiler ifort --flag "-DREAL128"`): [rk_test_variable_step_R16.pdf](media/rk_test_variable_step_R16.pdf)
Running the unit tests will generate some performance plots. The following is for the variable-step methods compiled with quadruple precision (e.g, `fpm test rk_test_variable_step --compiler ifort --flag "-DREAL128"`):

![rk_test_variable_step_R16](media/rk_test_variable_step_R16.pdf)

### Compiling

Expand Down
5 changes: 2 additions & 3 deletions scripts/generate_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
('rk8_10' , '10-stage, 8th order Runge-Kutta Shanks' , ' ', 8 , 10 , 10 , None , '[Shanks (1965)](http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19650022581.pdf)'),
('rkcv8' , '11-stage, 8th order Runge-Kutta Cooper-Verner' , ' ', 8 , 11 , 11 , None , '[Cooper & Verner (1972)](https://epubs.siam.org/doi/abs/10.1137/0709037)'),
('rk8_12' , '12-stage, 8th order Runge-Kutta Shanks' , ' ', 8 , 12 , 12 , None , '[Shanks (1965)](http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19650022581.pdf)'),
('rks10' , '10th order Runge-Kutta Stepanov' , ' ', 10 , 15 , 15 , None , '[Stepanov (2025)](https://arxiv.org/abs/2504.17329)'),
('rkz10' , '10th order Runge-Kutta Zhang' , ' ', 10 , 16 , 16 , None , '[Zhang (2019)](https://arxiv.org/abs/1911.00318)'),
('rko10' , '10th order Runge-Kutta Ono' , ' ', 10 , 17 , 17 , None , '[Ono (2003)](http://www.peterstone.name/Maplepgs/Maple/nmthds/RKcoeff/Runge_Kutta_schemes/RK10/RKcoeff10f_1.pdf)'),
('rkh10' , '10th order Runge-Kutta Hairer' , ' ', 10 , 17 , 17 , None , '[Hairer (1978)](https://www.researchgate.net/publication/31221486_A_Runge-Kutta_Method_of_Order_10)')]
Expand Down Expand Up @@ -105,8 +106,6 @@ def readme_template():

### Description

**This is a work in progress!**

The focus of this library is single-step, explicit Runge-Kutta solvers for 1st order differential equations.

### Novel features:
Expand Down Expand Up @@ -153,7 +152,7 @@ def readme_template():

Running the unit tests will generate some performance plots. The following is for the variable-step methods compiled with quadruple precision (e.g, `fpm test rk_test_variable_step --compiler ifort --flag "-DREAL128"`):

![rk_test_variable_step_R16](media/rk_test_variable_step_R16.png)
![rk_test_variable_step_R16](media/rk_test_variable_step_R16.pdf)

### Compiling

Expand Down
7 changes: 7 additions & 0 deletions src/rklib_fixed_classes.inc
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@
procedure :: properties => rk8_12_properties
end type rk8_12_class

type,extends(rk_fixed_step_class),public :: rks10_class
!! 10th order Runge-Kutta Stepanov
contains
procedure :: step => rks10
procedure :: properties => rks10_properties
end type rks10_class

type,extends(rk_fixed_step_class),public :: rkz10_class
!! 10th order Runge-Kutta Zhang
contains
Expand Down
9 changes: 9 additions & 0 deletions src/rklib_fixed_properties.f90
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,15 @@
p%number_of_registers = 12
end procedure rk8_12_properties

module procedure rks10_properties
!! Returns the properties of the [[rks10]] method
p%short_name = 'rks10'
p%long_name = '10th order Runge-Kutta Stepanov'
p%order = 10
p%number_of_stages = 15
p%number_of_registers = 15
end procedure rks10_properties

module procedure rkz10_properties
!! Returns the properties of the [[rkz10]] method
p%short_name = 'rkz10'
Expand Down
6 changes: 6 additions & 0 deletions src/rklib_fixed_property_interfaces.inc
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ pure module function rk8_12_properties(me) result(p)
type(rklib_properties) :: p !! properties of the method
end function rk8_12_properties

pure module function rks10_properties(me) result(p)
implicit none
class(rks10_class),intent(in) :: me
type(rklib_properties) :: p !! properties of the method
end function rks10_properties

pure module function rkz10_properties(me) result(p)
implicit none
class(rkz10_class),intent(in) :: me
Expand Down
9 changes: 9 additions & 0 deletions src/rklib_fixed_step_interfaces.inc
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@
real(wp),dimension(me%n),intent(out) :: xf !! state at time `t+h`
end subroutine rk8_12

module subroutine rks10(me,t,x,h,xf)
implicit none
class(rks10_class),intent(inout) :: me
real(wp),intent(in) :: t !! initial time
real(wp),dimension(me%n),intent(in) :: x !! initial state
real(wp),intent(in) :: h !! time step
real(wp),dimension(me%n),intent(out) :: xf !! state at time `t+h`
end subroutine rks10

module subroutine rkz10(me,t,x,h,xf)
implicit none
class(rkz10_class),intent(inout) :: me
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载