<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Sep 7, 2018 at 6:39 AM Yingjie Wu <<a href="mailto:yjwu16@gmail.com">yjwu16@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Thank you very much for your reply. </div><div dir="ltr"><br></div><div dir="ltr">I'm a bit confused if I use what you recommend:  - snes_fd -pc_type lu means that I explicitly construct the Jacobian matrix using the finite difference method, construct the precondition matrix using the completely LU decomposition, and solve the step size \ delta x with the GMRES method (default). </div></div></div></div></div></div></blockquote><div><br></div><div>You should do this first in order to check that your code reproduces the right physics.</div><div><br></div><div>Then you should do -snes_fd_color -snes_fd_color_use_mat -mat_coloring_type greedy for larger problems.</div><div><br></div><div>Finally, if you want to go even larger, then you use -snes_mf and a user preconditioner. However, there is not</div><div>much benefit of MF with a low order method because you will have to form some preconditioner.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">In fact, what I want to use is to approximate the vector product of a matrix with finite difference, so that the explicit construction of Jacobian matrices can be avoided. If so, should I use MatrixFreeMethod? How should I set it up? If I want to set up precondition, what do I need to add? <br></div><div dir="ltr"><br></div><div dir="ltr">In addition, I want to output variables in each nolinear step. What should I add code to make SNES step by step? <br></div><div dir="ltr">There may be many problems, but they bother me very much. I am looking forward to your reply. <br></div><div dir="ltr"><br></div><div>Thanks,</div><div>Yingjie</div><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> 于2018年9月6日周四 下午10:34写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Sep 6, 2018 at 4:47 AM Yingjie Wu <<a href="mailto:yjwu16@gmail.com" target="_blank">yjwu16@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="tahoma, sans-serif">Dear Petsc developer:            </font></div><div dir="ltr"><font face="tahoma, sans-serif">Hi,            </font></div><div dir="ltr"><font face="tahoma, sans-serif">Thank you for your previous help.            </font></div><div dir="ltr"><font face="tahoma, sans-serif">I recently modeled on PETSc's SNES example and wrote a computer program myself. This program is mainly for solving nonlinear equations of thermal hydraulics.</font><font face="simhei, sans-serif"> </font><br></div><div dir="ltr"><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">∇</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">·(λ</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">∇</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">T</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt"><font face="宋体">)</font> - </span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">∇</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">_y<font face="宋体">(ρ</font><font face="Arial">*Cp*u</font><font face="宋体">) </font><font face="Arial">- T_source = 0</font></span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt"></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">w*<font face="宋体">ρ</font><font face="Arial">*u = </font><font face="宋体">ρ</font><font face="Arial">g - </font></span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">∇</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">_y<font face="宋体">(</font><font face="Arial">P</font><font face="宋体">)</font></span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt"></span></p><p class="MsoNormal" style="margin:0pt 0pt 0.0001pt;text-align:justify;font-family:等线;font-size:10.5pt"><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">     ∇</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">·( <font face="Arial">1/w * </font></span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">∇</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">P <font face="宋体">) </font><font face="Arial">=  - </font></span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt">∇</span><span style="font-family:宋体;color:rgb(51,51,51);letter-spacing:0pt;font-size:10.5pt"><font face="宋体">(</font> ρ<font face="Arial">g / w </font><font face="宋体">)</font></span></p><p class="MsoNormal" style="margin:0pt 0pt 0.0001pt;text-align:justify"><font color="#333333" face="tahoma, sans-serif">Where P, T and u are variables, the distribution represents pressure, temperature and velocity. The rest are nonlinear physical parameters and constants.            </font></p><p class="MsoNormal" style="margin:0pt 0pt 0.0001pt;text-align:justify"><font color="#333333" face="tahoma, sans-serif">Because the program is very preliminary, so I use - snes_mf so that I can save the part of writing to calculate the Jacobian matrix.            </font></p><p class="MsoNormal" style="margin:0pt 0pt 0.0001pt;text-align:justify"><font color="#333333" face="tahoma, sans-serif">After compiling and passing, I found that the residual function had not dropped to a small enough level, but the program stopped, as follows:</font><br></p></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div dir="ltr"><div dir="ltr"><p class="MsoNormal" style="margin:0pt 0pt 0.0001pt;text-align:justify"><font color="#333333" face="tahoma, sans-serif">Setting Up: </font><font face="tahoma, sans-serif">-snes_mf  -snes_monitor  -draw_pause  10  -snes_view</font></p></div></div></blockquote></div></div></blockquote><div><br></div><div>First, do not use -snes_mf. It is not for testing, but for sophisticated use. The first option you</div><div>might try is</div><div><br></div><div>   -snes_fd -pc_type lu</div><div><br></div><div>That uses a full Jacobian and LU factorization for a direct solve. Always run the solve using</div><div><br></div><div>  -snes_view -snes_converged_reason -snes_monitor -ksp_converged_reason -ksp_monitor_true_residual</div><div><br></div><div>When that gets too expensive, you can try</div><div><br></div><div>  -snes_fd_color -snes_fd_color_use_mat -mat_coloring_type greedy</div><br class="m_7458121598908438807gmail-m_5438022226192043522gmail-Apple-interchange-newline"><div>but that requires you to preallocate the Jacobian matrix correctly.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div dir="ltr"><div dir="ltr"><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="text-indent:45pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">0 SNES Function norm 3.724996516631e+09 </span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  1 SNES Function norm 2.194322909557e+09 </span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  2 SNES Function norm 1.352051559826e+09 </span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  3 SNES Function norm 1.522311916217e+08 </span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">SNES Object: 1 MPI processes</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  type: newtonls</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  maximum iterations=50, maximum function evaluations=10000</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  tolerances: relative=1e-08, absolute=1e-50, solution=1e-08</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  total number of linear solver iterations=1298</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  total number of function evaluations=11679</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  norm schedule ALWAYS</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  SNESLineSearch Object: 1 MPI processes</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    type: bt</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">      interpolation: cubic</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">      alpha=1.000000e-04</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    maxstep=1.000000e+08, minlambda=1.000000e-12</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    tolerances: relative=1.000000e-08, absolute=1.000000e-15, lambda=1.000000e-08</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    maximum iterations=40</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  KSP Object: 1 MPI processes</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    type: gmres</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">      restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">      happy breakdown tolerance 1e-30</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    maximum iterations=10000, initial guess is zero</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    tolerances:  relative=1e-05, absolute=1e-50, divergence=10000.</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    left preconditioning</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    using PRECONDITIONED norm type for convergence test</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">  PC Object: 1 MPI processes</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    type: none</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    linear system matrix = precond matrix:</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">    Mat Object: 1 MPI processes</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">      type: mffd</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">      rows=300, cols=300</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">        Matrix-free approximation:</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">          err=1.49012e-08 (relative error in function evaluation)</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt">          Using wp compute h routine</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;text-transform:none;font-style:normal;font-size:7.5pt"><span></span></span></p><p class="MsoNormal" style="margin:0pt 0pt 0.0001pt;text-align:justify"></p><p class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913m_-2056236558563527435gmail-15" style="margin-left:18pt;text-indent:21pt"><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;font-size:7.5pt">              Does not compute normU</span><span style="font-family:"Times New Roman";color:rgb(51,51,51);letter-spacing:0pt;font-size:7.5pt"></span></p></div></div></blockquote><font color="#333333"><font face="tahoma, sans-serif">I would like to know why the residual function can not continue to decline, and why the program will stop before convergence. </font></font></div><div dir="ltr"><font color="#333333"><font face="tahoma, sans-serif">I do not know much about the convergence criteria and convergence rules of PETSc for solving nonlinear equations. I hope I can get your help. </font><br></font></div><div><font color="#333333"><font face="tahoma, sans-serif">I'm looking forward to your reply~</font></font></div><div><font color="#333333"><font face="tahoma, sans-serif"><br></font></font></div><div><font color="#333333"><font face="tahoma, sans-serif">Thanks,</font></font></div><div><font color="#333333"><font face="tahoma, sans-serif">Yingjie</font></font></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_7458121598908438807gmail-m_5438022226192043522m_-5741394256885876913gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>