<html><head><base href="x-msg://3469/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 27, 2013, at 8:18 PM, Jin, Shuangshuang wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><font face="Calibri, sans-serif" size="2"><div>Hi, I am using TS to solve a nonlinear DAE problem. I got an error below:</div><div> </div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div><div>[0]PETSC ERROR: !</div><div>[0]PETSC ERROR: TSStep has failed due to DIVERGED_NONLINEAR_SOLVE, increase -ts_max_snes_failures or make negative to attempt recovery!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: Petsc Development HG revision: 6e0ddc6e9b6d8a9d8eb4c0ede0105827a6b58dfb HG Date: Mon Mar 11 22:54:30 2013 -0500</div><div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div><div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: ./dynSim on a arch-complex named olympus.local by d3m956 Wed Mar 27 18:12:05 2013</div><div>[0]PETSC ERROR: Libraries linked from /pic/projects/ds/petsc-dev/arch-complex/lib</div><div>[0]PETSC ERROR: Configure run at Tue Mar 12 14:32:37 2013</div><div>[0]PETSC ERROR: Configure options --with-scalar-type=complex --with-clanguage=C++ PETSC_ARCH=arch-complex --with-fortran-kernels=generic</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: TSStep() line 2442 in src/ts/interface/ts.c</div><div>[0]PETSC ERROR: TSSolve() line 2553 in src/ts/interface/ts.c</div><div>[0]PETSC ERROR: simu() line 420 in "unknowndirectory/"simulation.C</div><div>[0]PETSC ERROR: runSimulation() line 83 in "unknowndirectory/"dynSim.h</div><div>Run simulation time: 0.0317168</div><div><font face="Times New Roman, serif"> </font></div><div>What does this error imply for?</div></font></div></span></blockquote>The error implies that the nonlinear solve (Newton's method), used at each time step, did not converge. This could be due to various reasons as described here</div><div><a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#newton">http://www.mcs.anl.gov/petsc/documentation/faq.html#newton</a><br><blockquote type="cite"><div><font face="Calibri, sans-serif" size="2"><div><font face="Times New Roman, serif"> </font></div><div>My ftime = 0.5, and the timestep is 0.001, and the solution method I’m using is TSBEULER</div><div><i>PetscReal ftime=0.5;</i></div><div><i>ierr = TSSetInitialTimeStep(ts, 0.0, 0.001); CHKERRQ(ierr);</i></div><div><i>ierr = TSSetType(ts, TSBEULER); CHKERRQ(ierr);</i></div><div><font face="Times New Roman, serif"> </font></div><div>Is there any command option I should use when I run the code?</div><div> </div><div>Thanks,</div><div>Shuangshuang</div></font></div></blockquote></div><br></body></html>