From bea82cd3cc87afc8d2ca7a881bfaca5793d3d755 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Wed, 7 Jul 2010 14:56:48 +0000 Subject: [PATCH] ThetaTimestepping is running git-svn-id: https://svn.dealii.org/trunk@21458 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/doxygen/product_matrix.cc | 4 ++-- .../examples/doxygen/theta_timestepping.cc | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/deal.II/examples/doxygen/product_matrix.cc b/deal.II/examples/doxygen/product_matrix.cc index 931a1641ce..c71b81e6d5 100644 --- a/deal.II/examples/doxygen/product_matrix.cc +++ b/deal.II/examples/doxygen/product_matrix.cc @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- // $Id$ // -// Copyright (C) 2005, 2006 by the deal.II authors +// Copyright (C) 2005, 2006, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -10,7 +10,7 @@ // //--------------------------------------------------------------------------- -// See documentation of Product for documentation of this example +// See documentation of ProductMatrix for documentation of this example #include #include diff --git a/deal.II/examples/doxygen/theta_timestepping.cc b/deal.II/examples/doxygen/theta_timestepping.cc index 6f42cbd37f..a3c9436ef0 100644 --- a/deal.II/examples/doxygen/theta_timestepping.cc +++ b/deal.II/examples/doxygen/theta_timestepping.cc @@ -82,7 +82,10 @@ int main() Explicit::Explicit(const FullMatrix& M) : matrix(&M) -{} +{ + m.reinit(M.m(), M.n()); + m = M; +} void @@ -97,6 +100,7 @@ Explicit::operator() (NamedData*>& out, const NamedDatanotifications.print(deallog); deallog << std::endl; + this->notifications.clear(); unsigned int i = in.find("Previous time"); m.vmult(*out(0), *in(i)); } @@ -105,7 +109,9 @@ Explicit::operator() (NamedData*>& out, const NamedData& M) : matrix(&M) -{} +{ + m.reinit(M.m(), M.n()); +} void @@ -120,6 +126,15 @@ Implicit::operator() (NamedData*>& out, const NamedDatanotifications.print(deallog); deallog << std::endl; + if (this->notifications.test(Events::initial) || this->notifications.test(Events::new_timestep_size)) + { + m.equ(timestep_data->step, *matrix); + for (unsigned int i=0;inotifications.clear(); + unsigned int i = in.find("Previous time"); m.vmult(*out(0), *in(i)); } -- 2.39.5