]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
new tests for renumbering
authorjanssen <janssen@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Mar 2010 19:54:51 +0000 (19:54 +0000)
committerjanssen <janssen@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 12 Mar 2010 19:54:51 +0000 (19:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@20814 0785d39b-7218-0410-832d-ea1e28bc413d

tests/multigrid/Makefile
tests/multigrid/mg_output.cc [new file with mode: 0644]
tests/multigrid/mg_output/cmp/generic [new file with mode: 0644]
tests/multigrid/mg_renumbered_01.cc [new file with mode: 0644]
tests/multigrid/mg_renumbered_01/cmp/generic [new file with mode: 0644]
tests/multigrid/transfer_03.cc
tests/multigrid/transfer_04.cc [new file with mode: 0644]
tests/multigrid/transfer_04/cmp/generic [new file with mode: 0644]

index 4cbe75348f8b0e30393aecf1ed1bfe2b60bf18c8..2fdc3e6f448613824bacc6fe55a23c610df5f224 100644 (file)
@@ -23,7 +23,8 @@ default: run-tests
 
 tests_x = cycles dof_* count_* boundary_* renumbering_* \
        transfer* \
-       smoother_block
+       smoother_block \
+       mg_output
 
 # from above list of regular expressions, generate the real set of
 # tests
diff --git a/tests/multigrid/mg_output.cc b/tests/multigrid/mg_output.cc
new file mode 100644 (file)
index 0000000..6fc558d
--- /dev/null
@@ -0,0 +1,290 @@
+//----------------------------------------------------------------------------
+//    transfer.cc,v 1.13 2005/12/30 16:07:03 guido Exp
+//    Version:
+//
+//    Copyright (C) 2000 - 2007, 2009, 2010 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------------------------------------------------------
+
+// like _01 but on adaptively refined grid
+
+//TODO:[GK] Add checks for RT again!
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <base/function.h>
+#include <lac/constraint_matrix.h>
+#include <lac/vector.h>
+#include <lac/block_vector.h>
+#include <grid/tria.h>
+#include <grid/grid_generator.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+#include <grid/grid_out.h>
+#include <dofs/dof_renumbering.h>
+#include <dofs/dof_tools.h>
+#include <fe/fe_dgp.h>
+#include <fe/fe_dgq.h>
+#include <fe/fe_raviart_thomas.h>
+#include <fe/fe_q.h>
+#include <fe/fe_system.h>
+#include <multigrid/mg_dof_handler.h>
+#include <multigrid/mg_dof_accessor.h>
+#include <multigrid/mg_transfer.h>
+#include <multigrid/mg_tools.h>
+#include <multigrid/mg_level_object.h>
+
+#include <fstream>
+#include <iomanip>
+#include <iomanip>
+#include <algorithm>
+
+using namespace std;
+
+template <int dim, typename number, int spacedim>
+void
+reinit_vector (const dealii::MGDoFHandler<dim,spacedim> &mg_dof,
+              MGLevelObject<dealii::Vector<number> > &v)
+{
+  for (unsigned int level=v.get_minlevel();
+       level<=v.get_maxlevel();++level)
+    {
+      unsigned int n = mg_dof.n_dofs (level);
+      v[level].reinit(n);
+    }
+}
+
+
+template<int dim>
+void refine_mesh (Triangulation<dim> &triangulation)
+{
+  bool cell_refined = false;
+  for (typename Triangulation<dim>::active_cell_iterator
+      cell = triangulation.begin_active();
+      cell != triangulation.end(); ++cell)
+  {
+   for (unsigned int vertex=0;
+          vertex < GeometryInfo<dim>::vertices_per_cell;
+          ++vertex)
+      {
+        const Point<dim> p = cell->vertex(vertex);
+        const Point<dim> origin = (dim == 2 ?
+                                    Point<dim>(0,0) :
+                                    Point<dim>(0,0,0));
+        const double dist = p.distance(origin);
+        if(dist<0.25/M_PI)
+        {
+          cell->set_refine_flag ();
+          cell_refined = true;
+          break;
+        }
+      }
+  }
+  if(!cell_refined)//if no cell was selected for refinement, refine global
+    for (typename Triangulation<dim>::active_cell_iterator
+        cell = triangulation.begin_active();
+        cell != triangulation.end(); ++cell)
+      cell->set_refine_flag();
+  triangulation.execute_coarsening_and_refinement ();
+}
+
+template <int dim>
+void initialize (const MGDoFHandler<dim> &dof,
+    Vector<double> &u)
+{
+  unsigned int counter=0;
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  for (typename MGDoFHandler<dim>::active_cell_iterator
+      cell = dof.begin_active();
+      cell != dof.end(); ++cell)
+  {
+    cell->get_dof_indices(dof_indices);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      u(dof_indices[i]) = ++counter;
+  }
+}
+
+template <int dim>
+void initialize (const MGDoFHandler<dim> &dof,
+    MGLevelObject<Vector<double> > &u)
+{
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  const unsigned int dofs_per_face = dof.get_fe().dofs_per_face;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  std::vector<unsigned int> face_indices(dofs_per_face);
+
+  for(unsigned int l=0; l<dof.get_tria().n_levels(); ++l)
+  {
+    for (typename MGDoFHandler<dim>::cell_iterator
+        cell = dof.begin(l);
+        cell != dof.end(l); ++cell)
+    {
+      cell->get_mg_dof_indices(dof_indices);
+      for(unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
+      {
+        cell->face(f)->get_mg_dof_indices(cell->level(),face_indices);
+        if(cell->face(f)->at_boundary())
+        {
+          for(unsigned int i=0; i<dofs_per_face; ++i)
+            u[cell->level()](face_indices[i]) = 1;
+        }
+        else
+        {
+          for(unsigned int i=0; i<dofs_per_face; ++i)
+            if(u[cell->level()](face_indices[i]) != 1)
+              u[cell->level()](face_indices[i]) = 0;
+        }
+      }
+    }
+  }
+}
+
+template <int dim>
+void print (const MGDoFHandler<dim> &dof,
+    MGLevelObject<Vector<double> > &u)
+{
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  for(unsigned int l=0; l<dof.get_tria().n_levels(); ++l)
+  {
+    deallog << std::endl;
+    deallog << "Level " << l << std::endl;
+    for (typename MGDoFHandler<dim>::cell_iterator
+        cell = dof.begin(l);
+        cell != dof.end(l); ++cell)
+    {
+      cell->get_mg_dof_indices(dof_indices);
+      for(unsigned int i=0; i<dofs_per_cell; ++i)
+        deallog << ' ' << (int)u[l](dof_indices[i]);
+    }
+  }
+}
+
+template <int dim>
+void print_diff (const MGDoFHandler<dim> &dof_1, const MGDoFHandler<dim> &dof_2,
+    const Vector<double> &u, const Vector<double> &v)
+{
+  Vector<double> diff;
+  diff.reinit (u);
+  const unsigned int dofs_per_cell = dof_1.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices_1(dofs_per_cell);
+  std::vector<unsigned int> dof_indices_2(dofs_per_cell);
+  for (typename MGDoFHandler<dim>::active_cell_iterator
+      cell_1 = dof_1.begin_active(), cell_2 = dof_2.begin_active();
+      cell_1 != dof_1.end(); ++cell_1, ++cell_2)
+  {
+    cell_1->get_dof_indices(dof_indices_1);
+    cell_2->get_dof_indices(dof_indices_2);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      diff(dof_indices_1[i]) = u(dof_indices_1[i]) - v(dof_indices_2[i]);
+  }
+  deallog << std::endl;
+  deallog << "diff " << diff.l2_norm() << std::endl;
+}
+
+template <int dim>
+void check_simple(const FiniteElement<dim>& fe)
+{
+  deallog << fe.get_name() << std::endl;
+
+  Triangulation<dim> tr(Triangulation<dim>::limit_level_difference_at_vertices);
+  GridGenerator::hyper_cube(tr,-1,1);
+  tr.refine_global (1);
+  refine_mesh(tr);
+  refine_mesh(tr);
+  refine_mesh(tr);
+  refine_mesh(tr);
+  refine_mesh(tr);
+  refine_mesh(tr);
+
+  std::ostringstream out_filename;
+  out_filename << "gitter.eps";
+  std::ofstream grid_output (out_filename.str().c_str());
+  GridOut grid_out;
+  grid_out.write_eps (tr, grid_output);
+
+
+  MGDoFHandler<dim> mgdof(tr);
+  mgdof.distribute_dofs(fe);
+
+  MGDoFHandler<dim> mgdof_renumbered(tr);
+  mgdof_renumbered.distribute_dofs(fe);
+
+  ConstraintMatrix     hnc, hnc_renumbered;
+  hnc.clear ();
+  hnc_renumbered.clear ();
+  DoFTools::make_hanging_node_constraints (
+      mgdof, 
+      hnc);
+
+  DoFTools::make_hanging_node_constraints (
+      mgdof_renumbered, 
+      hnc_renumbered);
+  hnc.close ();
+  hnc_renumbered.close ();
+
+
+  std::vector<unsigned int> block_component (4,0);
+  block_component[2] = 1;
+  block_component[3] = 1;
+
+  DoFRenumbering::component_wise (mgdof_renumbered, block_component);
+  for (unsigned int level=0;level<tr.n_levels();++level)
+    DoFRenumbering::component_wise (mgdof_renumbered, level, block_component);
+
+  MGTransferPrebuilt<Vector<double> > transfer(hnc);
+  transfer.build_matrices(mgdof);
+
+  MGTransferPrebuilt<Vector<double> > transfer_renumbered(hnc_renumbered);
+  transfer_renumbered.build_matrices(mgdof_renumbered);
+
+  Vector<double> u(mgdof.n_dofs());
+  initialize(mgdof,u);
+
+  MGLevelObject<Vector<double> > v(0, tr.n_levels()-1);
+  reinit_vector(mgdof, v);
+
+  transfer.copy_to_mg(mgdof, v, u);
+  print(mgdof, v);
+
+  u=0;
+  initialize(mgdof, v);
+  for(unsigned int l=0; l<tr.n_levels()-1; ++l)
+    transfer.prolongate (l+1, v[l+1], v[l]);
+
+  transfer.copy_from_mg(mgdof, u, v);
+  Vector<double> diff = u;
+
+  initialize(mgdof_renumbered,u);
+  reinit_vector(mgdof_renumbered, v);
+  transfer_renumbered.copy_to_mg(mgdof_renumbered, v, u);
+  deallog << "copy_to_mg" << std::endl;
+  print(mgdof_renumbered, v);
+
+  u=0;
+  initialize(mgdof_renumbered, v);
+  for(unsigned int l=0; l<tr.n_levels()-1; ++l)
+    transfer_renumbered.prolongate (l+1, v[l+1], v[l]);
+
+  transfer_renumbered.copy_from_mg(mgdof_renumbered, u, v);
+  print_diff(mgdof_renumbered, mgdof, u, diff);
+}
+
+
+int main()
+{
+  std::ofstream logfile("mg_output/output");
+  deallog << std::setprecision(4);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  //check_simple (FESystem<2>(FE_Q<2>(1), 2));
+  check_simple (FESystem<2>(FE_Q<2>(1), 4));
+}
diff --git a/tests/multigrid/mg_output/cmp/generic b/tests/multigrid/mg_output/cmp/generic
new file mode 100644 (file)
index 0000000..2232bcf
--- /dev/null
@@ -0,0 +1,155 @@
+
+DEAL::FE_DGP<2>(0)
+DEAL::u0       1.500
+DEAL::u1       4.500
+DEAL::u2       16.50
+DEAL::u1       64.50
+DEAL::u0       256.5
+DEAL::u0       0.5000
+DEAL::u1       0.5000
+DEAL::u2       0.5000
+DEAL::u1       0.5000
+DEAL::u0       0.5000
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+DEAL::diff 0
+DEAL::FE_DGP<2>(1)
+DEAL::u0       3.500
+DEAL::u1       12.50
+DEAL::u2       48.50
+DEAL::u1       192.5
+DEAL::u0       768.5
+DEAL::u0       5.500
+DEAL::u1       20.50
+DEAL::u2       80.50
+DEAL::u1       320.5
+DEAL::u0       1281.
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL::diff 0
+DEAL::FE_DGQ<2>(1)
+DEAL::u0       4.500
+DEAL::u1       16.50
+DEAL::u2       64.50
+DEAL::u1       256.5
+DEAL::u0       1025.
+DEAL::u0       14.50
+DEAL::u1       46.50
+DEAL::u2       174.5
+DEAL::u1       676.5
+DEAL::u0       2485.
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
+DEAL::diff 0
+DEAL::FE_DGQ<2>(2)
+DEAL::u0       9.500
+DEAL::u1       36.50
+DEAL::u2       144.5
+DEAL::u1       946.1
+DEAL::u0       4774.
+DEAL::u0       204.5
+DEAL::u1       726.5
+DEAL::u2       2814.
+DEAL::u1       1.797e+04
+DEAL::u0       8.262e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL::diff 0
+DEAL::FE_Q<2>(1)
+DEAL::u0       4.500
+DEAL::u1       9.500
+DEAL::u2       25.50
+DEAL::u1       72.75
+DEAL::u0       156.8
+DEAL::u0       14.50
+DEAL::u1       28.25
+DEAL::u2       72.38
+DEAL::u1       196.3
+DEAL::u0       400.9
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
+DEAL::diff 0
+DEAL::FE_Q<2>(2)
+DEAL::u0       9.500
+DEAL::u1       25.50
+DEAL::u2       81.50
+DEAL::u1       320.0
+DEAL::u0       1197.
+DEAL::u0       204.5
+DEAL::u1       770.7
+DEAL::u2       2855.
+DEAL::u1       1.217e+04
+DEAL::u0       4.986e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
+DEAL::diff 0
+DEAL::FESystem<2>[FE_DGQ<2>(1)^2]
+DEAL::u0       8.500
+DEAL::u1       32.50
+DEAL::u2       128.5
+DEAL::u1       512.5
+DEAL::u0       2048.
+DEAL::u0       140.5
+DEAL::u1       540.5
+DEAL::u2       2140.
+DEAL::u1       8521.
+DEAL::u0       3.364e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
+DEAL::diff 0
+DEAL::FESystem<2>[FE_DGP<2>(1)^2-FE_DGQ<2>(1)^3]
+DEAL::u0       18.50
+DEAL::u1       72.50
+DEAL::u2       288.5
+DEAL::u1       1152.
+DEAL::u0       4608.
+DEAL::u0       1786.
+DEAL::u1       7110.
+DEAL::u2       2.841e+04
+DEAL::u1       1.136e+05
+DEAL::u0       4.537e+05
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
+DEAL::diff 0
+DEAL::FE_RaviartThomasNodal<2>(1)
+DEAL::u0       12.50
+DEAL::u1       10.50
+DEAL::u2       9.500
+DEAL::u1       9.438
+DEAL::u0       9.148
+DEAL::u0       506.5
+DEAL::u1       517.7
+DEAL::u2       510.1
+DEAL::u1       532.4
+DEAL::u0       548.0
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL::diff 0
+DEAL::FE_DGQ<3>(1)
+DEAL::u0       8.500
+DEAL::u1       64.50
+DEAL::u2       512.5
+DEAL::u1       4096.
+DEAL::u0       3.277e+04
+DEAL::u0       140.5
+DEAL::u1       952.5
+DEAL::u2       7280.
+DEAL::u1       5.690e+04
+DEAL::u0       4.256e+05
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
+DEAL::diff 0
+DEAL::FE_Q<3>(2)
+DEAL::u0       27.50
+DEAL::u1       125.5
+DEAL::u2       729.5
+DEAL::u1       5712.
+DEAL::u0       4.140e+04
+DEAL::u0       6202.
+DEAL::u1       4.165e+04
+DEAL::u2       2.836e+05
+DEAL::u1       2.429e+06
+DEAL::u0       1.942e+07
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729
+DEAL::diff 0
diff --git a/tests/multigrid/mg_renumbered_01.cc b/tests/multigrid/mg_renumbered_01.cc
new file mode 100644 (file)
index 0000000..aed8881
--- /dev/null
@@ -0,0 +1,547 @@
+#define baerbel_mg_test 1
+
+#include <base/quadrature_lib.h>
+#include <base/function.h>
+#include <base/logstream.h>
+#include <base/utilities.h>
+
+#include <lac/constraint_matrix.h>
+#include <lac/vector.h>
+#include <lac/full_matrix.h>
+#include <lac/sparse_matrix.h>
+#include <lac/sparse_ilu.h>
+#include <lac/solver_cg.h>
+#include <lac/solver_gmres.h>
+#include <lac/precondition.h>
+
+#include <grid/tria.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+#include <grid/tria_boundary_lib.h>
+#include <grid/grid_generator.h>
+#include <grid/grid_out.h>
+
+#include <dofs/dof_handler.h>
+#include <dofs/dof_accessor.h>
+#include <dofs/dof_renumbering.h>
+#include <dofs/dof_tools.h>
+
+#include <fe/fe_q.h>
+#include <fe/fe_system.h>
+#include <fe/fe_values.h>
+
+#include <numerics/vectors.h>
+#include <numerics/matrices.h>
+#include <numerics/data_out.h>
+
+#include <multigrid/multigrid.h>
+#include <multigrid/mg_dof_handler.h>
+#include <multigrid/mg_dof_accessor.h>
+#include <multigrid/mg_transfer.h>
+#include <multigrid/mg_transfer_component.h>
+#include <multigrid/mg_tools.h>
+#include <multigrid/mg_coarse.h>
+#include <multigrid/mg_smoother.h>
+#include <multigrid/mg_matrix.h>
+
+#include <fstream>
+#include <sstream>
+
+using namespace dealii;
+
+
+template <int dim, typename number, int spacedim>
+void
+reinit_vector (const dealii::MGDoFHandler<dim,spacedim> &mg_dof,
+              MGLevelObject<dealii::Vector<number> > &v)
+{
+  for (unsigned int level=v.get_minlevel();
+       level<=v.get_maxlevel();++level)
+    {
+      unsigned int n = mg_dof.n_dofs (level);
+      v[level].reinit(n);
+    }
+}
+
+template <int dim>
+void initialize (const MGDoFHandler<dim> &dof,
+    Vector<double> &u)
+{
+  unsigned int counter=0;
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  for (typename MGDoFHandler<dim>::active_cell_iterator
+      cell = dof.begin_active();
+      cell != dof.end(); ++cell)
+  {
+    cell->get_dof_indices(dof_indices);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      u(dof_indices[i]) = ++counter;
+  }
+}
+
+
+
+template <int dim>
+void initialize (const MGDoFHandler<dim> &dof,
+    MGLevelObject<Vector<double> > &u)
+{
+  unsigned int counter=0;
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  typename MGDoFHandler<dim>::cell_iterator
+      cell = dof.begin(0);
+    cell->get_mg_dof_indices(dof_indices);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      u[0](dof_indices[i]) = ++counter;
+}
+
+
+template <int dim>
+void print_diff (const MGDoFHandler<dim> &dof_1, const MGDoFHandler<dim> &dof_2,
+    const Vector<double> &u, const Vector<double> &v)
+{
+  Vector<double> diff;
+  diff.reinit (u);
+  const unsigned int dofs_per_cell = dof_1.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices_1(dofs_per_cell);
+  std::vector<unsigned int> dof_indices_2(dofs_per_cell);
+  for (typename MGDoFHandler<dim>::active_cell_iterator
+      cell_1 = dof_1.begin_active(), cell_2 = dof_2.begin_active();
+      cell_1 != dof_1.end(); ++cell_1, ++cell_2)
+  {
+    cell_1->get_dof_indices(dof_indices_1);
+    cell_2->get_dof_indices(dof_indices_2);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      diff(dof_indices_1[i]) = u(dof_indices_1[i]) - v(dof_indices_2[i]);
+  }
+  std::cout << std::endl;
+  std::cout << "diff " << diff.l2_norm() << std::endl;
+}
+
+template <int dim>
+void print(const MGDoFHandler<dim> &dof, std::vector<std::vector<bool> > &interface_dofs)
+{
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  for(unsigned int l=0; l<dof.get_tria().n_levels(); ++l)
+  {
+    deallog << std::endl;
+    deallog << "Level " << l << std::endl;
+    for (typename MGDoFHandler<dim>::cell_iterator
+        cell = dof.begin(l);
+        cell != dof.end(l); ++cell)
+    {
+      cell->get_mg_dof_indices(dof_indices);
+      for(unsigned int i=0; i<dofs_per_cell; ++i)
+        deallog << ' ' << interface_dofs[l][dof_indices[i]];
+    }
+  }
+}
+
+
+template <int dim>
+class LaplaceProblem 
+{
+  public:
+    LaplaceProblem (const unsigned int deg);
+    void run ();
+
+  private:
+    void setup_system ();
+    void assemble_multigrid (const MGDoFHandler<dim> &mg_dof, 
+        MGLevelObject<SparseMatrix<double> > &matrices,
+        std::vector<std::set<unsigned int> > 
+        &boundary_indices);
+    void test ();
+    void test_renumber ();
+    void test_interface_dofs ();
+    void refine_local ();
+
+    Triangulation<dim>   triangulation;
+    FESystem<dim>            fe;
+    MGDoFHandler<dim>    mg_dof_handler;
+    MGDoFHandler<dim>    mg_dof_handler_renumbered;
+
+    MGLevelObject<SparsityPattern> mg_sparsity_renumbered;
+    MGLevelObject<SparseMatrix<double> > mg_matrices_renumbered;
+    MGLevelObject<SparsityPattern> mg_sparsity;
+    MGLevelObject<SparseMatrix<double> > mg_matrices;
+
+    const unsigned int degree;
+
+    std::vector<std::set<unsigned int> > 
+    boundary_indices;
+
+    std::vector<std::set<unsigned int> > 
+    boundary_indices_renumbered;
+};
+
+
+template <int dim>
+LaplaceProblem<dim>::LaplaceProblem (const unsigned int deg) :
+  triangulation (Triangulation<dim>::limit_level_difference_at_vertices),
+  fe (FE_Q<dim> (deg),2, FE_Q<dim> (deg),2),
+  mg_dof_handler (triangulation),
+  mg_dof_handler_renumbered (triangulation),
+  degree(deg)
+{}
+
+
+  template <int dim>
+void LaplaceProblem<dim>::setup_system ()
+{
+  mg_dof_handler.distribute_dofs (fe);
+  mg_dof_handler_renumbered.distribute_dofs (fe);
+
+  std::vector<unsigned int> block_component (2*dim,0);
+  for(unsigned int c=dim; c<2*dim; ++c)
+    block_component[c] = 1;
+
+  const unsigned int nlevels = triangulation.n_levels();
+
+  DoFHandler<dim> &dof = mg_dof_handler_renumbered;
+  DoFRenumbering::component_wise (dof, block_component);
+  //DoFRenumbering::Cuthill_McKee (dof);
+  for (unsigned int level=0;level<nlevels;++level)
+  {
+    DoFRenumbering::component_wise (mg_dof_handler_renumbered, level, block_component);
+    //DoFRenumbering::Cuthill_McKee (mg_dof_handler_renumbered, level);
+  }
+
+  deallog << "Number of degrees of freedom: "
+    << mg_dof_handler.n_dofs();
+
+  for (unsigned int l=0;l<triangulation.n_levels();++l)
+    deallog << "   " << 'L' << l << ": "
+      << mg_dof_handler.n_dofs(l);
+  deallog  << std::endl;
+
+  boundary_indices.resize(triangulation.n_levels());
+  boundary_indices_renumbered.resize(triangulation.n_levels());
+
+  mg_matrices.resize(0, nlevels-1);
+  mg_matrices.clear ();
+  mg_matrices_renumbered.resize(0, nlevels-1);
+  mg_matrices_renumbered.clear ();
+  mg_sparsity.resize(0, nlevels-1);
+  mg_sparsity_renumbered.resize(0, nlevels-1);
+
+  for (unsigned int level=0;level<nlevels;++level)
+  {
+    mg_sparsity[level].reinit (mg_dof_handler.n_dofs(level),
+        mg_dof_handler.n_dofs(level),
+        mg_dof_handler.max_couplings_between_dofs());
+    mg_sparsity_renumbered[level].reinit (mg_dof_handler_renumbered.n_dofs(level),
+        mg_dof_handler_renumbered.n_dofs(level),
+        mg_dof_handler_renumbered.max_couplings_between_dofs());
+    MGTools::make_sparsity_pattern (mg_dof_handler, mg_sparsity[level], level);
+    MGTools::make_sparsity_pattern (mg_dof_handler_renumbered, 
+        mg_sparsity_renumbered[level], level);
+    mg_sparsity[level].compress();
+    mg_sparsity_renumbered[level].compress();
+    mg_matrices[level].reinit(mg_sparsity[level]);
+    mg_matrices_renumbered[level].reinit(mg_sparsity_renumbered[level]);
+  }
+}
+
+  template <int dim>
+void LaplaceProblem<dim>::assemble_multigrid (const MGDoFHandler<dim> &mgdof,
+    MGLevelObject<SparseMatrix<double> > &mgmatrices,
+    std::vector<std::set<unsigned int> > &boundaryindices) 
+{  
+  QGauss<dim>  quadrature_formula(1+degree);
+
+  FEValues<dim> fe_values (fe, quadrature_formula, 
+      update_values   | update_gradients |
+      update_quadrature_points | update_JxW_values);
+
+  const unsigned int   dofs_per_cell   = fe.dofs_per_cell;
+  const unsigned int   dofs_per_face   = fe.dofs_per_face;
+  const unsigned int   n_q_points      = quadrature_formula.size();
+
+  FullMatrix<double>   cell_matrix (dofs_per_cell, dofs_per_cell);
+
+  std::vector<unsigned int> local_dof_indices (dofs_per_cell);
+  std::vector<unsigned int> face_dof_indices (dofs_per_face);
+
+
+  std::vector<std::vector<bool> > interface_dofs;
+  std::vector<std::vector<bool> > boundary_interface_dofs;
+  for (unsigned int level = 0; level<triangulation.n_levels(); ++level)
+  {
+    std::vector<bool> tmp (mgdof.n_dofs(level));
+    interface_dofs.push_back (tmp);
+    boundary_interface_dofs.push_back (tmp);
+  }
+
+  MGTools::extract_inner_interface_dofs(mgdof, 
+      interface_dofs, boundary_interface_dofs);
+
+  typename FunctionMap<dim>::type      dirichlet_boundary;
+  ZeroFunction<dim>                    dirichlet_bc(fe.n_components());
+  dirichlet_boundary[0] =             &dirichlet_bc;
+
+  MGTools::make_boundary_list (mgdof, dirichlet_boundary,
+                              boundaryindices);
+
+  std::vector<ConstraintMatrix> boundary_constraints (triangulation.n_levels());
+  for (unsigned int level=0; level<triangulation.n_levels(); ++level)
+    {
+      for (unsigned int i=0; i<boundary_interface_dofs[level].size(); ++i)
+        if(!(boundary_interface_dofs[level][i] && 
+            boundaryindices[level].find(i) != boundaryindices[level].end()))
+          boundary_interface_dofs[level][i] = false;
+
+      boundary_constraints[level].add_lines (interface_dofs[level]);
+      boundary_constraints[level].add_lines (boundaryindices[level]);
+      boundary_constraints[level].close ();
+    }
+
+  typename MGDoFHandler<dim>::cell_iterator cell = mgdof.begin(),
+           endc = mgdof.end();
+
+  for (; cell!=endc; ++cell)
+  {
+    const unsigned int level = cell->level();
+    cell_matrix = 0;
+
+    fe_values.reinit (cell);
+    for (unsigned int q_point=0; q_point<n_q_points; ++q_point)
+      for (unsigned int i=0; i<dofs_per_cell; ++i)
+      {
+        for (unsigned int j=0; j<dofs_per_cell; ++j)
+        {
+          for (unsigned int d=0; d<fe.n_components(); ++d)
+            cell_matrix(i,j) += (fe_values.shape_grad_component(j,q_point,d)
+              * fe_values.shape_grad_component(i,q_point,d))
+              * fe_values.JxW(q_point);
+        }
+      }
+
+//    cell->get_mg_dof_indices (local_dof_indices);
+//      boundary_constraints[level]
+//     .distribute_local_to_global (cell_matrix,
+//                                  local_dof_indices,
+//                                  mgmatrices[level]);
+
+  }
+}
+
+  template <int dim>
+void LaplaceProblem<dim>::test_interface_dofs () 
+{
+  std::vector<std::vector<bool> > interface_dofs;
+  std::vector<std::vector<bool> > boundary_interface_dofs;
+  for (unsigned int level = 0; level<triangulation.n_levels(); ++level)
+  {
+    std::vector<bool> tmp (mg_dof_handler.n_dofs(level));
+    interface_dofs.push_back (tmp);
+    boundary_interface_dofs.push_back (tmp);
+  }
+
+  MGTools::extract_inner_interface_dofs(mg_dof_handler_renumbered, 
+      interface_dofs, boundary_interface_dofs);
+  deallog << "1. Test" << std::endl;
+  print(mg_dof_handler_renumbered, interface_dofs);
+
+  deallog << std::endl;
+
+  MGTools::extract_inner_interface_dofs(mg_dof_handler, 
+      interface_dofs, boundary_interface_dofs);
+
+  deallog << "2. Test" << std::endl;
+  print(mg_dof_handler, interface_dofs);
+}
+
+  template <int dim>
+void LaplaceProblem<dim>::test_renumber () 
+{
+  std::vector<std::vector<bool> > v(triangulation.n_levels());
+  for(unsigned int l=0; l<triangulation.n_levels(); ++l)
+  {
+    v[l].resize(mg_dof_handler_renumbered.n_dofs(l));
+    std::fill (v[l].begin(), v[l].end(), false);
+  }
+
+  const unsigned int dofs_per_cell = 
+    mg_dof_handler_renumbered.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  for (typename MGDoFHandler<dim>::cell_iterator
+      cell = mg_dof_handler_renumbered.begin();
+      cell != mg_dof_handler_renumbered.end(); ++cell)
+  {
+    cell->get_mg_dof_indices(dof_indices);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      v[cell->level()][dof_indices[i]] = true;
+  }
+  for(unsigned int l=0; l<triangulation.n_levels(); ++l)
+  {
+    deallog << "Level " << l << std::endl;
+    for(unsigned int dof=0; dof<mg_dof_handler_renumbered.n_dofs(l);
+        ++dof)
+      if(!v[l][dof])
+        deallog << "FALSE " << dof << std::endl;
+  }
+}
+
+
+  template <int dim>
+void LaplaceProblem<dim>::test () 
+{
+  assemble_multigrid(mg_dof_handler, mg_matrices, 
+      boundary_indices);
+  assemble_multigrid(mg_dof_handler_renumbered, 
+      mg_matrices_renumbered, boundary_indices_renumbered);
+  
+  const unsigned int min_l = mg_matrices.get_minlevel();
+  const unsigned int max_l = mg_matrices.get_maxlevel();
+  for(unsigned int l=min_l; l<max_l; ++l)
+  {
+    mg_matrices[l] = IdentityMatrix(mg_dof_handler.n_dofs(l));
+    mg_matrices_renumbered[l] = IdentityMatrix(mg_dof_handler.n_dofs(l));
+  }
+
+  GrowingVectorMemory<>   vector_memory;
+  GrowingVectorMemory<>   vector_memory_renumbered;
+
+  MGTransferPrebuilt<Vector<double> > mg_transfer;
+  mg_transfer.build_matrices(mg_dof_handler, boundary_indices);
+  MGTransferPrebuilt<Vector<double> > mg_transfer_renumbered;
+  mg_transfer_renumbered.build_matrices(mg_dof_handler_renumbered, boundary_indices_renumbered);
+  FullMatrix<double> coarse_matrix;
+  coarse_matrix.copy_from (mg_matrices[0]);
+  MGCoarseGridHouseholder<double, Vector<double> > mg_coarse;
+  mg_coarse.initialize(coarse_matrix);
+
+  FullMatrix<double> coarse_matrix_renumered;
+  coarse_matrix_renumered.copy_from (mg_matrices_renumbered[0]);
+  MGCoarseGridHouseholder<double, Vector<double> > mg_coarse_renumbered;
+  mg_coarse_renumbered.initialize(coarse_matrix_renumered);
+
+  typedef PreconditionIdentity RELAXATION;
+  MGSmootherPrecondition<SparseMatrix<double>, RELAXATION, Vector<double> >
+    mg_smoother(vector_memory);
+
+  MGSmootherPrecondition<SparseMatrix<double>, RELAXATION, Vector<double> >
+    mg_smoother_renumbered(vector_memory_renumbered);
+
+  RELAXATION::AdditionalData smoother_data;
+  mg_smoother.initialize(mg_matrices, smoother_data);
+  mg_smoother_renumbered.initialize(mg_matrices_renumbered, smoother_data);
+
+  mg_smoother.set_steps(1);
+  mg_smoother_renumbered.set_steps(1);
+
+  MGMatrix<SparseMatrix<double>, Vector<double> >
+    mg_matrix(&mg_matrices);
+
+  MGMatrix<SparseMatrix<double>, Vector<double> >
+    mg_matrix_renumbered(&mg_matrices_renumbered);
+
+  Multigrid<Vector<double> > mg(mg_dof_handler,
+      mg_matrix,
+      mg_coarse,
+      mg_transfer,
+      mg_smoother,
+      mg_smoother);
+
+  Multigrid<Vector<double> > mg_renumbered(mg_dof_handler_renumbered,
+      mg_matrix_renumbered,
+      mg_coarse_renumbered,
+      mg_transfer_renumbered,
+      mg_smoother_renumbered,
+      mg_smoother_renumbered);
+
+  PreconditionMG<dim, Vector<double>,
+    MGTransferPrebuilt<Vector<double> > >
+      preconditioner(mg_dof_handler, mg, mg_transfer);
+
+  PreconditionMG<dim, Vector<double>,
+    MGTransferPrebuilt<Vector<double> > >
+      preconditioner_renumbered(mg_dof_handler_renumbered, 
+          mg_renumbered, mg_transfer_renumbered);
+
+  Vector<double> test, dst, dst_renumbered;
+  test.reinit(mg_dof_handler.n_dofs());
+  dst.reinit(test);
+  dst_renumbered.reinit(test);
+
+  initialize(mg_dof_handler, test);
+  std::cout << "1. Test " << test.l2_norm() << std::endl;
+  preconditioner.vmult(dst, test);
+  std::cout << "1. Test " << dst.l2_norm() << std::endl;
+
+  initialize(mg_dof_handler_renumbered, test);
+  std::cout << "2. Test " << test.l2_norm() << std::endl;
+  preconditioner_renumbered.vmult(dst_renumbered, test);
+  std::cout << "2. Test " << dst_renumbered.l2_norm() << std::endl;
+
+  print_diff (mg_dof_handler_renumbered, mg_dof_handler, dst_renumbered, dst);
+}
+
+
+
+
+  template <int dim>
+void LaplaceProblem<dim>::refine_local ()
+{
+  bool cell_refined = false;
+  for (typename Triangulation<dim>::active_cell_iterator
+      cell = triangulation.begin_active();
+      cell != triangulation.end(); ++cell)
+  {
+      for (unsigned int vertex=0;
+          vertex < GeometryInfo<dim>::vertices_per_cell;
+          ++vertex)
+      {
+        const Point<dim> p = cell->vertex(vertex);
+        const Point<dim> origin = (dim == 2 ?
+                                    Point<dim>(0,0) :
+                                    Point<dim>(0,0,0));
+        const double dist = p.distance(origin);
+        if(dist<0.25/M_PI)
+        {
+          cell->set_refine_flag ();
+          cell_refined = true;
+          break;
+        }
+      }
+  }
+  //Wenn nichts verfeinert wurde bisher, global verfeinern!
+  if(!cell_refined)
+    for (typename Triangulation<dim>::active_cell_iterator
+        cell = triangulation.begin_active();
+        cell != triangulation.end(); ++cell)
+      cell->set_refine_flag();
+
+
+  triangulation.execute_coarsening_and_refinement ();
+}
+
+  template <int dim>
+void LaplaceProblem<dim>::run () 
+{
+  for (unsigned int cycle=0; cycle<7; ++cycle)
+  {
+    deallog << "Cycle " << cycle << std::endl;
+
+    if (cycle == 0)
+    {
+      GridGenerator::hyper_cube(triangulation, -1, 1);
+      triangulation.refine_global (1);
+    }
+    //triangulation.refine_global (1);
+    refine_local ();
+    setup_system ();
+    test();
+  };
+}
+
+int main () 
+{
+  LaplaceProblem<2> laplace_problem_2d(1);
+  laplace_problem_2d.run ();
+
+  return 0;
+}
diff --git a/tests/multigrid/mg_renumbered_01/cmp/generic b/tests/multigrid/mg_renumbered_01/cmp/generic
new file mode 100644 (file)
index 0000000..2232bcf
--- /dev/null
@@ -0,0 +1,155 @@
+
+DEAL::FE_DGP<2>(0)
+DEAL::u0       1.500
+DEAL::u1       4.500
+DEAL::u2       16.50
+DEAL::u1       64.50
+DEAL::u0       256.5
+DEAL::u0       0.5000
+DEAL::u1       0.5000
+DEAL::u2       0.5000
+DEAL::u1       0.5000
+DEAL::u0       0.5000
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+DEAL::diff 0
+DEAL::FE_DGP<2>(1)
+DEAL::u0       3.500
+DEAL::u1       12.50
+DEAL::u2       48.50
+DEAL::u1       192.5
+DEAL::u0       768.5
+DEAL::u0       5.500
+DEAL::u1       20.50
+DEAL::u2       80.50
+DEAL::u1       320.5
+DEAL::u0       1281.
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL::diff 0
+DEAL::FE_DGQ<2>(1)
+DEAL::u0       4.500
+DEAL::u1       16.50
+DEAL::u2       64.50
+DEAL::u1       256.5
+DEAL::u0       1025.
+DEAL::u0       14.50
+DEAL::u1       46.50
+DEAL::u2       174.5
+DEAL::u1       676.5
+DEAL::u0       2485.
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
+DEAL::diff 0
+DEAL::FE_DGQ<2>(2)
+DEAL::u0       9.500
+DEAL::u1       36.50
+DEAL::u2       144.5
+DEAL::u1       946.1
+DEAL::u0       4774.
+DEAL::u0       204.5
+DEAL::u1       726.5
+DEAL::u2       2814.
+DEAL::u1       1.797e+04
+DEAL::u0       8.262e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL::diff 0
+DEAL::FE_Q<2>(1)
+DEAL::u0       4.500
+DEAL::u1       9.500
+DEAL::u2       25.50
+DEAL::u1       72.75
+DEAL::u0       156.8
+DEAL::u0       14.50
+DEAL::u1       28.25
+DEAL::u2       72.38
+DEAL::u1       196.3
+DEAL::u0       400.9
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
+DEAL::diff 0
+DEAL::FE_Q<2>(2)
+DEAL::u0       9.500
+DEAL::u1       25.50
+DEAL::u2       81.50
+DEAL::u1       320.0
+DEAL::u0       1197.
+DEAL::u0       204.5
+DEAL::u1       770.7
+DEAL::u2       2855.
+DEAL::u1       1.217e+04
+DEAL::u0       4.986e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
+DEAL::diff 0
+DEAL::FESystem<2>[FE_DGQ<2>(1)^2]
+DEAL::u0       8.500
+DEAL::u1       32.50
+DEAL::u2       128.5
+DEAL::u1       512.5
+DEAL::u0       2048.
+DEAL::u0       140.5
+DEAL::u1       540.5
+DEAL::u2       2140.
+DEAL::u1       8521.
+DEAL::u0       3.364e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
+DEAL::diff 0
+DEAL::FESystem<2>[FE_DGP<2>(1)^2-FE_DGQ<2>(1)^3]
+DEAL::u0       18.50
+DEAL::u1       72.50
+DEAL::u2       288.5
+DEAL::u1       1152.
+DEAL::u0       4608.
+DEAL::u0       1786.
+DEAL::u1       7110.
+DEAL::u2       2.841e+04
+DEAL::u1       1.136e+05
+DEAL::u0       4.537e+05
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
+DEAL::diff 0
+DEAL::FE_RaviartThomasNodal<2>(1)
+DEAL::u0       12.50
+DEAL::u1       10.50
+DEAL::u2       9.500
+DEAL::u1       9.438
+DEAL::u0       9.148
+DEAL::u0       506.5
+DEAL::u1       517.7
+DEAL::u2       510.1
+DEAL::u1       532.4
+DEAL::u0       548.0
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL::diff 0
+DEAL::FE_DGQ<3>(1)
+DEAL::u0       8.500
+DEAL::u1       64.50
+DEAL::u2       512.5
+DEAL::u1       4096.
+DEAL::u0       3.277e+04
+DEAL::u0       140.5
+DEAL::u1       952.5
+DEAL::u2       7280.
+DEAL::u1       5.690e+04
+DEAL::u0       4.256e+05
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
+DEAL::diff 0
+DEAL::FE_Q<3>(2)
+DEAL::u0       27.50
+DEAL::u1       125.5
+DEAL::u2       729.5
+DEAL::u1       5712.
+DEAL::u0       4.140e+04
+DEAL::u0       6202.
+DEAL::u1       4.165e+04
+DEAL::u2       2.836e+05
+DEAL::u1       2.429e+06
+DEAL::u0       1.942e+07
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729
+DEAL::diff 0
index b06d91c9c8a8469d4bfb5358c601a13190af635e..ad369a378b335c24de4be2422087329c10567398 100644 (file)
@@ -13,8 +13,8 @@
 
 // like _01 but on adaptively refined grid
 
-//TODO:[GK] Add checks for RT again!
 
+//TODO:[GK] Add checks for RT again!
 #include "../tests.h"
 #include <base/logstream.h>
 #include <lac/vector.h>
@@ -142,7 +142,6 @@ void print (const MGDoFHandler<dim> &dof,
         deallog << ' ' << (int)u[l](dof_indices[i]);
     }
   }
-  deallog << std::endl;
 }
 
 template <int dim>
