SNES Convergence

Sean Dettrick sdettrick at gmail.com
Mon Jan 7 18:37:40 CST 2008


On Jan 7, 2008 4:35 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   Sean,
>
>     Can you run the ls version with the additional options -info -
> snes_monitor and send
> the results?


Hi Barry,

Attached are the gzipped results.  It says something about an inconsistent
rhs.  Could that be the problem?  And what would the rhs in question be?


You could also make a run with -snes_mf_operator and see
> if that "converges"
> in the same way or not (this is another check that the analytic
> Jacobian is right/wrong).


I tried that, and it seemed to do the same thing.

Thanks a lot for the feedback.

Sean



>
>
>     Thanks
>
>      Barry
>
> On Jan 7, 2008, at 3:30 PM, Sean Dettrick wrote:
>
> > Hi,
> >
> > I am solving a version of the Grad-Shafranov equation, F(x)=0, which
> > but for some extra spatial dependences is similar in form to the 2D
> > Bratu equation in snes/examples/tutorials/ex5.c.  I started with the
> > ex5.c code, introducing just enough changes to model the new
> > system.  The analytic Jacobian function appears to be correct, with
> > a Norm of matrix ratio < 1.e9 (found using -snes_type test).
> >
> > The problem I am having is that in most cases the SNES solver does
> > not converge to a solution x of F(x)=0.  Rather, what happens is
> > that the fnorm (obtained in a monitor function) converges to some
> > large non-zero value, and F(x) seems to get "stuck", i.e. it
> > converges to a large non-zero result.  Even though it is clearly not
> > a solution, the  -snes_converged_reason is reported as "Nonlinear
> > solve converged due to CONVERGED_TR_DELTA".  The intermediate KSP
> > steps have -ksp_converged_reason reported as "Linear solve converged
> > due to CONVERGED_STEP_LENGTH".  I have been typically running with
> > parameters -da_grid_x 100 -da_grid_y 101 -snes_converged_reason -
> > ksp_converged_reason -snes_type tr -ksp_type gmres -snes_max_it 100.
> >
> > Does this sound like a familiar scenario with a familiar solution?
> > Or can anyone point me to some documentation that describes the SNES
> > tr and ls parameters in more detail than the manual.pdf?
> > Or can anyone recommend the best SNES and KSP parameters for the
> > Bratu example?
> >
> > Any help or advice would be greatly appreciated.
> >
> > Thanks,
> > Sean Dettrick
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080107/e2491c32/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ls_result.gz
Type: application/x-gzip
Size: 2600 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080107/e2491c32/attachment.bin>


More information about the petsc-users mailing list