SNES Convergence
Barry Smith
bsmith at mcs.anl.gov
Mon Jan 7 19:56:23 CST 2008
Your initial function norm is so big as to be obscene; 10^7. I
think you need a much better
initial guess to make progress. What happens with the same options and
da grid of say 8 by 8?
Does it converge nicely or still mess up.
ex5.c stinks because it does not support grid sequencing: I
recommend looking at
ex19.c and sticking your form function in there, then you can use -
dmmg_grid_sequence
and it will use grid sequencing to get a good initial guess on the
fine grid.
Barry
On Jan 7, 2008, at 6:37 PM, Sean Dettrick wrote:
> 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
>
>
> <ls_result.gz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080107/4518aec7/attachment.htm>
More information about the petsc-users
mailing list