<div dir="ltr"><p style="margin:0px;white-space:pre-wrap">Thank you very much for your reply.</p><p style="margin:0px;white-space:pre-wrap">
</p><p style="margin:0px;white-space:pre-wrap"> I tried both switches, but unfortunately they didn't seem to meet my needs.</p><p style="margin:0px"><span style="white-space:pre-wrap"> </span><span style="white-space:normal">-ts_adapt_always_accept </span> <span style="white-space:pre-wrap"> The switch doesn't seem to work, reporting errors when the maximum number of steps is reached without convergence, then the program exits.</span></p><p style="margin:0px"> -ts_error_if_step_fails 0 <span style="white-space:pre-wrap"> This switch accepts the non-convergence time step and outputs the result, but does not continue into the next time step calculation (</span><span style="white-space:pre-wrap"> The time step hasn't reached the maximum time step I set</span><span style="white-space:pre-wrap">). </span><span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> And I wonder if the variable behind this switch is optional? What does it mean?</span></p><p style="margin:0px;white-space:pre-wrap"> I hope to achieve in the case of non-convergence Newton step( for example, the maximum number of Newton iteration steps reached -snes_max_it 50), can go in the next time step calculation.</p><p style="margin:0px"><br></p><p style="margin:0px">Thanks,</p><p style="margin:0px">Yingjie</p></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Zhang, Hong <<a href="mailto:hongzhang@anl.gov">hongzhang@anl.gov</a>> 于2020年4月28日周二 下午10:51写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">-ts_error_if_step_fails 0<br>
<br>
You might want to find out why the nonlinear solver does not converge first. If you have a hand-written Jacobian, you can validate it with -snes_test_jacobian 1 (for a small test case).<br>
<br>
Hong (Mr.)<br>
<br>
> On Apr 28, 2020, at 8:21 AM, Yingjie Wu <<a href="mailto:yjwu16@gmail.com" target="_blank">yjwu16@gmail.com</a>> wrote:<br>
> <br>
> Dear PETSc developers <br>
> Hi, <br>
> <br>
> I have recently used TS to solve nonlinear equations with time terms. since the convergence of my model is not very good, i would like to set to iterative fixed nonlinear steps per time step. If the problem does not meet the SNES convergence criteria after fixed number of nonlinear steps , then go to the next time step calculation. I tried -snes_max_it , but didn't achieve the effect I wanted, and the program stopped after iterating the fixed number of steps. How should I set up in the program?<br>
> <br>
> Thanks,<br>
> Yingjie<br>
<br>
</blockquote></div>