From 48e1a10981ac4a24781e0d03b41779f3d54bdcc5 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Wed, 30 Jun 2010 22:10:03 +0000 Subject: [PATCH] add documentation, fix missing initializations and fix strange name git-svn-id: https://svn.dealii.org/trunk@21425 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/numerics/theta_timestepping.h | 29 +++++++++++++++++++ .../numerics/theta_timestepping.templates.h | 4 +-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/deal.II/deal.II/include/numerics/theta_timestepping.h b/deal.II/deal.II/include/numerics/theta_timestepping.h index 33ce3b3b05..b1d3c21129 100644 --- a/deal.II/deal.II/include/numerics/theta_timestepping.h +++ b/deal.II/deal.II/include/numerics/theta_timestepping.h @@ -77,6 +77,35 @@ namespace Algorithms * the modified step sizes (and different times if the problem is not * autonomous). * + *

Usage of vectors in NamedData

+ * + * ThetaTimestepping uses NamedData for communicating vectors. With + * outer or inner Operator objects. It does not use itself the input + * vectors provided, but forwards them to the explicit and implicit + * operators. + * + * The explicit Operator #op_explicit receives in its input in first + * place the vector "Previous time", which is the solution + * value after the previous timestep. It is followed by all vectors + * provided to ThetaTimestepping::operator() as input + * argument. #op_explicit is supposed to write its result into the + * first position of its output argument, labeled "Result". + * + * The implicit Operator #op_implicit receives the result of + * #op_explicit in its first input vector labeled "Previous + * time". It is followed by all vectors provided to + * ThetaTimestepping::operator() as input argument. The output of + * #op_implicit is directly written into the output argument given to + * ThetaTimestepping. + * + *

Setup

+ * The use ThetaTimestepping is more complicated than for instance + * Newton, since the inner operators will usually need to access the + * TimeStepData. Thus, we have a circular dependency of information, + * and we include the following example for its use. First, we define + * the two operators + * + * * @author Guido Kanschat, 2010 */ template diff --git a/deal.II/deal.II/include/numerics/theta_timestepping.templates.h b/deal.II/deal.II/include/numerics/theta_timestepping.templates.h index 52b640b1f4..7b8c9c56bc 100644 --- a/deal.II/deal.II/include/numerics/theta_timestepping.templates.h +++ b/deal.II/deal.II/include/numerics/theta_timestepping.templates.h @@ -21,7 +21,7 @@ namespace Algorithms { template ThetaTimestepping::ThetaTimestepping (Operator& e, Operator& i) - : op_explicit(&e), op_implicit(&i) + : vtheta(0.5), adaptive(false), op_explicit(&e), op_implicit(&i) {} @@ -84,7 +84,7 @@ namespace Algorithms // The data provided to the inner // solver NamedData src2; - src2.add(p, "Previous time data"); + src2.add(p, "Previous time"); src2.merge(in); if (output != 0) -- 2.39.5