]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make theta_timestepping.cc work and make OutputOperator gnuplot compatible
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 8 Jul 2010 04:50:45 +0000 (04:50 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 8 Jul 2010 04:50:45 +0000 (04:50 +0000)
git-svn-id: https://svn.dealii.org/trunk@21462 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/operator.templates.h
deal.II/examples/doxygen/theta_timestepping.cc

index 79d4f5980dfaf4fd2372909e301a92c529065923..cf27cc2a91ca9754270325852c44842cbab3dcaf 100644 (file)
@@ -68,9 +68,10 @@ namespace Algorithms
     }
     else
     {
-      (*os) << ' ' << step << ' ';
+      (*os) << ' ' << step;
       for (unsigned int i=0;i<vectors.size();++i)
-        vectors(i)->print(*os);
+       for (unsigned int j=0;j<vectors(i)->size();++j)
+         (*os) << ' ' << (*vectors(i))(j);
       (*os) << std::endl;
     }
     return *this;
index ecf62e2d3f6f66acbfa696bb1b4747420c08c18d..f4daa804ae102df7b0c6c11060ce138b6cc836a6 100644 (file)
@@ -61,8 +61,8 @@ class Implicit
 int main()
 {
   FullMatrix<double> matrix(2);
-  matrix(0,0) = 0.;
-  matrix(1,1) = 0.;
+  matrix(0,0) = 1.;
+  matrix(1,1) = 1.;
   matrix(0,1) = 31.4;
   matrix(1,0) = -31.4;
 
@@ -109,10 +109,9 @@ Explicit::operator() (NamedData<Vector<double>*>& out, const NamedData<Vector<do
 {
   if (this->notifications.test(Events::initial) || this->notifications.test(Events::new_timestep_size))
     {
-      m.equ(timestep_data->step, *matrix);
+      m.equ(-timestep_data->step, *matrix);
       for (unsigned int i=0;i<m.m();++i)
        m(i,i) += 1.;
-      m.print_formatted(std::cerr);
     }
   this->notifications.clear();
   unsigned int i = in.find("Previous time");
@@ -144,7 +143,6 @@ Implicit::operator() (NamedData<Vector<double>*>& out, const NamedData<Vector<do
       for (unsigned int i=0;i<m.m();++i)
        m(i,i) += 1.;
       m.gauss_jordan();
-      m.print_formatted(std::cerr);
     }
   this->notifications.clear();
   

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.