Changing ode solver tolerances on the fly
Afficher commentaires plus anciens
I am trying to solve a set of coupled stiff ode's using the ode45/ode15s solvers. The solver sometimes does not converge and exists with an error for a particluar set of "Absolute tolerance", Relative Tolerance". Is it possible to change (relax) the values of the "Absolute tolerance", Relative Tolerance" on the fly just for the "problem" time step, help it cross over, and then switch back to the original values.
Thank you
Réponse acceptée
Plus de réponses (1)
Torsten
le 27 Oct 2023
1 vote
Is it possible to change (relax) the values of the "Absolute tolerance", Relative Tolerance" on the fly just for the "problem" time step, help it cross over, and then switch back to the original values.
No, the stepsizes cannot be changed during the integration. Make a second run with relaxed tolerances to see if it really matters. If there is a problem with your equations, the solver will usually abort integration also for larger tolerances.
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!