<div>I am using the Newton iteration to solve a nonlinear 1D heat equation problem by using FEM.</div><div><br></div><div>I attached my source code named "SNES_heat.cpp" </div><div><br></div><div>when I run the code</div><div><p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; background-color: rgb(254, 244, 139);"><span style="font-variant-ligatures: no-common-ligatures"> 0 SNES Function norm 1.206289245288e+01</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; background-color: rgb(254, 244, 139);"><span style="font-variant-ligatures: no-common-ligatures"> 1 SNES Function norm 7.128802192789e+00</span></p>
<p style="margin: 0px; font-style: normal; font-variant-caps: normal; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-variant-emoji: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; background-color: rgb(254, 244, 139);"><span style="font-variant-ligatures: no-common-ligatures"> 2 SNES Function norm 6.608812909525e+00</span></p></div><div><font><br></font></div><div><sign signid="99"><div><font>you can find that it only iterate 3 steps, and then do all the function evaluation and finally just stop the program. </font></div><div><font><br></font></div><div><font>I think it is not reasonble. I check my code, it is correct if I set it as a linear problem. it means my Jacobian and Residual function is correct.</font></div><div><font><br></font></div><div><font>But when I set it as a nonlinear, the residual seems reduces as not expected. </font></div><div><font><br></font></div><div><font>I doubt that whether my understanding of the newton iteration is different from SNES's newton iteration process.</font></div><div><font><br></font><font><br></font><font><br></font><font><br></font><div style="color:#909090;font-family:Arial Narrow;font-size:12px"></div></div><div style="font-size:14px;font-family:Verdana;color:#000;" class="signRealArea"><div><div class="logo" style="width:305px;height:35px;line-height:35px;margin:20px 0 0 0;"><img src="https://exmail.qq.com/cgi-bin/viewfile?type=logo&domain=mail.sustech.edu.cn" onerror=""></div><div class="c_detail" style="margin:10px 0 0 0;"><h4 class="name" style="margin:0;font-size:14px;font-weight:bold;line-height:28px;zoom:1;">David Jiawei LUO LIANG</h4><p class="position" style="margin:0;line-height:22px;color:#a0a0a0;"></p><p class="department" style="margin:0;line-height:22px;color:#a0a0a0;">南方科技大学/学生/研究生/2024</p><p class="phone" style="margin:0;line-height:22px;color:#a0a0a0;"></p><p class="addr" style="margin:0;line-height:22px;color:#a0a0a0;">广东省深圳市南山区学苑大道1088号</p></div></div></div></sign></div><div> </div><div><tincludetail><!--<![endif]--></tincludetail></div><!--<![endif]-->