]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add output for debugging
authorjanssen <janssen@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Mar 2010 00:09:56 +0000 (00:09 +0000)
committerjanssen <janssen@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Mar 2010 00:09:56 +0000 (00:09 +0000)
git-svn-id: https://svn.dealii.org/trunk@20803 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/multigrid.h

index 097526fcd9123eb3efe569293e92ff5d32d6417c..8442d467ef6b79a53b4b62891c2f0a7fa51ca5c4 100644 (file)
@@ -664,14 +664,30 @@ PreconditionMG<dim, VECTOR, TRANSFER>::vmult (
   VECTOR2& dst,
   const VECTOR2& src) const
 {
+#ifdef baerbel_mg_test
+  const unsigned int min_l = multigrid->solution.get_minlevel();
+  const unsigned int max_l = multigrid->solution.get_maxlevel();
+  deallog << "PreconditionMG in " << src.l2_norm() << std::endl;
+#endif
   transfer->copy_to_mg(*mg_dof_handler,
                       multigrid->defect,
                       src);
+#ifdef baerbel_mg_test
+  for(unsigned int l=min_l; l<max_l; ++l)
+  deallog << "defect [" << l << "] " << multigrid->defect[l].l2_norm() << std::endl;
+#endif
   multigrid->cycle();
+
+#ifdef baerbel_mg_test
+  for(unsigned int l=min_l; l<max_l; ++l)
+  deallog << "solution [" << l << "] " << multigrid->solution[l].l2_norm() << std::endl;
+#endif
   transfer->copy_from_mg(*mg_dof_handler,
                         dst,
                         multigrid->solution);
-
+#ifdef baerbel_mg_test
+  deallog << "PreconditionMG out " << dst.l2_norm() << std::endl;
+#endif
   /*
   DataOut<dim> data_out;
   data_out.attach_dof_handler (*mg_dof_handler);

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.