From: kanschat Date: Fri, 23 May 2014 07:59:08 +0000 (+0000) Subject: add missing functions and fix wrong timestep X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed97ac3172bf3822a4c841aa83172319a13c726a;p=dealii-svn.git add missing functions and fix wrong timestep git-svn-id: https://svn.dealii.org/trunk@32971 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/algorithms/theta_timestepping.h b/deal.II/include/deal.II/algorithms/theta_timestepping.h index 0d86380de1..c7908f8cf0 100644 --- a/deal.II/include/deal.II/algorithms/theta_timestepping.h +++ b/deal.II/include/deal.II/algorithms/theta_timestepping.h @@ -254,7 +254,12 @@ namespace Algorithms /** * The weight between implicit and explicit part. */ - const double &theta() const; + const double theta() const; + + /** + * Set a new weight and return the old + */ + const double theta(double new_theta); /** * The data handed to the #op_explicit time stepping operator. @@ -371,6 +376,24 @@ namespace Algorithms { output = &out; } + + + template + inline + const double ThetaTimestepping::theta () const + { + return vtheta; + } + + + template + inline + const double ThetaTimestepping::theta (double new_theta) + { + const double tmp = vtheta; + vtheta = new_theta; + return tmp; + } } DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/include/deal.II/algorithms/theta_timestepping.templates.h b/deal.II/include/deal.II/algorithms/theta_timestepping.templates.h index 3e3e19c765..9d007be8a9 100644 --- a/deal.II/include/deal.II/algorithms/theta_timestepping.templates.h +++ b/deal.II/include/deal.II/algorithms/theta_timestepping.templates.h @@ -103,7 +103,7 @@ namespace Algorithms // The data provided to the inner solver src2.add(aux, "Previous time"); src2.add(&d_implicit.time, "Time"); - src2.add(&d_explicit.step, "Timestep"); + src2.add(&d_implicit.step, "Timestep"); src2.merge(in); if (output != 0)