From ed97ac3172bf3822a4c841aa83172319a13c726a Mon Sep 17 00:00:00 2001 From: kanschat Date: Fri, 23 May 2014 07:59:08 +0000 Subject: [PATCH] add missing functions and fix wrong timestep git-svn-id: https://svn.dealii.org/trunk@32971 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/algorithms/theta_timestepping.h | 25 ++++++++++++++++++- .../algorithms/theta_timestepping.templates.h | 2 +- 2 files changed, 25 insertions(+), 2 deletions(-) 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) -- 2.39.5