On Sun, Jan 10, 2010 at 3:28 PM, Ryan Yan <span dir="ltr">&lt;<a href="mailto:vyan2000@gmail.com">vyan2000@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Matt,<br>Thank you very much for the suggestion.  I was using DMMGSetSNESLocal(dmmg,FormFunctionLocal,0,ad_FormFunctionLocal,admf_FormFunctionLocal), so the Jacobian is calculated by automatic differentiation, right? For this instance, is there any way to check the correctness of the set up of the residual?<br>
</blockquote><div><br>Not unless you have ADIC configured. Do you see the AD code?<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
After I tried the -snes_mf the linear solver failed( ):<br><br>      0 SNES Function norm 1.578681107621e+08 <br>      1 SNES Function norm 1.343502549866e+08 <br>      2 SNES Function norm 1.211729760183e+08 <br>      3 SNES Function norm 1.211728837635e+08 <br>

      4 SNES Function norm 1.211728837178e+08 <br>      5 SNES Function norm 1.211728837177e+08 <br>    0 SNES Function norm 1.999574234301e+08 <br>  0 SNES Function norm 1.677632378801e+08 <br>Number of Newton iterations = 0<br>

Converged reason is -3<br></blockquote><div><br>Yes, since there is no preconditioner. However, just use GMRES and a very large subspace.<br><br>  Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Might it be helpful to call DMMGGetSNES and then setup the analytical jacobian for the preconditioner matrix? My residual is pretty straightforward though.<br><font color="#888888"><br>Yan</font><div><div></div><div class="h5">
<br><br><br><div class="gmail_quote">
On Sun, Jan 10, 2010 at 3:59 PM, Matthew Knepley <span dir="ltr">&lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

It is possible for the radius of quadratic convergence to be very small. However, I<br>would check your Jacobian, and maybe try -snes_mf.<br><br>  Matt<div><div></div><div><br><br><div class="gmail_quote">On Sun, Jan 10, 2010 at 2:55 PM, Ryan Yan <span dir="ltr">&lt;<a href="mailto:vyan2000@gmail.com" target="_blank">vyan2000@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi All,<br>I am solving a nonlinear system using snes. The -snes_monitor option has the following output:<br>


<br>  0 SNES Function norm 2.640163923729e+09 <br>  1 SNES Function norm 1.047643565314e+08 <br>  2 SNES Function norm 1.712732074788e+06 <br>
  3 SNES Function norm 1.002169173269e+04 <br>  4 SNES Function norm 1.655878303433e+03 <br>  5 SNES Function norm 3.746498305706e+02 <br>  6 SNES Function norm 8.317435704773e+01 <br>  7 SNES Function norm 1.857639969641e+01 <br>



  8 SNES Function norm 4.149691057773e+00 <br>  9 SNES Function norm 9.265604042412e-01 <br> 10 SNES Function norm 2.069527103214e-01 <br> 11 SNES Function norm 4.624186491082e-02 <br> 12 SNES Function norm 1.035558432688e-02 <br>



 13 SNES Function norm 2.341362958811e-03 <br> 14 SNES Function norm 5.507445427277e-04 <br> 15 SNES Function norm 1.485123568354e-04 <br> 16 SNES Function norm 5.180043781814e-05 <br> 17 SNES Function norm 2.341966514486e-05 <br>



 18 SNES Function norm 1.344936158651e-05 <br> 19 SNES Function norm 1.054812641176e-05 <br>Number of Newton iterations = 19<br>Converged reason is 4<br><br>It looks like the iterate never falls into a quadratic convergence region before it converges. Is there any hint to understand this behavior?<br>



<br>Thanks a lot,<br><font color="#888888"><br>Yan<br><br><br>
</font></blockquote></div><br><br clear="all"><br></div></div><font color="#888888">-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>

-- Norbert Wiener<br>

</font></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>