<div dir="ltr"><div><div><div>Hi Matt,<br><br></div>Thanks for your comments. I see that SNESNRICHARDSON has changed a lot from 3.4.3 to 3.5.3. What do I need to do to make the code compatible with both 3.4.3 and 3.5.3?<br><br></div>Thanks,<br></div>Harshad<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 4:25 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, May 26, 2015 at 3:07 PM, Harshad Sahasrabudhe <span dir="ltr"><<a href="mailto:hsahasra@purdue.edu" target="_blank">hsahasra@purdue.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Matt,</div><div><br></div>Actually I just checked, I don't need to re-init the preconditioner LibMesh solver.<div><br></div><div>The wrapper is interfaced to the mesh and makes it easier to assemble the system matrices. It also keeps track of constraints. The wrapper function <span style="font-size:12.8000001907349px">PetscNonlinearSolver::solve updates the system vectors and matrices, then calls SNESSolve.</span> Thus, I need to call <span style="font-size:12.8000001907349px">PetscNonlinearSolver::solve instead of SNESSolve in SNESApplyNPC.</span></div><div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Do you mean wrap it in SNESSHELL?</span></div></div></div></blockquote><div><br></div></span><div>Yes, exactly.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><span style="font-size:12.8000001907349px">Thanks,</span></div><div><span style="font-size:12.8000001907349px">Harshad</span></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 3:25 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div>On Tue, May 26, 2015 at 12:42 PM, Harshad Sahasrabudhe <span dir="ltr"><<a href="mailto:hsahasra@purdue.edu" target="_blank">hsahasra@purdue.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm using LibMesh for meshing a non-linear equation. I want to use NRichardson non-linear solver to solve the equation. I have a Newton trust region non-linear solver as a pre-conditioner. Both these SNES are created via the LibMesh NonlinearImplicitSystem and PetscNonlinearSolver wrappers.</div><div><br></div><div>I need to re-init the LibMesh NonlinearImplicitSystem each time the preconditioner is applied. Also, I need the preconditioner to be solved via the LibMesh wrapper instead of directly through SNESSolve. How can make it work this way? Any help is appreciated!</div></div></blockquote><div><br></div></div></div><div>I think the easiest way is to have them both look like SNES objects. Then you can just call SNESSetNPC() or use -snes_npc_side left -npc_snes_type newtonls</div><div><br></div><div>Can you explain what the LibMesh wrapper is doing that you you need? We could wrap that object in a SNES, but it sounds</div><div>simpler to me to unwrap it.</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>Thanks,</div><div>Harshad</div></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br><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>
</font></span></font></span></div></div>
</blockquote></div><br></div>
</blockquote></span></div><span class=""><br><br clear="all"><div><br></div>-- <br><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>
</span></div></div>
</blockquote></div><br></div>