]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add outut to identify grid
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 9 Nov 2010 16:03:25 +0000 (16:03 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 9 Nov 2010 16:03:25 +0000 (16:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@22647 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lib/test_grids.h

index 717435e10a2245ca80638d07e9938686cfed9f36..f5e44d56d7a28079356012025492140d673808ce 100644 (file)
@@ -64,15 +64,25 @@ namespace TestGrids
       tr.refine_global(refinement);
     if (refinement && local)
       {
-       for (typename Triangulation<dim>::active_cell_iterator
-              cell = tr.begin_active(); cell != tr.end(); ++cell)
+       tr.refine_global(1);
+       for (unsigned int i=1;i<refinement;++i)
          {
-           const Point<dim>& p = cell->center();
-           bool negative = true;
-           for (unsigned int d=0;d<dim;++d)
-             if (p(d) >= 0.)negative = false;
+           for (typename Triangulation<dim>::active_cell_iterator
+                  cell = tr.begin_active(); cell != tr.end(); ++cell)
+             {
+               const Point<dim>& p = cell->center();
+               bool negative = true;
+               for (unsigned int d=0;d<dim;++d)
+                 if (p(d) >= 0.)negative = false;
+             }
+           tr.execute_coarsening_and_refinement();
          }
       }
+    deallog << "Triangulation hypercube " << dim << "D refinement " << refinement;
+    if (local)
+      deallog << " local ";
+    deallog << " steps " << tr.n_active_cells() << " active cells "
+           << tr.n_cells() << " total cells " << std::endl;
   }
   
                                   /**

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.