<div dir="ltr"><div>Hi,</div><div><br></div><div>my solution is mostly very close to 1. only  for a very small area where solution goes from 0 to 1(a smeared crack). </div><div><br></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I set -snes_atol 1e-7 and it is converging.</span><br></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I've noticed the following:</span></div><div><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div>There is a difference between the function norm.<br></div><div><div><br></div><div>I calculate the function norm in FormFunction, so every time it is called it gives the function norm</div><div>, and the result is different from the function norm given by -snes_monitor if i set </div><div>     <div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">     SNESSetType(snes,SNESVINEWTON<wbr>RSLS,ierr)</div><div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">     SNESVISetVariableBounds(snes,<wbr>xl,xu,ierr)</div><div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">The function norm calculated in FromFunction is NOT reducing, however, the function norm given by -snes_monitor is reducing</div><div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">They are the same if I just use regular SNES without setting variable bounds.</div><div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Thanks,</div><div style="font-size:14px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Josh</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-09-12 12:02 GMT-05:00 Smith, Barry F. <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
     You have too tight a convergence tolerance for your problem.  You can't expect to get more than 1.e-12 as the minimum residual norm or even less. <br>
<br>
      How close is your solution to 1 and -1?<br>
<br>
      If you really need much higher convergence you can try ./configure --with-precision=__float128 <br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
      Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> On Sep 11, 2018, at 11:53 PM, Josh L <<a href="mailto:ysjosh.lo@gmail.com">ysjosh.lo@gmail.com</a>> wrote:<br>
> <br>
> Yes, I initialize all u_i to 1.0<br>
> <br>
>  <br>
> <br>
> 2018-09-11 23:37 GMT-05:00 Smith, Barry F. <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>>:<br>
> <br>
>    Do you start with initial conditions of  0 <= u_i <= 1 ?<br>
> <br>
>     Run with -snes_monitor -snes_converged_reason -ksp_monitor_true_residual -info -snes_linesearch_monitor and send all the output<br>
> <br>
>   Barry<br>
> <br>
> <br>
> > On Sep 11, 2018, at 11:33 PM, Josh L <<a href="mailto:ysjosh.lo@gmail.com">ysjosh.lo@gmail.com</a>> wrote:<br>
> > <br>
> > Hi,<br>
> > <br>
> > I am using SNES to solve an nonlinear equation f(u), and I know all the u_i should be 0 and 1.<br>
> > <br>
> > First, I use SNES without constraint, and it converges.<br>
> > <br>
> > But, If I set <br>
> >      SNESSetType(snes,<wbr>SNESVINEWTONRSLS,ierr)<br>
> >      SNESVISetVariableBounds(snes,<wbr>xl,xu,ierr)<br>
> > <br>
> > where xl and xu is vector, and xl_i=0 and xu_i=1<br>
> > <br>
> > then SNES fails to converge, because linesearch fails(snes reason = -6), and the norm of residual is not reducing(the norm of incremental solution is reducing)<br>
> > <br>
> > The reason to add constraint is that I want to implement some irreversibility.<br>
> > <br>
> > <br>
> > Thanks,<br>
> > Josh  <br>
> >  <br>
> <br>
> <br>
<br>
</div></div></blockquote></div><br></div>