On Thu, Nov 24, 2011 at 5:37 AM, behzad baghapour <span dir="ltr"><<a href="mailto:behzad.baghapour@gmail.com">behzad.baghapour@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I meant that to do just one or two step in line search correction and let the solution goes on even if the error reduction may not reach the desired tolerance. It may help to reduce the computational cost especially in first iteration or in almost ill-conditioned situation where the Newton iteration may not holds the stability or does not lead to correct solution and a change in preconditioning is needed to overcome the situation.<br>
</blockquote><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/SNES/SNESSetMaxNonlinearStepFailures.html">http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/SNES/SNESSetMaxNonlinearStepFailures.html</a></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 class="gmail_quote">On Thu, Nov 24, 2011 at 2:39 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>On Thu, Nov 24, 2011 at 5:00 AM, behzad baghapour <span dir="ltr"><<a href="mailto:behzad.baghapour@gmail.com" target="_blank">behzad.baghapour@gmail.com</a>></span> wrote:<br></div><div class="gmail_quote">
<div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote">On Wed, Nov 23, 2011 at 4:33 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div>On Wed, Nov 23, 2011 at 01:06, behzad baghapour <span dir="ltr"><<a href="mailto:behzad.baghapour@gmail.com" target="_blank">behzad.baghapour@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> for( c=0; c<ne; c++ ) for( p=0; p<tot; p++ )
<br> FC->e[c].Q[p] = xx[c*(noe*num)+p];<br></div></blockquote><div><br></div></div><div>You haven't told me about "noe" or "num". Do you mean for this to read xx[c*tot+p]?</div></div></blockquote>
<div><br>noe is the number of equations (equal to number of flow states) and num is the number of shape functions in element (according to the order of accuracy) <br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="gmail_quote"><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br> ierr = VecRestoreArray( x, &xx ); CHKERRQ( ierr );<br><br> interiorFlux( FC->flw, FC->e );
<br> faceFlux ( FC->flw, FC->f, FC->e );</div></blockquote></div></div><br><div>The first of these should set FC->e (if you are adding into it, then you need to zero it first) and the second should add into it.</div>
</blockquote><div><br>I found that my mistake is that I forgot to set upwind effect in my defined field context. The problem was not stable, it is not related to SNES setup.<br><br>However, I can't find out the difference between "basic" and "basicnonorms" in line search method.<br>
</div></div></blockquote><div><br></div></div><div>Basic takes the full Newton step, but checks for decrease. nonorms just takes it and moves on.</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div>In addition, Is it possible to set the number of line-search corrections or is just decided by the solver?<br></div></div></blockquote><div><br></div></div><div>You can set a custom line search. I am not sure what you mean by this "number of line search correctons"</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 class="gmail_quote"><div>Thanks a lot,<br><font color="#888888">BehZad<br>
<br></font></div></div><br>
</blockquote></div><font color="#888888"><br><br clear="all"><div><br></div>-- <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>
</blockquote></div><br><br clear="all"><div><br></div>-- <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>