[petsc-users] Basic question on making SNES continue its iterations

Matthew Knepley knepley at gmail.com
Tue Sep 10 14:55:46 CDT 2013


On Tue, Sep 10, 2013 at 2:48 PM, sang pham van <pvsang002 at gmail.com> wrote:

> Hi Matt,
>
> Is it true that the option -snes_linesearch_type basic will make SNES run
> with the pure Newton method (without line search nor true region)?
>

Yes.

   Matt


> Thank you.
> Sang
>
>
> On Wed, Jun 5, 2013 at 1:04 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
>> On Wed, Jun 5, 2013 at 12:33 PM, Gaurish Telang <gaurish108 at gmail.com>wrote:
>>
>>> I am trying to solve a non-linear system with PETSs's SNES solvers.
>>>
>>> To run my code, I am using the following options for snes set through
>>> the command-line,
>>> seen below.
>>>
>>> mpirun -np 1 ./Testvector \
>>> -fBus      $1/Bus.mat \
>>> -fYm       $1/Ym.mat \
>>>  -ft       $1/t.mat \
>>> -flinedata $1/linedata.mat \
>>> -nox \
>>> -snes_atol 1.e-5\
>>> -snes_stol 1.e-6 \
>>> -snes_rtol 1.e-12 \
>>> -snes_max_it 100 \
>>> -snes_max_linear_solve_fail 100  \
>>> -snes_converged_reason \
>>> -ksp_type preonly \
>>> -pc_type lu \
>>> -pc_factor_mat_solver_package superlu_dist \
>>> -snes_monitor \
>>> > result_superLU_dist.tmp 2>&1;
>>>
>>>
>>> After feeding my data, I get the following output
>>>  0 SNES Function norm 2.438306296478e+02
>>>   1 SNES Function norm 1.679437793666e+02
>>>   2 SNES Function norm 1.493618467597e+02
>>>   3 SNES Function norm 4.622194635741e+01
>>>   4 SNES Function norm 4.195017632984e+01
>>> Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations 4
>>>
>>> As you can see the the SNES function norm is *decreasing*, which
>>> indicates it is probably converging slowly to the actual solution. However
>>> after just 4 iterations, it stops and indicates non-convergence, even
>>> though my -snes_max_it = 100 as shown above.
>>>
>>> Is there a way to tell PETSc to continue its SNES iterations? Maybe some
>>> there are some
>>> default parameters which have to be changed?
>>>
>>
>>  You can try -snes_max_fail <num> or maybe -snes_linesearch_type basic.
>>
>>   Matt
>>
>>
>>> Thank you
>>>
>>> Gaurish
>>>
>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments is infinitely more interesting than any results to which their
>> experiments lead.
>> -- Norbert Wiener
>>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130910/5774ffda/attachment.html>


More information about the petsc-users mailing list