From: Bruno Turcksin Date: Fri, 16 Sep 2016 14:26:00 +0000 (-0400) Subject: Fix a bug reported by Vaibhav Palkar on the mailing where the time step for embedded... X-Git-Tag: v8.5.0-rc1~664^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83c40dea9412c88dd8dcd668cbefd7921b6848b3;p=dealii.git Fix a bug reported by Vaibhav Palkar on the mailing where the time step for embedded Runge-Kutta methods was not increased correctly. --- diff --git a/doc/news/changes.h b/doc/news/changes.h index 79bb0c4353..215b0dfb6d 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -529,6 +529,11 @@ inconvenience this causes.

Specific improvements

    +
  1. Fixed: EmbeddedRungeKutta methods now correctly increase delta_t_guess + when the error is below coarsen_tol. +
    + (Vaibhav Palkar, Bruno Turcksin, 2016/09/16) +
  2. New: LinearAlgebra::Vector is now instantiated for float and double.
    diff --git a/examples/step-52/doc/results.dox b/examples/step-52/doc/results.dox index 4c2d9ea0b0..8311f7fda0 100644 --- a/examples/step-52/doc/results.dox +++ b/examples/step-52/doc/results.dox @@ -23,18 +23,18 @@ SDIRK: error=0.0042349 Embedded %explicit methods: Heun-Euler: error=0.0073012 steps performed=284 -Bogacki-Shampine: error=0.000207511 - steps performed=200 -Dopri: error=4.01774e-09 - steps performed=200 -Fehlberg: error=9.89504e-09 - steps performed=200 -Cash-Karp: error=2.55791e-10 - steps performed=200 +Bogacki-Shampine: error=0.000403281 + steps performed=181 +Dopri: error=0.0165485 + steps performed=119 +Fehlberg: error=0.00104926 + steps performed=106 +Cash-Karp: error=8.59366e-07 + steps performed=107 + @endcode As expected the higher order methods give (much) more accurate solutions. We -also see that the (rather inaccurate) Heun-Euler method adapted the number of +also see that the (rather inaccurate) Heun-Euler method increased the number of time steps in order to satisfy the tolerance. On the other hand, the other -embedded methods did not need to change the number of time steps as they are -easily able to reach the desired tolerance with the given time step size. +embedded methods used a lot less time steps than what was prescribed. diff --git a/include/deal.II/base/time_stepping.templates.h b/include/deal.II/base/time_stepping.templates.h index d36af60f43..509c1b3324 100644 --- a/include/deal.II/base/time_stepping.templates.h +++ b/include/deal.II/base/time_stepping.templates.h @@ -727,7 +727,7 @@ namespace TimeStepping else { status.exit_delta_t = DELTA_T; - status.delta_t_guess = delta_t; + status.delta_t_guess = new_delta_t; } } // Check if the norm of error is less than the refining tolerance