@@ -154,17 +153,17 @@ void print_diff (const MGDoFHandler<dim> &dof_1, const MGDoFHandler<dim> &dof_2,
   const unsigned int dofs_per_cell = dof_1.get_fe().dofs_per_cell;
   std::vector<unsigned int> dof_indices_1(dofs_per_cell);
   std::vector<unsigned int> dof_indices_2(dofs_per_cell);
-    for (typename MGDoFHandler<dim>::active_cell_iterator
-        cell_1 = dof_1.begin_active(), cell_2 = dof_2.begin_active();
-        cell_1 != dof_1.end(); ++cell_1, ++cell_2)
-    {
-      cell_1->get_dof_indices(dof_indices_1);
-      cell_2->get_dof_indices(dof_indices_2);
-      for(unsigned int i=0; i<dofs_per_cell; ++i)
-        diff(dof_indices_1[i]) = u(dof_indices_1[i]) - v(dof_indices_2[i]);
-    }
-  deallog << "diff " << diff.l2_norm() << std::endl;
+  for (typename MGDoFHandler<dim>::active_cell_iterator
+      cell_1 = dof_1.begin_active(), cell_2 = dof_2.begin_active();
+      cell_1 != dof_1.end(); ++cell_1, ++cell_2)
+  {
+    cell_1->get_dof_indices(dof_indices_1);
+    cell_2->get_dof_indices(dof_indices_2);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      diff(dof_indices_1[i]) = u(dof_indices_1[i]) - v(dof_indices_2[i]);
+  }
   deallog << std::endl;
+  deallog << "diff " << diff.l2_norm() << std::endl;
 }
 
 template <int dim>
