]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add missing functions and fix wrong timestep
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 23 May 2014 07:59:08 +0000 (07:59 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 23 May 2014 07:59:08 +0000 (07:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@32971 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/algorithms/theta_timestepping.h
deal.II/include/deal.II/algorithms/theta_timestepping.templates.h

index 0d86380de1f6b2a431bfa9bf4d546b151b7160fd..c7908f8cf0300ccea0b406e54597f3fbf6830fe4 100644 (file)
@@ -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 <class VECTOR>
+  inline
+  const double ThetaTimestepping<VECTOR>::theta () const
+  {
+    return vtheta;
+  }
+
+
+  template <class VECTOR>
+  inline
+  const double ThetaTimestepping<VECTOR>::theta (double new_theta)
+  {
+    const double tmp = vtheta;
+    vtheta = new_theta;
+    return tmp;
+  }
 }
 
 DEAL_II_NAMESPACE_CLOSE
index 3e3e19c765ca38004706d7b5a8a1ddb3f0a6055d..9d007be8a93165a3c2813e2acbd9d630e23107fd 100644 (file)
@@ -103,7 +103,7 @@ namespace Algorithms
     // The data provided to the inner solver
     src2.add<const VECTOR *>(aux, "Previous time");
     src2.add<const double *>(&d_implicit.time, "Time");
-    src2.add<const double *>(&d_explicit.step, "Timestep");
+    src2.add<const double *>(&d_implicit.step, "Timestep");
     src2.merge(in);
 
     if (output != 0)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.