[petsc-users] snes options for rough solution
Matthew Knepley
knepley at gmail.com
Mon Dec 12 00:54:01 CST 2016
On Mon, Dec 12, 2016 at 12:41 AM, Praveen C <cpraveen at gmail.com> wrote:
> Sorry for being incomplete. I use backward euler and snes. The figure I
> sent shows solution changes by a large amount in each time step. The major
> change is at extrema. The change in one time step
>
> u^{n+1} - u^n
>
> which must come from snes is not a smooth function of x.
>
> If I use dt = dx, then snes does not converge even after 50 iterations,
> here is output (Fenics code)
>
> 0 SNES Function norm 1.977638959494e+00
>
> 1 SNES Function norm 1.924169835496e+00
>
> 2 SNES Function norm 1.922201608879e+00
>
> 3 SNES Function norm 1.920237421814e+00
>
> 4 SNES Function norm 1.918277062381e+00
>
> 5 SNES Function norm 1.916320289472e+00
>
> 6 SNES Function norm 1.914366865403e+00
>
> 7 SNES Function norm 1.912416585240e+00
>
> 8 SNES Function norm 1.910469283868e+00
>
> 9 SNES Function norm 1.899960770375e+00
>
> 10 SNES Function norm 1.879131065459e+00
>
> 11 SNES Function norm 1.857531063656e+00
>
> 12 SNES Function norm 1.836809521483e+00
>
> 13 SNES Function norm 1.816709863124e+00
>
> 14 SNES Function norm 1.797014998190e+00
>
> 15 SNES Function norm 1.777737697197e+00
>
> 16 SNES Function norm 1.758825541543e+00
>
> 17 SNES Function norm 1.740232061718e+00
>
> 18 SNES Function norm 1.721929885464e+00
>
> 19 SNES Function norm 1.703895519687e+00
>
> 20 SNES Function norm 1.686113465512e+00
>
> 21 SNES Function norm 1.668566528915e+00
>
> 22 SNES Function norm 1.651247832992e+00
>
> 23 SNES Function norm 1.634150402758e+00
>
> 24 SNES Function norm 1.617265971731e+00
>
> 25 SNES Function norm 1.600589248992e+00
>
> 26 SNES Function norm 1.584114929900e+00
>
> 27 SNES Function norm 1.567836662164e+00
>
> 28 SNES Function norm 1.551748332761e+00
>
> 29 SNES Function norm 1.535845822400e+00
>
> 30 SNES Function norm 1.520125060009e+00
>
> 31 SNES Function norm 1.504582049738e+00
>
> 32 SNES Function norm 1.489213340181e+00
>
> 33 SNES Function norm 1.474015969067e+00
>
> 34 SNES Function norm 1.458987020278e+00
>
> 35 SNES Function norm 1.444123487154e+00
>
> 36 SNES Function norm 1.429422455304e+00
>
> 37 SNES Function norm 1.414881258532e+00
>
> 38 SNES Function norm 1.400497521029e+00
>
> 39 SNES Function norm 1.386269021843e+00
>
> 40 SNES Function norm 1.372193573931e+00
>
> 41 SNES Function norm 1.358269024537e+00
>
> 42 SNES Function norm 1.344493290602e+00
>
> 43 SNES Function norm 1.330864378208e+00
>
> 44 SNES Function norm 1.317380313100e+00
>
> 45 SNES Function norm 1.304039060314e+00
>
> 46 SNES Function norm 1.290838655798e+00
>
> 47 SNES Function norm 1.277777248327e+00
>
> 48 SNES Function norm 1.264853054978e+00
>
> 49 SNES Function norm 1.252064339134e+00
>
> 50 SNES Function norm 1.239409403964e+00
>
>
> Function norm is decreasing but very slowly. The initial guess for newton,
> which is just solution from old time, is too far from the solution.
>
> With dt = dx^2, it works fine, but this time step is too small.
>
1) Are you using TS? I am guessing the answer is no.
2) This looks like you have a bug in the Jacobian. A larger timestep just
gives you the elliptic operator.
Try
a) Using -pc_type lu, which removes the linear solve as a variable
b) Using -snes_fd on a small problem, which gives the correct Jacobian
Matt
> Best
> praveen
>
> On Mon, Dec 12, 2016 at 11:50 AM, Matthew Knepley <knepley at gmail.com>
> wrote:
>
>> On Sun, Dec 11, 2016 at 11:23 PM, Praveen C <cpraveen at gmail.com> wrote:
>>
>>> Dear all
>>>
>>> I am solving a nonlinear parabolic problem with snes. The newton update
>>> is rather non-smooth and I have convergence problems when using default
>>> options.
>>>
>>> Attached figure shows how solution changes in two time steps.
>>>
>>
>> It is not clear what you mean here. Newton does not solve timestepping
>> problems. Maybe you are using it
>> with an implicit timestepper, but its still not clear what you mean by
>> non-smooth updates. Did you try with
>> TS?
>>
>> Matt
>>
>>
>>> Are there any special algorithms/options in snes that I can use for such
>>> problem ?
>>>
>>> Thanks
>>> praveen
>>>
>>
>>
>>
>> --
>> 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/20161212/d758a8e2/attachment-0001.html>
More information about the petsc-users
mailing list