@@ -172,20 +171,15 @@ void check_simple(const FiniteElement<dim>& fe)
 {
   deallog << fe.get_name() << std::endl;
 
-  Triangulation<dim> tr;
+  Triangulation<dim> tr(Triangulation<dim>::limit_level_difference_at_vertices);
   GridGenerator::hyper_cube(tr,-1,1);
+  tr.refine_global (1);
+  refine_mesh(tr);
   refine_mesh(tr);
   refine_mesh(tr);
   refine_mesh(tr);
   refine_mesh(tr);
   refine_mesh(tr);
-  //tr.refine_global(2);
-
-  std::ostringstream out_filename;
-  out_filename << "gitter.eps";
-  std::ofstream grid_output (out_filename.str().c_str());
-  GridOut grid_out;
-  grid_out.write_eps (tr, grid_output);
 
 
   MGDoFHandler<dim> mgdof(tr);
@@ -194,8 +188,9 @@ void check_simple(const FiniteElement<dim>& fe)
   MGDoFHandler<dim> mgdof_renumbered(tr);
   mgdof_renumbered.distribute_dofs(fe);
 
-  std::vector<unsigned int> block_component (2,0);
-  block_component[1] = 1;
+  std::vector<unsigned int> block_component (4,0);
+  block_component[2] = 1;
+  block_component[3] = 1;
 
   DoFRenumbering::component_wise (mgdof_renumbered, block_component);
   for (unsigned int level=0;level<tr.n_levels();++level)
@@ -205,16 +200,17 @@ void check_simple(const FiniteElement<dim>& fe)
   transfer.build_matrices(mgdof);
 
   MGTransferPrebuilt<Vector<double> > transfer_renumbered;
-  transfer_renumbered.build_matrices(mgdof_renumbered);
+  transfer_renumbered.build_matrices(mgdof_renumbered); 
 
   Vector<double> u(mgdof.n_dofs());
   initialize(mgdof,u);
+  deallog << "initialize " << u.l2_norm() << std::endl;
 
   MGLevelObject<Vector<double> > v(0, tr.n_levels()-1);
   reinit_vector(mgdof, v);
 
   transfer.copy_to_mg(mgdof, v, u);
-  print(mgdof, v);
+  //print(mgdof, v);
 
   u=0;
   initialize(mgdof, v);
@@ -225,9 +221,12 @@ void check_simple(const FiniteElement<dim>& fe)
   Vector<double> diff = u;
 
   initialize(mgdof_renumbered,u);
+  deallog << "initialize " << u.l2_norm() << std::endl;
+
   reinit_vector(mgdof_renumbered, v);
   transfer_renumbered.copy_to_mg(mgdof_renumbered, v, u);
-  print(mgdof_renumbered, v);
+  deallog << "copy_to_mg" << std::endl;
+  //print(mgdof_renumbered, v);
 
   u=0;
   initialize(mgdof_renumbered, v);
@@ -236,8 +235,6 @@ void check_simple(const FiniteElement<dim>& fe)
 
   transfer_renumbered.copy_from_mg(mgdof_renumbered, u, v);
   print_diff(mgdof_renumbered, mgdof, u, diff);
-
-  deallog << std::endl;
 }
 
 
