The Radau method is used to integrate most (all?) ODEs. However, to my understanding Radau was developed for stiff problems [1], so problems such as the Lorenz63 do not befinite form it. Futher, Radau performs a magnitude slower than e.g. RK45.
from dysts.flows import Lorenz, Hadley
## Load and simulate an attractor
model = Lorenz()
sol = model.make_trajectory(10_000, resample=True, method="Radau")
plt.figure()
plt.plot(sol[:, 0], sol[:, 1])
takes 1.33 min.
from dysts.flows import Lorenz, Hadley
## Load and simulate an attractor
model = Lorenz()
sol = model.make_trajectory(10_000, resample=True, method="RK45")
plt.figure()
plt.plot(sol[:, 0], sol[:, 1])
takes 7.1 seconds.
I would suggest adding a data field if a problem is stiff and then use fast methods for the non-stiff problems, or you could add a method, where the appropriate solver was used.
[1] https://www.emergentmind.com/topics/radau-iia-method
The Radau method is used to integrate most (all?) ODEs. However, to my understanding Radau was developed for stiff problems [1], so problems such as the Lorenz63 do not befinite form it. Futher, Radau performs a magnitude slower than e.g. RK45.
takes 1.33 min.
takes 7.1 seconds.
I would suggest adding a data field if a problem is stiff and then use fast methods for the non-stiff problems, or you could add a method, where the appropriate solver was used.
[1] https://www.emergentmind.com/topics/radau-iia-method