[mesa-users] Controls for Solver Tolerance

Bill Paxton paxton at kitp.ucsb.edu
Mon Nov 24 00:45:29 EST 2014


Hi,

The "residual" is the left over difference between the left and right hand sides of the equation we are trying to solve.  We do iterations to reduce that, but we are limited by the non-linearity of the problem and the quality of the estimates for the derivatives.  

The "correction" is the change in the primary variable that is calculated using good-old Newton's rule in multiple dimensions --- so Jacobian and residuals give a correction that would make the next residual vanish if the problem were linear and the Jacobian was exact, neither of which are true.  So the best we can hope for is that the corrections will get smaller next time.

The "norm" is the average; the "max" is the max.  Sometimes you mainly care about the norm and will accept a few outliers.  But sometimes you don't want any really bad outliers, so you want to set a low limit for the max residual or correction as well as the norm.

You might want to try for several iterations with strict tolerances, and then relax them if things are still not converged.  For example, you might be willing to live with the larger tolerances, but you'd like to give it a good try at the smaller ones before switching.  Also, you might be willing to settle for any-old residual if the corrections have become small enough.  You can do that too by relaxing the residual tolerances after a few iterations.

Hope that at least helps with the nomenclature.

I agree with Frank that you should consider the effects of smaller timesteps and more grid points as your main technique --- tightening up the tolerances for the solver won't help if you are taking timesteps that are too large or if you have inadequate grid resolution.  

-Bill




On Nov 23, 2014, at 7:51 PM, Spencer C Wallace wrote:

> Hello,
> 
> I am working with some models and I have a hunch that the solutions to the structure and composition equations might not be precise enough for my purposes. I would like to run a series of models with increasingly strict tolerances for what the solver would consider a 'converged' solution. 
> 
> I found some inlist controls which looked useful:
> 
> tol_correction_norm = 3d-5
> tol_max_correction = 3d-3
> 
> max_iter_for_resid_tol1 = 4
> tol_residual_norm1 = 1d-4
> tol_max_residual1 = 1d-2
> 
> I tried lowering the value of 'tol_max_residual1' and turning up 'max_iter_for_resid_tol1'. Is this a good approach? I'm a little unclear what the difference between 'tol_residual_norm1' and 'tol_max_residual1' is. I'm not sure I understand what 'tol_correction_norm' and 'tol_max_correction' do either. Would anyone care to enlighten me?
> 
> Spencer Wallace
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk_______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users





More information about the Mesa-users mailing list