@@ -111,10 +111,10 @@ function initialize!(integrator, cache::RadauIIA7Cache)
111111 if integrator. opts. adaptive
112112 @unpack abstol, reltol = integrator. opts
113113 if reltol isa Number
114- cache. rtol = reltol^ (2 / 3 ) / 10
114+ cache. rtol = reltol^ (5 / 8 ) / 10
115115 cache. atol = cache. rtol * (abstol / reltol)
116116 else
117- @. . broadcast= false cache. rtol= reltol^ (2 / 3 ) / 10
117+ @. . broadcast= false cache. rtol= reltol^ (5 / 8 ) / 10
118118 @. . broadcast= false cache. atol= cache. rtol * (abstol / reltol)
119119 end
120120 end
@@ -1207,6 +1207,7 @@ end
12071207 ndw = ndw1 + ndw2 + ndw3 + ndw4 + ndw5
12081208
12091209 # check divergence (not in initial step)
1210+
12101211 if iter > 1
12111212 θ = ndw / ndwprev
12121213 (diverge = θ > 1 ) && (cache. status = Divergence)
@@ -1226,11 +1227,12 @@ end
12261227 # transform `w` to `z`
12271228 @. . broadcast= false z1= T11 * w1 + T12 * w2 + T13 * w3 + T14 * w4 + T15 * w5
12281229 @. . broadcast= false z2= T21 * w1 + T22 * w2 + T23 * w3 + T24 * w4 + T25 * w5
1229- @. . broadcast= false z3= T31 * w1 + T22 * w2 + T23 * w3 + T34 * w4 + T35 * w5
1230+ @. . broadcast= false z3= T31 * w1 + T32 * w2 + T33 * w3 + T34 * w4 + T35 * w5
12301231 @. . broadcast= false z4= T41 * w1 + T42 * w2 + T43 * w3 + T44 * w4 + T45 * w5
12311232 @. . broadcast= false z5= T51 * w1 + w2 + w4 #= T52=1, T53=0, T54=1, T55=0 =#
12321233
12331234 # check stopping criterion
1235+
12341236 iter > 1 && (η = θ / (1 - θ))
12351237 if η * ndw < κ && (iter > 1 || iszero (ndw) || ! iszero (integrator. success_iter))
12361238 # Newton method converges
@@ -1239,12 +1241,14 @@ end
12391241 fail_convergence = false
12401242 break
12411243 end
1244+
12421245 end
12431246 if fail_convergence
12441247 integrator. force_stepfail = true
12451248 integrator. stats. nnonlinconvfail += 1
12461249 return
12471250 end
1251+
12481252 cache. ηold = η
12491253 cache. iter = iter
12501254
0 commit comments