@@ -249,5 +246,6 @@ int main()
   deallog.depth_console(0);
   deallog.threshold_double(1.e-10);
 
-  check_simple (FESystem<2>(FE_Q<2>(1), 2));
+  //check_simple (FESystem<2>(FE_Q<2>(1), 2));
+  check_simple (FESystem<2>(FE_Q<2>(1), 4));
 }
diff --git a/tests/multigrid/transfer_04.cc b/tests/multigrid/transfer_04.cc
new file mode 100644 (file)
index 0000000..ea3fb3b
--- /dev/null
@@ -0,0 +1,350 @@
+//----------------------------------------------------------------------------
+//    transfer.cc,v 1.13 2005/12/30 16:07:03 guido Exp
+//    Version:
+//
+//    Copyright (C) 2000 - 2007, 2009, 2010 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------------------------------------------------------
+
+// like _01 but on adaptively refined grid
+
+//TODO:[GK] Add checks for RT again!
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <lac/vector.h>
+#include <lac/block_vector.h>
+#include <lac/precondition.h>
+#include <grid/tria.h>
+#include <grid/grid_generator.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+#include <grid/grid_out.h>
+#include <dofs/dof_renumbering.h>
+#include <dofs/dof_tools.h>
+#include <fe/fe_dgp.h>
+#include <fe/fe_dgq.h>
+#include <fe/fe_raviart_thomas.h>
+#include <fe/fe_q.h>
+#include <fe/fe_system.h>
+#include <multigrid/mg_dof_handler.h>
+#include <multigrid/mg_dof_accessor.h>
+#include <multigrid/mg_transfer.h>
+#include <multigrid/mg_tools.h>
+#include <multigrid/mg_smoother.h>
+#include <multigrid/mg_level_object.h>
+
+#include <fstream>
+#include <iomanip>
+#include <iomanip>
+#include <algorithm>
+
+using namespace std;
+
+
+template <typename number>
+class ScalingMatrix : public Subscriptor
+{
+  public:
+                                    /**
+                                     * Constructor setting the
+                                     * scaling factor. Default is
+                                     * constructing the identity
+                                     * matrix.
+                                     */
+    ScalingMatrix(number scaling_factor = 1.);
+                                    /**
+                                     * Apply preconditioner.
+                                     */
+    template<class VECTOR>
+    void vmult (VECTOR&, const VECTOR&) const;
+
+                                    /**
+                                     * Apply transpose
+                                     * preconditioner. Since this is
+                                     * the identity, this function is
+                                     * the same as
+                                     * vmult().
+                                     */
+    template<class VECTOR>
+    void Tvmult (VECTOR&, const VECTOR&) const;
+                                    /**
+                                     * Apply preconditioner, adding to the previous value.
+                                     */
+    template<class VECTOR>
+    void vmult_add (VECTOR&, const VECTOR&) const;
+
+                                    /**
+                                     * Apply transpose
+                                     * preconditioner, adding. Since this is
+                                     * the identity, this function is
+                                     * the same as
+                                     * vmult_add().
+                                     */
+    template<class VECTOR>
+    void Tvmult_add (VECTOR&, const VECTOR&) const;
+
+  private:
+    number factor;
+};
+
+
+//----------------------------------------------------------------------//
+
+template<typename number>
+ScalingMatrix<number>::ScalingMatrix(number factor)
+               :
+               factor(factor)
+{}
+
+
+template<typename number>
+template<class VECTOR>
+inline void
+ScalingMatrix<number>::vmult (VECTOR &dst, const VECTOR &src) const
+{
+  dst.equ(factor, src);
+}
+
+template<typename number>
+template<class VECTOR>
+inline void
+ScalingMatrix<number>::Tvmult (VECTOR &dst, const VECTOR &src) const
+{
+  dst.equ(factor, src);
+}
+
+template<typename number>
+template<class VECTOR>
+inline void
+ScalingMatrix<number>::vmult_add (VECTOR &dst, const VECTOR &src) const
+{
+  dst.add(factor, src);
+}
+
+
+
+template<typename number>
+template<class VECTOR>
+inline void
+ScalingMatrix<number>::Tvmult_add (VECTOR &dst, const VECTOR &src) const
+{
+  dst.add(factor, src);
+}
+
+template <int dim, typename number, int spacedim>
+void
+reinit_vector (const dealii::MGDoFHandler<dim,spacedim> &mg_dof,
+              MGLevelObject<dealii::Vector<number> > &v)
+{
+  for (unsigned int level=v.get_minlevel();
+       level<=v.get_maxlevel();++level)
+    {
+      unsigned int n = mg_dof.n_dofs (level);
+      v[level].reinit(n);
+    }
+
+}
+
+
+template<int dim>
+void refine_mesh (Triangulation<dim> &triangulation)
+{
+  bool cell_refined = false;
+  for (typename Triangulation<dim>::active_cell_iterator
+      cell = triangulation.begin_active();
+      cell != triangulation.end(); ++cell)
+  {
+   for (unsigned int vertex=0;
+          vertex < GeometryInfo<dim>::vertices_per_cell;
+          ++vertex)
+      {
+        const Point<dim> p = cell->vertex(vertex);
+        const Point<dim> origin = (dim == 2 ?
+                                    Point<dim>(0,0) :
+                                    Point<dim>(0,0,0));
+        const double dist = p.distance(origin);
+        if(dist<0.25/M_PI)
+        {
+          cell->set_refine_flag ();
+          cell_refined = true;
+          break;
+        }
+      }
+  }
+  if(!cell_refined)//if no cell was selected for refinement, refine global
+    for (typename Triangulation<dim>::active_cell_iterator
+        cell = triangulation.begin_active();
+        cell != triangulation.end(); ++cell)
+      cell->set_refine_flag();
+  triangulation.execute_coarsening_and_refinement ();
+}
+
+template <int dim>
+void initialize (const MGDoFHandler<dim> &dof,
+    Vector<double> &u)
+{
+  unsigned int counter=0;
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  for (typename MGDoFHandler<dim>::active_cell_iterator
+      cell = dof.begin_active();
+      cell != dof.end(); ++cell)
+  {
+    cell->get_dof_indices(dof_indices);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      u(dof_indices[i]) = ++counter;
+  }
+}
+
+template <int dim>
+void initialize (const MGDoFHandler<dim> &dof,
+    MGLevelObject<Vector<double> > &u)
+{
+  unsigned int counter=0;
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  typename MGDoFHandler<dim>::cell_iterator
+      cell = dof.begin(0);
+    cell->get_mg_dof_indices(dof_indices);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      u[0](dof_indices[i]) = ++counter;
+}
+
+template <int dim>
+void print (const MGDoFHandler<dim> &dof,
+    MGLevelObject<Vector<double> > &u)
+{
+  const unsigned int dofs_per_cell = dof.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices(dofs_per_cell);
+  for(unsigned int l=0; l<dof.get_tria().n_levels(); ++l)
+  {
+    deallog << std::endl;
+    deallog << "Level " << l << std::endl;
+    for (typename MGDoFHandler<dim>::cell_iterator
+        cell = dof.begin(l);
+        cell != dof.end(l); ++cell)
+    {
+      cell->get_mg_dof_indices(dof_indices);
+      for(unsigned int i=0; i<dofs_per_cell; ++i)
+        deallog << ' ' << (int)u[l](dof_indices[i]);
+    }
+  }
+}
+
+template <int dim>
+void print_diff (const MGDoFHandler<dim> &dof_1, const MGDoFHandler<dim> &dof_2,
+    const Vector<double> &u, const Vector<double> &v)
+{
+  Vector<double> diff;
+  diff.reinit (u);
+  const unsigned int dofs_per_cell = dof_1.get_fe().dofs_per_cell;
+  std::vector<unsigned int> dof_indices_1(dofs_per_cell);
+  std::vector<unsigned int> dof_indices_2(dofs_per_cell);
+  for (typename MGDoFHandler<dim>::active_cell_iterator
+      cell_1 = dof_1.begin_active(), cell_2 = dof_2.begin_active();
+      cell_1 != dof_1.end(); ++cell_1, ++cell_2)
+  {
+    cell_1->get_dof_indices(dof_indices_1);
+    cell_2->get_dof_indices(dof_indices_2);
+    for(unsigned int i=0; i<dofs_per_cell; ++i)
+      diff(dof_indices_1[i]) = u(dof_indices_1[i]) - v(dof_indices_2[i]);
+  }
+  deallog << std::endl;
+  deallog << "diff " << diff.l2_norm() << std::endl;
+}
+
+template <int dim>
+void check_smoother(const FiniteElement<dim>& fe)
+{
+  deallog << fe.get_name() << std::endl;
+
+  Triangulation<dim> tr;
+  GridGenerator::hyper_cube(tr,-1,1);
+  refine_mesh(tr);
+  refine_mesh(tr);
+
+  //std::ostringstream out_filename;
+  //out_filename << "gitter.eps";
+  //std::ofstream grid_output (out_filename.str().c_str());
+  //GridOut grid_out;
+  //grid_out.write_eps (tr, grid_output);
+
+
+  MGDoFHandler<dim> mgdof(tr);
+  mgdof.distribute_dofs(fe);
+
+  MGDoFHandler<dim> mgdof_renumbered(tr);
+  mgdof_renumbered.distribute_dofs(fe);
+
+  std::vector<unsigned int> block_component (2,0);
+  block_component[1] = 1;
+
+  DoFRenumbering::component_wise (mgdof_renumbered, block_component);
+  for (unsigned int level=0;level<tr.n_levels();++level)
+    DoFRenumbering::component_wise (mgdof_renumbered, level, block_component);
+
+  ScalingMatrix<double> s1(-1);
+  ScalingMatrix<double> s2(2.);
+  ScalingMatrix<double> s8(8.);
+  
+  MGLevelObject<ScalingMatrix<double> > matrices(0, tr.n_levels()-1);
+  matrices[0] = s1;
+  matrices[1] = s2;
+  matrices[2] = s8;
+
+  typedef PreconditionJacobi<ScalingMatrix<double> > RELAX;
+  MGSmootherPrecondition<ScalingMatrix, RELAX, Vector<double> > smoother(mem);
+  RELAX::AdditionalData smoother_data;
+  smoother.initialize(matrices, smoother_data);
+  smoother.set_steps(1);
+
+  smoother.smooth(level,u,rhs);
+
+  Vector<double> u(mgdof.n_dofs());
+  initialize(mgdof,u);
+
+  MGLevelObject<Vector<double> > v(0, tr.n_levels()-1);
+  reinit_vector(mgdof, v);
+
+  transfer.copy_to_mg(mgdof, v, u);
+  print(mgdof, v);
+
+  u=0;
+  initialize(mgdof, v);
+  for(unsigned int l=0; l<tr.n_levels()-1; ++l)
+    transfer.prolongate (l+1, v[l+1], v[l]);
+
+  transfer.copy_from_mg(mgdof, u, v);
+  Vector<double> diff = u;
+
+  initialize(mgdof_renumbered,u);
+  reinit_vector(mgdof_renumbered, v);
+  transfer_renumbered.copy_to_mg(mgdof_renumbered, v, u);
+  print(mgdof_renumbered, v);
+
+  u=0;
+  initialize(mgdof_renumbered, v);
+  for(unsigned int l=0; l<tr.n_levels()-1; ++l)
+    transfer_renumbered.prolongate (l+1, v[l+1], v[l]);
+
+  transfer_renumbered.copy_from_mg(mgdof_renumbered, u, v);
+  print_diff(mgdof_renumbered, mgdof, u, diff);
+}
+
+
+int main()
+{
+  std::ofstream logfile("transfer_04/output");
+  deallog << std::setprecision(4);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  check_simple (FESystem<2>(FE_Q<2>(1), 2));
+}
diff --git a/tests/multigrid/transfer_04/cmp/generic b/tests/multigrid/transfer_04/cmp/generic
new file mode 100644 (file)
index 0000000..2232bcf
--- /dev/null
@@ -0,0 +1,155 @@
+
+DEAL::FE_DGP<2>(0)
+DEAL::u0       1.500
+DEAL::u1       4.500
+DEAL::u2       16.50
+DEAL::u1       64.50
+DEAL::u0       256.5
+DEAL::u0       0.5000
+DEAL::u1       0.5000
+DEAL::u2       0.5000
+DEAL::u1       0.5000
+DEAL::u0       0.5000
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
+DEAL::diff 0
+DEAL::FE_DGP<2>(1)
+DEAL::u0       3.500
+DEAL::u1       12.50
+DEAL::u2       48.50
+DEAL::u1       192.5
+DEAL::u0       768.5
+DEAL::u0       5.500
+DEAL::u1       20.50
+DEAL::u2       80.50
+DEAL::u1       320.5
+DEAL::u0       1281.
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
+DEAL::diff 0
+DEAL::FE_DGQ<2>(1)
+DEAL::u0       4.500
+DEAL::u1       16.50
+DEAL::u2       64.50
+DEAL::u1       256.5
+DEAL::u0       1025.
+DEAL::u0       14.50
+DEAL::u1       46.50
+DEAL::u2       174.5
+DEAL::u1       676.5
+DEAL::u0       2485.
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
+DEAL::diff 0
+DEAL::FE_DGQ<2>(2)
+DEAL::u0       9.500
+DEAL::u1       36.50
+DEAL::u2       144.5
+DEAL::u1       946.1
+DEAL::u0       4774.
+DEAL::u0       204.5
+DEAL::u1       726.5
+DEAL::u2       2814.
+DEAL::u1       1.797e+04
+DEAL::u0       8.262e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL::diff 0
+DEAL::FE_Q<2>(1)
+DEAL::u0       4.500
+DEAL::u1       9.500
+DEAL::u2       25.50
+DEAL::u1       72.75
+DEAL::u0       156.8
+DEAL::u0       14.50
+DEAL::u1       28.25
+DEAL::u2       72.38
+DEAL::u1       196.3
+DEAL::u0       400.9
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
+DEAL::diff 0
+DEAL::FE_Q<2>(2)
+DEAL::u0       9.500
+DEAL::u1       25.50
+DEAL::u2       81.50
+DEAL::u1       320.0
+DEAL::u0       1197.
+DEAL::u0       204.5
+DEAL::u1       770.7
+DEAL::u2       2855.
+DEAL::u1       1.217e+04
+DEAL::u0       4.986e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
+DEAL::diff 0
+DEAL::FESystem<2>[FE_DGQ<2>(1)^2]
+DEAL::u0       8.500
+DEAL::u1       32.50
+DEAL::u2       128.5
+DEAL::u1       512.5
+DEAL::u0       2048.
+DEAL::u0       140.5
+DEAL::u1       540.5
+DEAL::u2       2140.
+DEAL::u1       8521.
+DEAL::u0       3.364e+04
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
+DEAL::diff 0
+DEAL::FESystem<2>[FE_DGP<2>(1)^2-FE_DGQ<2>(1)^3]
+DEAL::u0       18.50
+DEAL::u1       72.50
+DEAL::u2       288.5
+DEAL::u1       1152.
+DEAL::u0       4608.
+DEAL::u0       1786.
+DEAL::u1       7110.
+DEAL::u2       2.841e+04
+DEAL::u1       1.136e+05
+DEAL::u0       4.537e+05
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
+DEAL::diff 0
+DEAL::FE_RaviartThomasNodal<2>(1)
+DEAL::u0       12.50
+DEAL::u1       10.50
+DEAL::u2       9.500
+DEAL::u1       9.438
+DEAL::u0       9.148
+DEAL::u0       506.5
+DEAL::u1       517.7
+DEAL::u2       510.1
+DEAL::u1       532.4
+DEAL::u0       548.0
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
+DEAL::diff 0
+DEAL::FE_DGQ<3>(1)
+DEAL::u0       8.500
+DEAL::u1       64.50
+DEAL::u2       512.5
+DEAL::u1       4096.
+DEAL::u0       3.277e+04
+DEAL::u0       140.5
+DEAL::u1       952.5
+DEAL::u2       7280.
+DEAL::u1       5.690e+04
+DEAL::u0       4.256e+05
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
+DEAL::diff 0
+DEAL::FE_Q<3>(2)
+DEAL::u0       27.50
+DEAL::u1       125.5
+DEAL::u2       729.5
+DEAL::u1       5712.
+DEAL::u0       4.140e+04
+DEAL::u0       6202.
+DEAL::u1       4.165e+04
+DEAL::u2       2.836e+05
+DEAL::u1       2.429e+06
+DEAL::u0       1.942e+07
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729
+DEAL:: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729
+DEAL::diff 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.