@@ -518,18 +518,13 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}
518
518
end
519
519
num_stages = min_stages
520
520
521
- tabs = [RadauIIATableau5 (uToltype, constvalue (tTypeNoUnits)), RadauIIATableau9 (uToltype, constvalue (tTypeNoUnits)), RadauIIATableau13 (uToltype, constvalue (tTypeNoUnits))]
522
- i = max (min_stages, 9 )
523
- while i <= max_stages
524
- push! (tabs, RadauIIATableau (uToltype, constvalue (tTypeNoUnits), i))
525
- i += 2
526
- end
521
+ tabs = [RadauIIATableau (uToltype, constvalue (tTypeNoUnits), i) for i in min_stages: 2 : max_stages]
527
522
cont = Vector {typeof(u)} (undef, max_stages)
528
523
for i in 1 : max_stages
529
524
cont[i] = zero (u)
530
525
end
531
526
532
- index = min ((min_stages - 1 ) ÷ 2 , 4 )
527
+ index = 1
533
528
534
529
κ = alg. κ != = nothing ? convert (uToltype, alg. κ) : convert (uToltype, 1 // 100 )
535
530
J = false .* _vec (rate_prototype) .* _vec (rate_prototype)'
@@ -602,14 +597,9 @@ function alg_cache(alg::AdaptiveRadau, u, rate_prototype, ::Type{uEltypeNoUnits}
602
597
end
603
598
num_stages = min_stages
604
599
605
- tabs = [RadauIIATableau5 (uToltype, constvalue (tTypeNoUnits)), RadauIIATableau9 (uToltype, constvalue (tTypeNoUnits)), RadauIIATableau13 (uToltype, constvalue (tTypeNoUnits))]
606
- i = max (min_stages, 9 )
607
- while i <= max_stages
608
- push! (tabs, RadauIIATableau (uToltype, constvalue (tTypeNoUnits), i))
609
- i += 2
610
- end
600
+ tabs = [RadauIIATableau (uToltype, constvalue (tTypeNoUnits), i) for i in min_stages: 2 : max_stages]
611
601
612
- index = min ((min_stages - 1 ) ÷ 2 , 4 )
602
+ index = 1
613
603
614
604
κ = alg. κ != = nothing ? convert (uToltype, alg. κ) : convert (uToltype, 1 // 100 )
615
605
0 commit comments