<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Aug 8, 2016, at 2:23 PM, Neiferd, David John <<a href="mailto:david.neiferd@wright.edu" class="">david.neiferd@wright.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Thanks for the suggestions Geoff and Dave.  Using G(x) = F(x) - b(x) = 0, will required redefinition of the Jacobian correct? If I understand correctly, the Jacobian is the derivative of F(x) with respect
 to x.  Since we are redefining F(x) to G(x), it would be necessary to change the Jacobian from dF(x)/dx to dF(x)/dx - db(x)/dx, correct?</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Yes.</div>
<br class="">
<blockquote type="cite" class="">
<div id="divtagdefaultwrapper" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Also, I noticed when I implemented G(x) = F(x) - b = 0 (where b is constant) the method seems less robust when using newton's method with a line search, at least for one particular problem, the line
 search (using default settings) diverges (converged reason = -6), but using a trust region newton method or a quasi-newton method it converges to the answer.</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>I would start with the suggestions in <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html#newton" class="">http://www.mcs.anl.gov/petsc/documentation/faq.html#newton</a> first before doing any more tuning. In optimization, trust region solvers
 have a reputation of being more robust, but slower, than comparable line search methods; I’m not sure if this statement is true for general equation solving.</div>
<div><br class="">
</div>
<div>Geoff</div>
<br class="">
<blockquote type="cite" class="">
<hr tabindex="-1" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline-block; width: 704.609375px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""></span>
<div id="divRplyFwdMsg" dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Oxberry, Geoffrey Malcolm <<a href="mailto:oxberry1@llnl.gov" class="">oxberry1@llnl.gov</a>><br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>Monday, August 8, 2016 4:20:27 PM<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span>Neiferd, David John<br class="">
<b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [petsc-users] How to solve nonlinear F(x) = b(x)?</font>
<div class=""> </div>
</div>
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
David,
<div class=""><br class="">
</div>
<div class="">What about solving G(x) = F(x) - b(x) = 0?</div>
<div class=""><br class="">
</div>
<div class="">Geoff</div>
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Aug 8, 2016, at 1:12 PM, Neiferd, David John <<a href="mailto:david.neiferd@wright.edu" class="">david.neiferd@wright.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" class="" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;">
Hello all,
<div class=""><br class="">
</div>
<div class="">I've been searching through the PETSc documentation to try to find how to solve a nonlinear system where the right hand side (b) varies as a function of the state variables (x).  According to the PETSc documentation, SNES solves the equations
 F(x) = b where b is a constant vector.  What would I do to solve F(x) = b(x)?  An example of this would be a nonlinear thermoelastic structure where as the structure deforms the direction of the loads generated by the thermal expansion changes as well.  Any
 insight into how to implement this is appreciated.</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>