nyx_space/propagators/rk_methods/
dormand.rs1use super::RK;
20
21pub(crate) struct Dormand45 {}
23
24impl RK for Dormand45 {
25 const ORDER: u8 = 5;
26 const STAGES: usize = 7;
27 const A_COEFFS: &'static [f64] = &[
28 1.0 / 5.0,
29 3.0 / 40.0,
30 9.0 / 40.0,
31 44.0 / 45.0,
32 -56.0 / 15.0,
33 32.0 / 9.0,
34 19_372.0 / 6_561.0,
35 -25_360.0 / 2_187.0,
36 64_448.0 / 6_561.0,
37 -212.0 / 729.0,
38 9_017.0 / 3_168.0,
39 -355.0 / 33.0,
40 46_732.0 / 5247.0,
41 49.0 / 176.0,
42 -5_103.0 / 18_656.0,
43 35.0 / 384.0,
44 0.0,
45 500.0 / 1_113.0,
46 125.0 / 192.0,
47 -2_187.0 / 6_784.0,
48 11.0 / 84.0,
49 ];
50 const B_COEFFS: &'static [f64] = &[
51 35.0 / 384.0,
52 0.0,
53 500.0 / 1_113.0,
54 125.0 / 192.0,
55 -2_187.0 / 6_784.0,
56 11.0 / 84.0,
57 0.0,
58 5_179.0 / 57_600.0,
59 0.0,
60 7_571.0 / 16_695.0,
61 393.0 / 640.0,
62 -92_097.0 / 339_200.0,
63 187.0 / 2_100.0,
64 1.0 / 40.0,
65 ];
66}
67
68pub(crate) struct Dormand78 {}
72
73impl RK for Dormand78 {
74 const ORDER: u8 = 8;
75 const STAGES: usize = 13;
76 const A_COEFFS: &'static [f64] = &[
77 1.0 / 18.0,
78 1.0 / 48.0,
79 1.0 / 16.0,
80 1.0 / 32.0,
81 0.0,
82 3.0 / 32.0,
83 5.0 / 16.0,
84 0.0,
85 -75.0 / 64.0,
86 75.0 / 64.0,
87 3.0 / 80.0,
88 0.0,
89 0.0,
90 3.0 / 16.0,
91 3.0 / 20.0,
92 29_443_841.0 / 614_563_906.0,
93 0.0,
94 0.0,
95 77_736_538.0 / 692_538_347.0,
96 -28_693_883.0 / 1_125_000_000.0,
97 23_124_283.0 / 1_800_000_000.0,
98 16_016_141.0 / 946_692_911.0,
99 0.0,
100 0.0,
101 61_564_180.0 / 158_732_637.0,
102 22_789_713.0 / 633_445_777.0,
103 545_815_736.0 / 2_771_057_229.0,
104 -180_193_667.0 / 1_043_307_555.0,
105 39_632_708.0 / 573_591_083.0,
106 0.0,
107 0.0,
108 -433_636_366.0 / 683_701_615.0,
109 -421_739_975.0 / 2_616_292_301.0,
110 100_302_831.0 / 723_423_059.0,
111 790_204_164.0 / 839_813_087.0,
112 800_635_310.0 / 3_783_071_287.0,
113 246_121_993.0 / 1_340_847_787.0,
114 0.0,
115 0.0,
116 -37_695_042_795.0 / 15_268_766_246.0,
117 -309_121_744.0 / 1_061_227_803.0,
118 -12_992_083.0 / 490_766_935.0,
119 6_005_943_493.0 / 2_108_947_869.0,
120 393_006_217.0 / 1_396_673_457.0,
121 123_872_331.0 / 1_001_029_789.0,
122 -1_028_468_189.0 / 846_180_014.0,
123 0.0,
124 0.0,
125 8_478_235_783.0 / 508_512_852.0,
126 1_311_729_495.0 / 1_432_422_823.0,
127 -10_304_129_995.0 / 1_701_304_382.0,
128 -48_777_925_059.0 / 3_047_939_560.0,
129 15_336_726_248.0 / 1_032_824_649.0,
130 -45_442_868_181.0 / 3_398_467_696.0,
131 3_065_993_473.0 / 597_172_653.0,
132 185_892_177.0 / 718_116_043.0,
133 0.0,
134 0.0,
135 -3_185_094_517.0 / 667_107_341.0,
136 -477_755_414.0 / 1_098_053_517.0,
137 -703_635_378.0 / 230_739_211.0,
138 5_731_566_787.0 / 1_027_545_527.0,
139 5_232_866_602.0 / 850_066_563.0,
140 -4_093_664_535.0 / 808_688_257.0,
141 3_962_137_247.0 / 1_805_957_418.0,
142 65_686_358.0 / 487_910_083.0,
143 403_863_854.0 / 491_063_109.0,
144 0.0,
145 0.0,
146 -5_068_492_393.0 / 434_740_067.0,
147 -411_421_997.0 / 543_043_805.0,
148 652_783_627.0 / 914_296_604.0,
149 11_173_962_825.0 / 925_320_556.0,
150 -13_158_990_841.0 / 6_184_727_034.0,
151 3_936_647_629.0 / 1_978_049_680.0,
152 -160_528_059.0 / 685_178_525.0,
153 248_638_103.0 / 1_413_531_060.0,
154 0.0,
155 ];
156 const B_COEFFS: &'static [f64] = &[
157 14_005_451.0 / 335_480_064.0,
158 0.0,
159 0.0,
160 0.0,
161 0.0,
162 -59_238_493.0 / 1_068_277_825.0,
163 181_606_767.0 / 758_867_731.0,
164 561_292_985.0 / 797_845_732.0,
165 -1_041_891_430.0 / 1_371_343_529.0,
166 760_417_239.0 / 1_151_165_299.0,
167 118_820_643.0 / 751_138_087.0,
168 -528_747_749.0 / 2_220_607_170.0,
169 0.25,
170 13_451_932.0 / 455_176_623.0,
171 0.0,
172 0.0,
173 0.0,
174 0.0,
175 -808_719_846.0 / 976_000_145.0,
176 1_757_004_468.0 / 5_645_159_321.0,
177 656_045_339.0 / 265_891_186.0,
178 -3_867_574_721.0 / 1_518_517_206.0,
179 465_885_868.0 / 322_736_535.0,
180 53_011_238.0 / 667_516_719.0,
181 2.0 / 45.0,
182 0.0,
183 ];
184}