<div class="gmail_quote">On Wed, Jul 25, 2012 at 6:35 PM, Sean Farley <span dir="ltr"><<a href="mailto:sean@mcs.anl.gov" target="_blank">sean@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":4tl">You mention in your first email that checking for NAN is due to your<br>
timestep; perhaps an alternative route would be to use the newer TS<br>
code which has some adaptive options, namely:<br>
<br>
  -ts_max_snes_failures <1>: Maximum number of nonlinear solve<br>
failures (TSSetMaxSNESFailures)<br>
  -ts_max_reject <10>: Maximum number of step rejections before step<br>
fails (TSSetMaxStepRejections)<br>
  -ts_adapt_dt_min <1e-20>: Minimum time step considered (TSAdaptSetStepLimits)<br>
  -ts_adapt_dt_max <1e+50>: Maximum time step considered (TSAdaptSetStepLimits)<br>
  -ts_adapt_scale_solve_failed <0.25>: Scale step by this factor if<br>
solve fails ()</div></blockquote></div><br><div>These options are only relative to SNESConvergedReason. The "problem" is that PetscError is being called. If NaN arising in the solver is not an "error", just a "did not converge", then we can't be calling PetscError.</div>