Selecting the integration tolerances

The following pieces of advice are relevant in deciding the integration tolerances

1. The scalar relative tolerance reltol is to be set to control relative errors. So \$reltol = 10^{-4}\$ means that errors are controlled to \$0.01\% .\$ We do not recommend using reltol larger than \$10^{-3} .\$ On the other hand, reltol should not be so small that it is comparable to the unit roundoff of the machine arithmetic (generally around \$10^{-15}\$).
1. The absolute tolerances abstol (whether scalar or vector) need to be set to control absolute errors when any components of the solution vector \$y\$ may be so small that pure relative error control is meaningless. For example, if \$y_i\$ starts at some nonzero value, but in time decays to zero, then pure relative error control on \$y_i\$ makes no sense (and is overly costly) after \$y_i\$ is below some noise level. Then \$abstol\$ (if scalar) or \$abstol_i\$ (if a vector) needs to be set to that noise level. If the different components have different noise levels, then abstol should be a vector. See the example cvdenx in the CVODE package, and the discussion of it in the CVODE Examples document. In that problem, the three components vary betwen 0 and 1, and have different noise levels; hence the abstol vector. It is impossible to give any general advice on abstol values, because the appropriate noise levels are completely problem-dependent. The user or modeler hopefully has some idea as to what those noise levels are.
1. Finally, it is important to pick all the tolerance values conservatively, because they control the error committed on each individual time step. The final (global) errors are some sort of accumulation of those per-step errors. A good rule of thumb is to reduce the tolerances by a factor of \$.01\$ from the actual desired limits on errors. So if you want \$.01\%\$ accuracy (globally), a good choice is \$reltol = 10^{-6}\$. But in any case, it is a good idea to do a few experiments with the tolerances to see how the computed solution values vary as tolerances are reduced.
page revision: 1, last edited: 11 Apr 2007 20:46