MRKISS 2025-09-10
A tiny library with zero dependencies that aims to make it easy to use & experiment with explicit Runge-Kutta methods.
Loading...
Searching...
No Matches
mrkiss_eerk_verner_8_7.f90
Go to the documentation of this file.
1! -*- Mode:F90; Coding:us-ascii-unix; fill-column:129 -*-
2!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.H.S.!!
3!>
4!! @file mrkiss_eerk_verner_8_7.f90
5!! @author Mitch Richling http://www.mitchr.me/
6!! @brief Butcher tableau for Verner's 13 stage, Order (8,7) Runge-Kutta method.@EOL
7!! @keywords ode ivp differential equation initial value problem rk
8!! @std F2023
9!! @see https://github.com/richmit/MRKISS
10!! @copyright
11!! @parblock
12!! Copyright (c) 2025, Mitchell Jay Richling <http://www.mitchr.me/> All rights reserved.
13!!
14!! Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
15!! conditions are met:
16!!
17!! 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following
18!! disclaimer.
19!!
20!! 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following
21!! disclaimer in the documentation and/or other materials provided with the distribution.
22!!
23!! 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products
24!! derived from this software without specific prior written permission.
25!!
26!! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
27!! INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28!! DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29!! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
30!! USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31!! LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
32!! OF THE POSSIBILITY OF SUCH DAMAGE.
33!! @endparblock
34!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.H.E.!!
35
36!----------------------------------------------------------------------------------------------------------------------------------
37!> Butcher tableau for Verner's 13 stage, Order (8,7) Runge-Kutta method
38!!
39!! @image html eerk_verner_8_7-stab.png
40!!
41!! @par IMO
42!! This is my go-to O(8,7) method.
43!!
44!! @par Known Aliases
45!! 'ARKODE_VERNER_13_7_8' (SUNDIALS).
46!!
47!! @par Stability Image Links
48!! <a href="eerk_verner_8_7-stab.png"> <img src="eerk_verner_8_7-stab.png" width="256px"> </a>
49!! <a href="eerk_verner_8_7-astab.png"> <img src="eerk_verner_8_7-astab.png" width="256px"> </a>
50!! <a href="eerk_verner_8_7-star1.png"> <img src="eerk_verner_8_7-star1.png" width="256px"> </a>
51!! <a href="eerk_verner_8_7-star2.png"> <img src="eerk_verner_8_7-star2.png" width="256px"> </a>
52!!
53!! @par References:
54!! - Verner (2010); Numerically Optimal Runge-Kutta Pairs with Interpolants; Num. Alg. 53 (2-3); p383-396;
55!! - Verner (2007); A "more efficient" Runge--Kutta (8)7 Pair with Interpolants; https://www.sfu.ca/~jverner/;
56!! zotero://select/items/0_8SNJI34E
57!! - Retreived 2025-07-26: https://www.sfu.ca/~jverner/RKV87.IIa.Efficient.000000282866.081208.CoeffsOnlyRATandFLOAT
58!! - Retreived 2025-07-26: https://www.sfu.ca/~jverner/RKV87.IIa.Efficient.000000282866.081208.CoeffsOnlyFLOAT
59!!
61 use mrkiss_config, only: rk
62 implicit none
63 public
64 !> The order of the overall method
65 integer, parameter :: s = 13
66 !> Number of methods
67 integer, parameter :: m = 2
68 !> The @f$\mathbf{a}@f$ matrix for the Butcher Tableau. @hideinitializer @hideinlinesource
69 real(kind=rk), parameter :: a(s,s) = reshape([ 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
70 & 0.050000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
71 & -0.0069931640625000000000000000000000000000000000000000_rk, 0.11355566406250000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk,&
72 & 0.039960937500000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.11988281250000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
73 & 0.36139756280045751240529407211840283451294708507839_rk, 0.00000000000000000000000000000000000000000000000000_rk, -1.3415240667004927718199877882027158349171403754698_rk, 1.3701265039000352594146937160843130004041932903914_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
74 & 0.049047202797202797202797202797202797202797202797203_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.23509720422144047398629883354934271431216441399741_rk, 0.18085559298135672881090396365345448848503838320539_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
75 & 0.061692890442890442890442890442890442890442890442890_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.11236568314640276622625570351300154423032902326860_rk, -0.038850460714513667670490481081112445674563800836713_rk, 0.019791887125220458553791887125220458553791887125220_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
76 & -1.7676302402223268757355971195721455867137448823193_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, -62.500000000000000000000000000000000000000000000000_rk, -6.0618893773766691008213614596593319997575316724253_rk, 5.6508231982227631385612980306008401742012564072918_rk, 65.621696419376232837995660548630637412270020147453_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
77 & -1.1809450665549707998251162826282979578819606021203_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, -41.504734411143208416066415027019942258736177348632_rk, -4.4344383191037250112251692298461002117763027308956_rk, 4.2604081885861330248121937107446932407609270166154_rk, 43.753640224461715849876768294383793030038693965481_rk, 0.0078714254899123106874464750442263075508600692027392_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
78 & -1.2814059994414884054595102911820542462655484048152_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, -45.047139960139866302207542571360073222668098957428_rk, -4.7313620694495764773114642654912828109434507459753_rk, 4.5149670165938078411858515845972409962138188477408_rk, 47.449095571729851348690223922359290151143015786730_rk, 0.010592282971116611356873939555165428752284424172765_rk, -0.0057468422638446162544323184782862962320209504251086_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
79 & -1.7244701342624851917567098174844818617311990064751_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, -60.923490084830540165184346192537652460626186904389_rk, -5.9515183762223924552028327670618548682898682336907_rk, 5.5565237306984562359797916508435924968394178608848_rk, 63.983011980333053368375363786359959392813353577859_rk, 0.014642028250414961592759213917594526760030128234550_rk, 0.064604087723582036036218651449776507148923888512565_rk, -0.079303231690088789840244525486933732914471310936525_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
80 & -3.3016226677470790163539947897909836255691884563866_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, -118.01127235975250856669233039578988685099870482906_rk, -10.141422388456112486427839160345108975954866063487_rk, 9.1393113322320579235440122735568270006185726606496_rk, 123.37594282840426836848471809865018943635656979961_rk, 4.6232443788745804748398076250676309247918202935030_rk, -3.3832777380682019236525509715368112408139658311064_rk, 4.5275921003246181894512653393511290353248324497884_rk, -5.8284954858116229631930880191629857037550700235085_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
81 & -3.0395150337663090300401028518212002510563580545369_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, -109.26086808941762546864441923221646233519361120984_rk, -9.2906424974002934497176655426568975491582775356143_rk, 8.4305049817649111421342992538361678034540480990713_rk, 114.20100103783313135574240410955234274755401329634_rk, -0.96372713421454793581623756589879016527621892941651_rk, -5.0348840888021897911986803361833323231175585937600_rk, 5.9581308240029231775404021653881720727939629277604_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk], [s, s])
82 !> The @f$\mathbf{b}@f$ matrix for the Butcher Tableau. @hideinitializer @hideinlinesource
83 real(kind=rk), parameter :: b(s,m) = reshape([ 0.044279894190079510747167466680985188621108197725315_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.35410493917244487448155520287335683541210586730334_rk, 0.24796921549564378286676294153706630238840777658529_rk, -15.694202038838084050992070342711912134684313695686_rk, 25.084064965558562613439300312371862785176289957866_rk, -31.738367786260276468331561120072977399969574078578_rk, 22.938283273988783952314835603447970183129635755398_rk, -0.23613246330715421452599006412635176007365978061360_rk, 0.00000000000000000000000000000000000000000000000000_rk, &
84 & 0.044312615229089792124864365102090297648927184147770_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.35460956423432264478631793508950550388548724644570_rk, 0.24784804313666530696199867215044586600165004222383_rk, 4.4481347324757844927251283171596488713123063382973_rk, 19.846886366118733699309323992976879352913701314782_rk, -23.581623377465618419695179608703949650851101885469_rk, 0.00000000000000000000000000000000000000000000000000_rk, 0.00000000000000000000000000000000000000000000000000_rk, -0.36016794372897751621245367377462024091097024042747_rk], [s, m])
85 !> The @f$\mathbf{c}@f$ matrix for the Butcher Tableau. @hideinitializer @hideinlinesource
86 real(kind=rk), parameter :: c(s) = [ 0.00000000000000000000000000000000000000000000000000_rk, 0.05000000000000000000000000000000000000000000000000_rk, 0.10656250000000000000000000000000000000000000000000_rk, 0.15984375000000000000000000000000000000000000000000_rk, 0.39000000000000000000000000000000000000000000000000_rk, 0.46500000000000000000000000000000000000000000000000_rk, 0.15500000000000000000000000000000000000000000000000_rk, 0.94300000000000000000000000000000000000000000000000_rk, 0.90180204173585695825970794067837214995604036965132_rk, 0.90900000000000000000000000000000000000000000000000_rk, 0.94000000000000000000000000000000000000000000000000_rk, 1.00000000000000000000000000000000000000000000000000_rk, 1.00000000000000000000000000000000000000000000000000_rk]
87
88
89 !> The method orders
90 integer, parameter :: p(m) = [8, 7]
91 !> Number of stages for each method
92 integer, parameter :: se(m) = [12, 13]
Configuration for MRKISS == MR RK KISS == Mitch Richling's Runge-Kutta Keep It Simple Stupid.
integer, parameter, public rk
Real kind used across the library.
Butcher tableau for Verner's 13 stage, Order (8,7) Runge-Kutta method.
integer, parameter s
The order of the overall method.
real(kind=rk), dimension(s, s), parameter a
The matrix for the Butcher Tableau.
integer, dimension(m), parameter se
Number of stages for each method.
integer, parameter m
Number of methods.
real(kind=rk), dimension(s), parameter c
The matrix for the Butcher Tableau.
integer, dimension(m), parameter p
The method orders.
real(kind=rk), dimension(s, m), parameter b
The matrix for the Butcher Tableau.