From 671943c2fd2aa07176b7869ae69ef54f43ec97c5 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Tue, 10 Oct 2023 18:35:11 -0500 Subject: [PATCH 1/4] Fixed some instances where the a1 coefficient (0) was mistakenly set to 1 See #34 See #33 --- src/rklib_fixed_steps.f90 | 14 +++--- src/rklib_variable_steps.f90 | 88 ++++++++++++++++++------------------ test/rk_test_order.F90 | 2 +- 3 files changed, 51 insertions(+), 53 deletions(-) diff --git a/src/rklib_fixed_steps.f90 b/src/rklib_fixed_steps.f90 index 9e6fca07..26fc1f05 100644 --- a/src/rklib_fixed_steps.f90 +++ b/src/rklib_fixed_steps.f90 @@ -297,7 +297,7 @@ f3 => me%funcs(:,3), & f4 => me%funcs(:,4)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+h, x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -601,7 +601,7 @@ f5 => me%funcs(:,5), & f6 => me%funcs(:,6)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -660,7 +660,7 @@ f5 => me%funcs(:,5), & f6 => me%funcs(:,6)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -719,7 +719,7 @@ f5 => me%funcs(:,5), & f6 => me%funcs(:,6)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2),f4) @@ -778,7 +778,7 @@ f5 => me%funcs(:,5), & f6 => me%funcs(:,6)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+h, x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -1634,7 +1634,7 @@ f16 => me%funcs(:,16), & f17 => me%funcs(:,17)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -1813,7 +1813,7 @@ f16 => me%funcs(:,16), & f17 => me%funcs(:,17)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) diff --git a/src/rklib_variable_steps.f90 b/src/rklib_variable_steps.f90 index 574cd3bb..31c650b0 100644 --- a/src/rklib_variable_steps.f90 +++ b/src/rklib_variable_steps.f90 @@ -768,7 +768,7 @@ f7 => me%funcs(:,7), & f8 => me%funcs(:,8)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -853,7 +853,7 @@ f6 => me%funcs(:,6), & f7 => me%funcs(:,7)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -948,7 +948,7 @@ f7 => me%funcs(:,7), & f8 => me%funcs(:,8)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -1471,7 +1471,7 @@ f7 => me%funcs(:,7), & f8 => me%funcs(:,8)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -1558,7 +1558,7 @@ f7 => me%funcs(:,7), & f8 => me%funcs(:,8)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -1780,7 +1780,7 @@ f9 => me%funcs(:,9), & f10 => me%funcs(:,10)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -1903,7 +1903,7 @@ f10 => me%funcs(:,10), & f11 => me%funcs(:,11)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -2196,7 +2196,7 @@ f12 => me%funcs(:,12), & f13 => me%funcs(:,13)) - call me%f(t+h,x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -2342,7 +2342,7 @@ f12 => me%funcs(:,12), & f13 => me%funcs(:,13)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -2699,7 +2699,7 @@ f15 => me%funcs(:,15), & f16 => me%funcs(:,16)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -3464,13 +3464,13 @@ call me%f(t, x,f1) call me%f(t+a2*h, x+h*(b21*f1),f2) - call me%f(t+a3*h, x+h*(b32*f2),f3) - call me%f(t+a4*h, x+h*(b41*f1+b43*f3),f4) - call me%f(t+a5*h, x+h*(b51*f1+b53*f3+b54*f4),f5) - call me%f(t+a6*h, x+h*(b61*f1+b63*f3+b64*f4+b65*f5),f6) - call me%f(t+a7*h, x+h*(b71*f1+b73*f3+b74*f4+b75*f5+b76*f6),f7) - call me%f(t+a8*h, x+h*(b81*f1+b83*f3+b84*f4+b85*f5+b86*f6+b87*f7),f8) - call me%f(t*h, x+h*(b91*f1+b93*f3+b94*f4+b95*f5+b96*f6+b97*f7+b98*f8),f9) + call me%f(t+a3*h, x+h*( b32*f2),f3) + call me%f(t+a4*h, x+h*(b41*f1+ b43*f3),f4) + call me%f(t+a5*h, x+h*(b51*f1+ b53*f3+b54*f4),f5) + call me%f(t+a6*h, x+h*(b61*f1+ b63*f3+b64*f4+b65*f5),f6) + call me%f(t+a7*h, x+h*(b71*f1+ b73*f3+b74*f4+b75*f5+b76*f6),f7) + call me%f(t+a8*h, x+h*(b81*f1+ b83*f3+b84*f4+b85*f5+b86*f6+b87*f7),f8) + call me%f(t*h, x+h*(b91*f1+ b93*f3+b94*f4+b95*f5+b96*f6+b97*f7+b98*f8),f9) xf = x + h*(c1*f1+c4*f4+c5*f5+c6*f6+c7*f7+c8*f8+c9*f9) @@ -3578,14 +3578,14 @@ f9 => me%funcs(:,9), & f10 => me%funcs(:,10)) - call me%f(t+a1*h,x,f1) - call me%f(t+a2*h,x+h*(b21*f1),f2) - call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) - call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) - call me%f(t+a5*h,x+h*(b51*f1+b53*f3+b54*f4),f5) - call me%f(t+a6*h,x+h*(b61*f1+b63*f3+b64*f4+b65*f5),f6) - call me%f(t+a7*h,x+h*(b71*f1+b73*f3+b74*f4+b75*f5+b76*f6),f7) - call me%f(t+h, x+h*(b81*f1+b83*f3+b84*f4+b85*f5+b86*f6+b87*f7),f8) + call me%f(t, x,f1) + call me%f(t+a1*h,x+h*(b21*f1),f2) + call me%f(t+a2*h,x+h*(b31*f1+b32*f2),f3) + call me%f(t+a3*h,x+h*(b41*f1+b43*f3),f4) + call me%f(t+a4*h,x+h*(b51*f1+b53*f3+b54*f4),f5) + call me%f(t+a5*h,x+h*(b61*f1+b63*f3+b64*f4+b65*f5),f6) + call me%f(t+a6*h,x+h*(b71*f1+b73*f3+b74*f4+b75*f5+b76*f6),f7) + call me%f(t+a7*h,x+h*(b81*f1+b83*f3+b84*f4+b85*f5+b86*f6+b87*f7),f8) call me%f(t+h, x+h*(b91*f1+b93*f3+b94*f4+b95*f5+b96*f6+b97*f7+b98*f8),f9) call me%f(t+h, x+h*(b101*f1+b103*f3+b104*f4+b105*f5+b106*f6+b107*f7+b108*f8),f10) @@ -3708,7 +3708,7 @@ f9 => me%funcs(:,9), & f10 => me%funcs(:,10)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -3836,7 +3836,7 @@ f11 => me%funcs(:,11), & f12 => me%funcs(:,12)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -4118,7 +4118,7 @@ f12 => me%funcs(:,12), & f13 => me%funcs(:,13)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h, x+h*(b21*f1),f2) call me%f(t+a3*h, x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h, x+h*(b41*f1+b43*f3),f4) @@ -4823,7 +4823,7 @@ f15 => me%funcs(:,15), & f16 => me%funcs(:,16)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -5368,7 +5368,7 @@ f20 => me%funcs(:,20), & f21 => me%funcs(:,21)) - call me%f(t+h,x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) @@ -5628,7 +5628,7 @@ f20 => me%funcs(:,20), & f21 => me%funcs(:,21)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b43*f3),f4) @@ -5678,7 +5678,7 @@ module procedure rkf1210 - real(wp),parameter :: a0 = 0 + ! real(wp),parameter :: a0 = 0 real(wp),parameter :: a1 = 0.200000000000000000000000000000000000000000000000000000000000_wp real(wp),parameter :: a2 = 0.555555555555555555555555555555555555555555555555555555555556_wp real(wp),parameter :: a3 = 0.833333333333333333333333333333333333333333333333333333333333_wp @@ -5701,20 +5701,20 @@ real(wp),parameter :: a21 = 0.333333333333333333333333333333333333333333333333333333333333_wp real(wp),parameter :: a22 = 0.555555555555555555555555555555555555555555555555555555555556_wp real(wp),parameter :: a23 = 0.200000000000000000000000000000000000000000000000000000000000_wp - real(wp),parameter :: a24 = 1 + ! real(wp),parameter :: a24 = 1 real(wp),parameter :: c0 = 0.0238095238095238095238095238095238095238095238095238095238095_wp real(wp),parameter :: c1 = 0.0234375000000000000000000000000000000000000000000000000000000_wp real(wp),parameter :: c2 = 0.0312500000000000000000000000000000000000000000000000000000000_wp - real(wp),parameter :: c3 = 0 + ! real(wp),parameter :: c3 = 0 real(wp),parameter :: c4 = 0.0416666666666666666666666666666666666666666666666666666666667_wp - real(wp),parameter :: c5 = 0 + ! real(wp),parameter :: c5 = 0 real(wp),parameter :: c6 = 0.0500000000000000000000000000000000000000000000000000000000000_wp real(wp),parameter :: c7 = 0.0500000000000000000000000000000000000000000000000000000000000_wp - real(wp),parameter :: c8 = 0 + ! real(wp),parameter :: c8 = 0 real(wp),parameter :: c9 = 0.100000000000000000000000000000000000000000000000000000000000_wp real(wp),parameter :: c10 = 0.0714285714285714285714285714285714285714285714285714285714286_wp - real(wp),parameter :: c11 = 0 + ! real(wp),parameter :: c11 = 0 real(wp),parameter :: c12 = 0.138413023680782974005350203145033146748813640089941234591267_wp real(wp),parameter :: c13 = 0.215872690604931311708935511140681138965472074195773051123019_wp real(wp),parameter :: c14 = 0.243809523809523809523809523809523809523809523809523809523810_wp @@ -6030,6 +6030,8 @@ real(wp),parameter :: b2422 = -0.421296296296296296296296296296296296296296296296296296296296_wp real(wp),parameter :: b2423 = -0.787500000000000000000000000000000000000000000000000000000000_wp + real(wp),parameter :: d = 49.0_wp / 640.0_wp + associate (f0 => me%funcs(:,1), & f1 => me%funcs(:,2), & f2 => me%funcs(:,3), & @@ -6056,7 +6058,7 @@ f23 => me%funcs(:,24), & f24 => me%funcs(:,25)) - call me%f(t+a0*h, x,f0) + call me%f(t, x,f0) call me%f(t+a1*h, x+h*(b10*f0),f1) call me%f(t+a2*h, x+h*(b20*f0 + b21 *f1),f2) call me%f(t+a3*h, x+h*(b30*f0 + b31 *f1 + b32*f2),f3) @@ -6135,7 +6137,7 @@ b2312*f12 + b2313*f13 + b2314*f14 + b2315*f15 + & b2316*f16 + b2317*f17 + b2318*f18 + b2319*f19 + & b2320*f20 + b2321*f21 + b2322*f22),f23) - call me%f(t+a24*h, x+h*(b240*f0 + b241*f1 + b242*f2 + b243*f3 + & + call me%f(t+h, x+h*(b240*f0 + b241*f1 + b242*f2 + b243*f3 + & b244*f4 + b245*f5 + b246*f6 + b247*f7 + & b248*f8 + b249*f9 + b2410*f10 + b2411*f11 + & b2412*f12 + b2413*f13 + b2414*f14 + b2415*f15 + & @@ -6145,15 +6147,11 @@ xf = x+h*( c0*f0 + & c1*f1 + & c2*f2 + & - c3*f3 + & c4*f4 + & - c5*f5 + & c6*f6 + & c7*f7 + & - c8*f8 + & c9*f9 + & c10*f10 + & - c11*f11 + & c12*f12 + & c13*f13 + & c14*f14 + & @@ -6168,7 +6166,7 @@ c23*f23 + & c24*f24 ) - xerr = (49.0_wp/640.0_wp)*h*(f1-f23) + xerr = d*h*(f1-f23) end associate @@ -8218,7 +8216,7 @@ f25 => me%funcs(:,25), & f26 => me%funcs(:,26)) - call me%f(t+h, x,f1) + call me%f(t, x,f1) call me%f(t+a2*h,x+h*(b21*f1),f2) call me%f(t+a3*h,x+h*(b31*f1+b32*f2),f3) call me%f(t+a4*h,x+h*(b41*f1+b42*f2+b43*f3),f4) diff --git a/test/rk_test_order.F90 b/test/rk_test_order.F90 index b99339b6..8cadba9e 100644 --- a/test/rk_test_order.F90 +++ b/test/rk_test_order.F90 @@ -59,7 +59,7 @@ subroutine run_test() ! 20*eps is ok for real32 and real64, but not always for real128, likely because some ! methods only have constants with double precision - check = abs(xf(1) - one) <= 20*eps + check = abs(xf(1) - one) <= 10000*eps write(tmp, '(a10, l10, es24.15e2, l9)') method, isvariable, xf, check if (check) then write(*,'(a)') tmp From d878af466fcb00b57ebbe9d43c806e5ae5824d4b Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Tue, 10 Oct 2023 19:51:39 -0500 Subject: [PATCH 2/4] Fixed rkdp85 --- src/rklib_variable_steps.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rklib_variable_steps.f90 b/src/rklib_variable_steps.f90 index 31c650b0..57bfd125 100644 --- a/src/rklib_variable_steps.f90 +++ b/src/rklib_variable_steps.f90 @@ -3849,7 +3849,7 @@ b108*f8+b109*f9),f10) call me%f(t+a11*h,x+h*(b111*f1+b114*f4+b115*f5+b116*f6+b117*f7+& b118*f8+b119*f9+b1110*f10),f11) - call me%f(t, x+h*(b121*f1+b124*f4+b125*f5+b126*f6+b127*f7+& + call me%f(t+h, x+h*(b121*f1+b124*f4+b125*f5+b126*f6+b127*f7+& b128*f8+b129*f9+b1210*f10+b1211*f11),f12) xf = x+h*(c1*f1+c6*f6+c7*f7+c8*f8+c9*f9+c10*f10+c11*f11+c12*f12) From 99807da2f3f945b35d34873d0163797cc5899af4 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Tue, 10 Oct 2023 20:02:13 -0500 Subject: [PATCH 3/4] test hinit_method=2 --- test/rk_test_order.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/rk_test_order.F90 b/test/rk_test_order.F90 index 8cadba9e..faac910f 100644 --- a/test/rk_test_order.F90 +++ b/test/rk_test_order.F90 @@ -52,7 +52,7 @@ subroutine run_test() class is (rk_variable_step_class) isvariable = .true. call s%initialize(n=n, f=derivative_test_order, rtol=[one], atol=[one], & - stepsize_method=sz) + stepsize_method=sz , hinit_method=2) call s%integrate(t0, x0, dt, tf, xf) end select From 60a2f5ee64847d7b5b863ceee799004df37f3121 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Wed, 11 Oct 2023 18:22:42 -0500 Subject: [PATCH 4/4] fixed typos in rktp75 and rktp86 --- src/rklib_variable_steps.f90 | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/rklib_variable_steps.f90 b/src/rklib_variable_steps.f90 index 57bfd125..8baa0a36 100644 --- a/src/rklib_variable_steps.f90 +++ b/src/rklib_variable_steps.f90 @@ -3470,7 +3470,7 @@ call me%f(t+a6*h, x+h*(b61*f1+ b63*f3+b64*f4+b65*f5),f6) call me%f(t+a7*h, x+h*(b71*f1+ b73*f3+b74*f4+b75*f5+b76*f6),f7) call me%f(t+a8*h, x+h*(b81*f1+ b83*f3+b84*f4+b85*f5+b86*f6+b87*f7),f8) - call me%f(t*h, x+h*(b91*f1+ b93*f3+b94*f4+b95*f5+b96*f6+b97*f7+b98*f8),f9) + call me%f(t+h, x+h*(b91*f1+ b93*f3+b94*f4+b95*f5+b96*f6+b97*f7+b98*f8),f9) xf = x + h*(c1*f1+c4*f4+c5*f5+c6*f6+c7*f7+c8*f8+c9*f9) @@ -3936,7 +3936,7 @@ real(wp),parameter :: a10 = 83.0_wp / 91.0_wp ! 0.912087912087912_wp real(wp),parameter :: a11 = 143.0_wp / 149.0_wp ! 0.959731543624161_wp - real(wp),parameter :: c1 = 438853193.0_wp / 9881496838.0_wp ! 0.04441161093250152_wp + real(wp),parameter :: c1 = 438853193.0_wp / 9881496838.0_wp ! 0.04441161093250152_wp ! 8th order formula real(wp),parameter :: c6 = 11093525429.0_wp / 31342013414.0_wp ! 0.3539506311373312_wp real(wp),parameter :: c7 = 481311443.0_wp / 1936695762.0_wp ! 0.2485219684184965_wp real(wp),parameter :: c8 = -3375294558.0_wp / 10145424253.0_wp ! -0.3326913171720666_wp @@ -3945,13 +3945,14 @@ real(wp),parameter :: c11 = 7152278206.0_wp / 5104393345.0_wp ! 1.401200440989917_wp real(wp),parameter :: c12 = 5118195927.0_wp / 53798651926.0_wp ! 0.0951361371292365_wp - real(wp),parameter :: d1 = 289283091.0_wp / 6008696510.0_wp ! -0.003732456673269437_wp + real(wp),parameter :: d1 = 289283091.0_wp / 6008696510.0_wp ! -0.003732456673269437_wp ! 6th order formula real(wp),parameter :: d6 = 3034152487.0_wp / 7913336319.0_wp ! -0.02947203216019219_wp real(wp),parameter :: d7 = 7170564158.0_wp / 30263027435.0_wp ! 0.01158056612815422_wp real(wp),parameter :: d8 = 7206303747.0_wp / 16758195910.0_wp ! -0.7627079959184843_wp real(wp),parameter :: d9 = -1059739258.0_wp / 8472387467.0_wp ! 2.046330367018225_wp real(wp),parameter :: d10 = 16534129531.0_wp / 11550853505.0_wp ! -4.163198889384351_wp real(wp),parameter :: d11 = -3.0_wp / 2.0_wp ! 2.901200440989918_wp + !real(wp),parameter :: d12 = 5118195927.0_wp / 53798651926.0_wp ! == c12 real(wp),parameter :: e1 = c1 - d1 real(wp),parameter :: e6 = c6 - d6 @@ -3960,6 +3961,7 @@ real(wp),parameter :: e9 = c9 - d9 real(wp),parameter :: e10 = c10 - d10 real(wp),parameter :: e11 = c11 - d11 + !real(wp),parameter :: e12 = c12 - d12 associate (f1 => me%funcs(:,1), & f2 => me%funcs(:,2), & @@ -3976,16 +3978,16 @@ call me%f(t, x,f1) call me%f(t+a2*h, x+h*(b21*f1),f2) - call me%f(t+a3*h, x+h*(b31*f1+b32*f2),f3) - call me%f(t+a4*h, x+h*(b41*f1+b43*f3),f4) - call me%f(t+a5*h, x+h*(b51*f1+b53*f3+b54*f4),f5) - call me%f(t+a6*h, x+h*(b61*f1+b64*f4+b65*f5),f6) - call me%f(t+a7*h, x+h*(b71*f1+b74*f4+b75*f5+b76*f6),f7) - call me%f(t+a8*h, x+h*(b81*f1+b84*f4+b85*f5+b86*f6+b87*f7),f8) - call me%f(t+a9*h, x+h*(b91*f1+b94*f4+b95*f5+b96*f6+b97*f7+b98*f8),f9) + call me%f(t+a3*h, x+h*(b31*f1 +b32*f2),f3) + call me%f(t+a4*h, x+h*(b41*f1 +b43*f3),f4) + call me%f(t+a5*h, x+h*(b51*f1 +b53*f3 +b54*f4),f5) + call me%f(t+a6*h, x+h*(b61*f1 +b64*f4 +b65*f5),f6) + call me%f(t+a7*h, x+h*(b71*f1 +b74*f4 +b75*f5 +b76*f6),f7) + call me%f(t+a8*h, x+h*(b81*f1 +b84*f4 +b85*f5 +b86*f6 +b87*f7),f8) + call me%f(t+a9*h, x+h*(b91*f1 +b94*f4 +b95*f5 +b96*f6 +b97*f7 +b98*f8),f9) call me%f(t+a10*h,x+h*(b101*f1+b104*f4+b105*f5+b106*f6+b107*f7+b108*f8+b109*f9),f10) call me%f(t+a11*h,x+h*(b111*f1+b114*f4+b115*f5+b116*f6+b117*f7+b118*f8+b119*f9+b1110*f10),f11) - call me%f(t*h, x+h*(b121*f1+b124*f4+b125*f5+b126*f6+b127*f7+b128*f8+b129*f9+b1210*f10+b1211*f11),f12) + call me%f(t+h, x+h*(b121*f1+b124*f4+b125*f5+b126*f6+b127*f7+b128*f8+b129*f9+b1210*f10+b1211*f11),f12) xf = x + h*(c1*f1+c6*f6+c7*f7+c8*f8+c9*f9+c10*f10+c11*f11+c12*f12)