[CIG-SHORT] Residual not resetting and problems with adaptive time stepping.

Brad Aagaard baagaard at usgs.gov
Wed Feb 12 08:02:06 PST 2014


Jon,

In looking at your input files, it looks like you are prescribing slip 
in a domain with an elastic material (your switch to a viscoelastic 
material is commented out in the .cfg files you sent) and zero 
displacement boundary conditions. I don't see any time dependence in 
your problem.

This means in the second time step, the initial residual will simply be 
the error in the solution left from the first time step (i.e., the final 
residual). The linear solve will beat this down until the residual is 
reduced by a factor of 1.0e-7 (ksp_rtol) or until it drops below 
ksp_atol. The same thing will happen in subsequent time steps. This is 
why you see the residual continue to decrease until it drops below 
ksp_atol and then the solution will converge in one iteration in 
subsequent time steps. This solution behavior is tied to using an 
iterative solver in a problem with no time dependence. In you used a 
direct solver, then you would see immediate convergence in the second 
time step and onward.

Regards,
Brad


On 02/11/2014 04:03 PM, Jonathan Bedford wrote:
> Hi Brad and Charles,
>
> Thanks for your quick reply.  I am aware that the rtol is too large in the
> example file that I attached.  However the same problems occur when I have a
> small rtol (1e-7) and atol of 1e-10, and maximum iterations of 15000.  In fact
> with these tighter tolerances and increased iteration numbers I converged to
> rtol with the elastic pre step, then I converged to atol in the first time step
> - all following time steps I get the output of 'Linear solve converged due to
> CONVERGED_ATOL iterations 0'.  Why doesn't the KSP residual norm reset between
> time steps?
>
> Cheers,
> Jon
>
>
> On Tue, 11 Feb 2014 15:31:21 -0800
> Brad Aagaard <baagaard at usgs.gov> wrote:
>   > On 02/11/2014 03:17 PM, Jonathan Bedford wrote:
>   >> Dear Pylith Community,
>   >>
>   >>     I have a couple of problems and I was wondering if
>   >>you could please help me.
>   >>    I am trying to model the linear maxwell viscoelastic
>   >>response to an
>   >> earthquake.  For this I want to use the implicit
>   >>formulation with adaptive
>   >> timestepping (see coseismic_and_visco.cfg &
>   >>pylithapp.cfg for more details).
>   >>
>   >> Problem 1)  Pylith gives me equal timesteps that are
>   >>equal to the 'max_dt' value
>   >> that I specify in the cfg file.  I have tested various
>   >>combinations of 'max_dt'
>   >> and 'total_time' values, and the time step is always
>   >>'max_dt'.  I was expecting
>   >> the time steps to vary in length.  Furthermore I set the
>   >>'adapt_skip' value to
>   >> zero, which had no effect.  I have tried various
>   >>'total_time' and 'max_dt'
>   >> combinations and I still cannot get the time steps to
>   >>adapt.
>   >
>   > The adaptive time stepping is based on the stability
>   >criterion. For a linear Maxwell material it is based on
>   >the Maxwell time (I believe it is 0.1 times the Maxwell
>   >time), which is constant. This is why the time step is
>   >not changing. In the next year, we plan to use the PETSc
>   >TS features to allow much more sophisticated time
>   >stepping algorithms that will give try adaptive time
>   >stepping.
>   >
>   >> Problem 2) For my model Pylith proceeds with the linear
>   >>solver for each time
>   >> step and solves according to the 'ksp_atol' and
>   >>'ksp_rtol' values that I specify
>   >> in the .cfg file.  However, I noticed that the residuals
>   >>are carried forward to
>   >> the next time step.  When the solution eventually
>   >>converges at time step n,
>   >> pylith does not iterate on the n+1 time step, instead it
>   >>says 'Linear solve
>   >> converged due to CONVERGED_ATOL iterations 0' (see
>   >>attached file
>   >> 'terminal_output').  For the time steps that are not
>   >>iterated upon the modelled
>   >> displacements are zero.  In my pylithapp.cfg file I have
>   >>included large
>   >> tolerances and a small maximum iteration number, but
>   >>this behaviour still occurs
>   >> for smaller tolerances and larger maximum iterations.
>   >>
>   >> Any help would be greatly appreciated.  Attached is the
>   >>terminal output
>   >> ('terminal_output'), the .cfg files, and the solution at
>   >>a set of surface points
>   >> ('GPS_points.h5').
>   >
>   > Your relative convergence tolerances are much too large.
>   >ksp_rtol=0.01 means the residual, no matter how big it
>   >starts, only has to decrease by 0.01 times for the
>   >convergence tolerance to be reached. The linear solve
>   >converges but the error is very large, so you are getting
>   >garbage. In later times step the solution diverges (look
>   >for DIVERGED_ITS). Try the settings in the examples and
>   >then slowly increase them if you don't need something as
>   >tight.
>   >
>   > Also use
>   >
>   > ksp_error_if_not_converged = true
>   >
>   > so that you will get an error if the solution does not
>   >converge.
>   >
>   > Regards,
>   > Brad
>   >
>   >
>   >
>   >> Thanks,
>   >> Jon Bedford
>   >>
>   >> Section 3.1
>   >> GFZ-Potsdam
>   >>
>   >>
>   >>
>   >>
>   >> _______________________________________________
>   >> CIG-SHORT mailing list
>   >> CIG-SHORT at geodynamics.org
>   >> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>   >>
>   >
>   > _______________________________________________
>   > CIG-SHORT mailing list
>   > CIG-SHORT at geodynamics.org
>   > http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>
>
>
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>



More information about the CIG-SHORT mailing list