]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Limit output and remove the random testcase (which is no good one, since it will...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 20 Feb 1999 11:42:43 +0000 (11:42 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 20 Feb 1999 11:42:43 +0000 (11:42 +0000)
git-svn-id: https://svn.dealii.org/trunk@854 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/grid_test.cc

index 6f65a39724701b8c0867515b254ae276ddf6b127..e5da77e45cfb8a520d2e9a5422ecea3cee15003f 100644 (file)
@@ -20,7 +20,6 @@
 // 1: continuous refinement of the unit square always in the middle
 // 2: refinement of the circle at the boundary
 // 2: refinement of a wiggled area at the boundary
-// 4: random refinement
 
 
 
@@ -187,7 +186,7 @@ void test (const int test_case) {
        tria.execute_refinement ();
 
        Triangulation<dim>::active_cell_iterator cell;
-       for (int i=0; i<17; ++i) 
+       for (int i=0; i<(dim==2 ? 13 : 7); ++i) 
          {
                                             // refine the presently
                                             // second last cell 17
@@ -224,7 +223,7 @@ void test (const int test_case) {
        tria.execute_refinement ();
        
        Triangulation<dim>::active_cell_iterator cell, endc;
-       const unsigned int steps[4] = { 0, 10, 7, 2 };
+       const unsigned int steps[4] = { 0, 10, 5, 2 };
        for (unsigned int i=0; i<steps[dim]; ++i) 
          {
            cell = tria.begin_active();
@@ -242,35 +241,6 @@ void test (const int test_case) {
        tria.set_boundary (0);
        break;
       }
-
-      case 4:
-      {
-                                        // refine once
-       tria.begin_active()->set_refine_flag();
-       tria.execute_refinement ();
-       
-       Triangulation<dim>::active_cell_iterator cell, endc;
-       for (int i=0; i<(dim==2 ? 13 : (dim==3 ? 7 : 30)); ++i) 
-         {
-           int n_levels = tria.n_levels();
-           cell = tria.begin_active();
-           endc = tria.end();
-
-           for (; cell!=endc; ++cell) 
-             {
-               double r      = rand()*1.0/RAND_MAX,
-                      weight = 1.*
-                               (cell->level()*cell->level()) /
-                               (n_levels*n_levels);
-               
-               if (r <= 0.5*weight)
-                 cell->set_refine_flag ();
-             };
-           
-           tria.execute_refinement ();
-         };
-       break;  
-      }
     };
   
   
@@ -283,9 +253,12 @@ void test (const int test_case) {
 
 
 int main () {
-  for (unsigned int i=1; i<=4; ++i)
+                                  // limit output a bit
+  cout.precision (4);
+  
+  for (unsigned int i=1; i<=3; ++i)
     test<2> (i);
-  for (unsigned int i=1; i<=4; ++i)
+  for (unsigned int i=1; i<=3; ++i)
     test<3> (i);
   
   return 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.