]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add time and timestep to anydata and fix documentation
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 16 May 2014 06:13:51 +0000 (06:13 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 16 May 2014 06:13:51 +0000 (06:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@32917 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 0bfec47e27e412db4d814b355c247e546beeae0f..e6bb52410afb2e940ab78e9b4e95ca4d34c163a5 100644 (file)
@@ -80,15 +80,20 @@ namespace Algorithms
    * Operator objects, one for the explicit, one for the implicit
    * part. Each of these will use its own TimestepData to account for
    * the modified step sizes (and different times if the problem is not
-   * autonomous).
+   * autonomous). Note that once the explicit part has been computed,
+   * the left hand side actually constitutes a linear or nonlinear
+   * system which has to be solved.
    *
-   * <h3>Usage of vectors in NamedData</h3>
+   * <h3>Usage AnyData</h3>
    *
-   * ThetaTimestepping uses NamedData for communicating vectors. With
+   * ThetaTimestepping uses AnyData for communicating vectors and time
+   * step information. With
    * outer or inner Operator objects. It does not use itself the input
    * vectors provided, but forwards them to the explicit and implicit
    * operators.
    *
+   * <h4>Vector data</h4>
+   *
    * The explicit Operator #op_explicit receives in its input in first
    * place the vector <tt>"Previous iterate"</tt>, which is the solution
    * value after the previous timestep. It is followed by all vectors
@@ -103,6 +108,17 @@ namespace Algorithms
    * #op_implicit is directly written into the output argument given to
    * ThetaTimestepping.
    *
+   * <h4>Scalar data</h4>
+   *
+   * Since the introduction of AnyData, ThetaTimestepping is able to
+   * communicate the current time step information through AnyData as
+   * well. Therefore, the AnyData objects handed as input to
+   * #op_explicit and #op_implicit contain two entries of type
+   * <tt>const double</tt> reference named "Time" and "Timestep". Note
+   * that "Time" refers to the time at the beginning of the current
+   * step for #op_explicit and at the end for #op_implicit,
+   * respectively.
+   *
    * <h3>Usage of ThetaTimestepping</h3>
    *
    * The use ThetaTimestepping is more complicated than for instance
index 6194088cfebd1c89ea871933d48b24372fd11b0e..348ab379cb6cb2afb54f16945bdafc832a74b225 100644 (file)
@@ -91,6 +91,8 @@ namespace Algorithms
     // timestep
     AnyData src1;
     src1.add<const VECTOR*>(&solution, "Previous iterate");
+    src1.add<const double&>(d_explicit.time, "Time");
+    src1.add<const double&>(d_explicit.step, "Timestep");
     src1.merge(in);
 
     AnyData src2;
@@ -100,6 +102,8 @@ namespace Algorithms
     out1.add<VECTOR*>(aux, "Solution");
     // 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.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.