ROS3P, ROS3PR and ROS34PW1a return Success with a large error and a step count that
barely responds to the tolerance. On u' = -1000u over (0, 0.01):
using OrdinaryDiffEqRosenbrock, LinearAlgebra
prob = ODEProblem((du, u, p, t) -> (du .= -1000 .* u), [1.0], (0.0, 0.01))
exact = [exp(-10.0)]
for alg in (ROS3P(), ROS3PR(), ROS34PW1a(), Rodas3(), Rodas4())
s = solve(prob, alg; abstol = 1e-12, reltol = 1e-12)
@show alg, s.stats.naccept, norm(s.u[end] - exact)/norm(exact), s.retcode
end
| alg |
tol 1e-6: err, steps |
tol 1e-12: err, steps |
| ROS3P |
1.57e3, 3 |
48, 8 |
| ROS3PR |
1.9e3, 3 |
30, 7 |
| ROS34PW1a |
233, 3 |
76.6, 7 |
| Rodas3 |
1.84e-3, 141 |
3.8e-9, 13337 |
| Rodas4 |
2.15e-4, 47 |
7.58e-10, 1326 |
Same pattern on u' = -u and on a rotation plus decay system, so it isn't stiffness specific.
Tightening the tolerance by six orders moves ROS3P from 4 to 9 steps and leaves the error
around 0.5 to 0.8 on the rotation problem, where Rodas4 goes 183 to 5649 steps and 2.2e-6 to
2.5e-12.
Fixed step convergence is fine for all three, ROS3P measures order 2.96 against its claimed 3,
so the methods themselves look right and it's the error estimate that isn't working. All three
report isadaptive = true with adaptive_order = 2, the same as Rodas3.
EEst is the giveaway. On the rotation problem at abstol = reltol = 1e-10, first five steps:
ROS3P dt=1.92e-5 EEst=5.63e-10 | dt=7.27e-4 EEst=2.50e-8 | dt=7.27e-3 EEst=2.11e-7 | dt=6.93e-2 EEst=7.67e-7 | dt=4.88e-1 EEst=1.14e-6
Rodas3 dt=1.92e-5 EEst=1.66e-2 | dt=1.32e-5 EEst=5.35e-3 | dt=2.32e-5 EEst=2.95e-2 | dt=2.37e-5 EEst=3.12e-2 | dt=2.99e-5 EEst=6.29e-2
ROS3P's estimate never comes near 1, so nothing is ever rejected and dt grows about tenfold
per step. btilde is not the obvious culprit, it's [-0.113, -0.423, 5.6e-17] for ROS3P and
[-5.43, -1.33, 0, 0] for ROS34PW1a, both nonzero.
Is adaptivity for these three expected to work, or are they meant to be used fixed step?
ROS3P,ROS3PRandROS34PW1areturnSuccesswith a large error and a step count thatbarely responds to the tolerance. On
u' = -1000uover(0, 0.01):Same pattern on
u' = -uand on a rotation plus decay system, so it isn't stiffness specific.Tightening the tolerance by six orders moves ROS3P from 4 to 9 steps and leaves the error
around 0.5 to 0.8 on the rotation problem, where
Rodas4goes 183 to 5649 steps and 2.2e-6 to2.5e-12.
Fixed step convergence is fine for all three, ROS3P measures order 2.96 against its claimed 3,
so the methods themselves look right and it's the error estimate that isn't working. All three
report
isadaptive = truewithadaptive_order = 2, the same asRodas3.EEstis the giveaway. On the rotation problem atabstol = reltol = 1e-10, first five steps:ROS3P's estimate never comes near 1, so nothing is ever rejected and
dtgrows about tenfoldper step.
btildeis not the obvious culprit, it's[-0.113, -0.423, 5.6e-17]for ROS3P and[-5.43, -1.33, 0, 0]for ROS34PW1a, both nonzero.Is adaptivity for these three expected to work, or are they meant to be used fixed step?