[petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Francesco Magaletti
Hi everyone, I’m trying to solve a system of time dependent PDE’s, strongly non linear and quite stiff. The system is 1D, but I need a large number of grid points (1-10 million points). I’m facing some convergence problem of the Newton solver: if I use a small timestep (10^-5) the SNES

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Barry Smith
Francesco, Unfortunately the -snes_grid_sequence option only works with a single SNES nonlinear solve and not directly within an outer time-integration scheme. We do not currently have library code to do grid sequence within a time-step. I believe that providing this requires a

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Jed Brown
Hong Zhang writes: > There is one particular integration method that may make the life easier — > backward Euler. It has only one stage at each time step. > > To Francesco: which TS method are you using? Is it backward Euler or > the default theta method? Default is forward

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Barry Smith
> On Feb 10, 2016, at 4:19 PM, Jed Brown wrote: > > Barry Smith writes: >> We do not currently have library code to do grid sequence within a >> time-step. I believe that providing this requires a great deal of >> "replumbing" of the TS solvers to

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Hong Zhang
There is one particular integration method that may make the life easier — backward Euler. It has only one stage at each time step. To Francesco: which TS method are you using? Is it backward Euler or the default theta method? The default one is not stiffly accurate, thus not good for stiff

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Jed Brown
Francesco Magaletti writes: > First of all thank you everybody for the fast replies. > > Barry, > I think the solution 1 is a good suggestion but I confess I’m a bit scared of > going deep into the modification of the ODE integrator. > I’m now using TSCN, the

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Francesco Magaletti
First of all thank you everybody for the fast replies. Barry, I think the solution 1 is a good suggestion but I confess I’m a bit scared of going deep into the modification of the ODE integrator. I’m now using TSCN, the classical Crank-Nicolson 2nd order full implicit time integration. Maybe

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Barry Smith
> On Feb 10, 2016, at 7:38 PM, Matthew Knepley wrote: > > On Wed, Feb 10, 2016 at 4:19 PM, Jed Brown wrote: > Barry Smith writes: > > We do not currently have library code to do grid sequence within a > > time-step. I believe

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Jed Brown
Barry Smith writes: >> On Feb 10, 2016, at 4:19 PM, Jed Brown wrote: >> >> Barry Smith writes: >>> We do not currently have library code to do grid sequence within a >>> time-step. I believe that providing this requires a great

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Hong Zhang
The error messages provided by Francesco indicate a theta method is used in his code. So presumably he may happen to be using the default option of the theta method which is not good for stiff problems. I mentioned the one-stage method just in response to the two ways Barry proposed. It might

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Emil Constantinescu
Francesco, It could be a problem of ODE stability, error control, nonlinear solver (cold start), etc. In addition to what's been recommended, I would suggest trying a different integrator with better properties: try -ts_type arkimex -ts_arkimex_type 2e -ts_arkimex_fully_implicit In case

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Francesco Magaletti
Dear Jed and Emil, your suggestion to use L-stable time integrators gave great results, since the SNES now converges with higher timestep values. The arkimex 2e performs very well, in particular with the extrapolation of the initial guess. Thank you for your time Francesco > Il giorno

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Matthew Knepley
On Wed, Feb 10, 2016 at 4:19 PM, Jed Brown wrote: > Barry Smith writes: > > We do not currently have library code to do grid sequence within a > time-step. I believe that providing this requires a great deal of > "replumbing" of the TS solvers to make

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Jed Brown
Francesco Magaletti writes: > Dear Jed and Emil, > your suggestion to use L-stable time integrators gave great results, since > the SNES now converges with higher timestep values. > The arkimex 2e performs very well, in particular with the extrapolation of >