<div dir="ltr">Attached is my petsc4py/firedrake code which has the implementation I described. <br><br>As of right now, my current implementation with ASILS/ASFLS solvers work (although they are much slower compared to TRON) but the SSILS/SSFLS solvers don't even converge.<br><br>For example, if I run the code as:<br><br><div>> python NR_Nonlinear_poisson.py 50 50 2 -opt_tao_type asils -opt_tao_monitor -opt_tao_max_it 10 -opt_tao_view<br>iter =   0, Function value: 10.268,  Residual: 30.1512 <br>iter =   1, Function value: 2.26616,  Residual: 3.28276 <br>iter =   2, Function value: 0.442395,  Residual: 0.409106 <br>iter =   3, Function value: 0.0180227,  Residual: 0.0305439 <br>iter =   4, Function value: 0.00381325,  Residual: 0.0134287 <br>iter =   5, Function value: 0.00191598,  Residual: 0.00599256 <br>iter =   6, Function value: 0.00114725,  Residual: 0.00383069 <br>iter =   7, Function value: 0.000888807,  Residual: 0.0032619 <br>iter =   8, Function value: 0.000434005,  Residual: 0.00148022 <br>iter =   9, Function value: 0.000179781,  Residual: 0.000565633 <br>iter =  10, Function value: 7.54948e-05,  Residual: 0.000242123 <br>iter =  11, Function value: 3.14898e-05,  Residual: 0.000112043 <br>Tao Object:(opt_) 1 MPI processes<br>  type: asils<br>  TaoLineSearch Object:  (opt_)   1 MPI processes<br>    type: armijo<br>  KSP Object:  (opt_)   1 MPI processes<br>    type: gmres<br>  total KSP iterations: 511<br>  Active Set subset type: subvec<br>  convergence tolerances: gatol=1e-16,   steptol=0.,   gttol=0.<br>  Residual in Function/Gradient:=0.000112043<br>  convergence tolerances: function minimum=1e-08<br>  Objective value=3.14898e-05<br>  total number of iterations=11,                          (max: 10)<br>  total number of constraint function evaluations=23<br>  total number of Jacobian evaluations=12<br></div><div>  Solver terminated: -2   Maximum Iterations<br><br>The above indicates that the solver converges. However if I run the same code but with this:<br></div><div><br>> python NR_Nonlinear_poisson.py 50 50 2 -opt_tao_type ssils -opt_tao_monitor -opt_tao_max_it 10 -opt_tao_view<br>iter =   0, Function value: 10.268,  Residual: 30.1512 <br>iter =   1, Function value: 10.268,  Residual: 30.1512 <br>iter =   2, Function value: 10.268,  Residual: 30.1512 <br>iter =   3, Function value: 10.268,  Residual: 30.1512 <br>iter =   4, Function value: 10.268,  Residual: 30.1512 <br>iter =   5, Function value: 10.268,  Residual: 30.1512 <br>iter =   6, Function value: 10.268,  Residual: 30.1512 <br>iter =   7, Function value: 10.268,  Residual: 30.1512 <br>iter =   8, Function value: 10.268,  Residual: 30.1512 <br>iter =   9, Function value: 10.268,  Residual: 30.1512 <br>iter =  10, Function value: 10.268,  Residual: 30.1512 <br>iter =  11, Function value: 10.268,  Residual: 30.1512 <br>Tao Object:(opt_) 1 MPI processes<br>  type: ssils<br>  TaoLineSearch Object:  (opt_)   1 MPI processes<br>    type: armijo<br>  KSP Object:  (opt_)   1 MPI processes<br>    type: gmres<br>  total KSP iterations: 451<br>  Active Set subset type: subvec<br>  convergence tolerances: gatol=1e-16,   steptol=0.,   gttol=0.<br>  Residual in Function/Gradient:=30.1512<br>  convergence tolerances: function minimum=1e-08<br>  Objective value=10.268<br>  total number of iterations=11,                          (max: 10)<br>  total number of constraint function evaluations=331<br>  total number of Jacobian evaluations=1<br>  Solver terminated: -2   Maximum Iterations<br></div><div><br></div><div>Clearly something is wrong. Any insight as to why?<br><br></div><div>Thanks,<br></div><div>Justin<br></div><div><span class="im"></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 14, 2016 at 6:29 AM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> writes:<br>
>    In Tao it is solving it as an optimization problem while<br>
>    SNESVINEWTONSSLS solves it as a "nonlinear equation" with<br>
>    constraints; I think the answer should be the same.<br>
<br>
</span>The latter may have more solutions.<br>
</blockquote></div><br></div>