]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reduce amount of output.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 29 Sep 2003 15:16:52 +0000 (15:16 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 29 Sep 2003 15:16:52 +0000 (15:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@8049 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/mesh_3d_6.cc
tests/bits/mesh_3d_7.cc
tests/bits/mesh_3d_8.cc

index b912f098facd0f33872cd36a9d2c26fee26ddc02..98cc8898c86262e8dcb3e9ee9765020846c936ac 100644 (file)
@@ -41,6 +41,8 @@ void check_this (Triangulation<3> &tria)
 
   DoFHandler<3> dof_handler (tria);
   dof_handler.distribute_dofs (fe);
+
+  unsigned int global_face = 0;
   
                                    // look at all faces, not only
                                    // active ones
@@ -54,13 +56,28 @@ void check_this (Triangulation<3> &tria)
           fe_face_values1.reinit (cell, f);
           fe_face_values2.reinit (cell->neighbor(f), nn);
 
-          deallog << "Cell " << cell << ", face " << f
-                  << " << n=" << fe_face_values1.normal_vector(0)
-                  << " << nx=" << fe_face_values2.normal_vector(0)
-                  << std::endl;
-
-          Assert (fe_face_values1.normal_vector(0) ==
-                  - fe_face_values2.normal_vector(0),
+                                           // in order to reduce
+                                           // output file size, only
+                                           // write every seventeenth
+                                           // normal vector. if the
+                                           // normals differ anyway,
+                                           // then the assertion below
+                                           // will catch this, and if
+                                           // we compute _all_ normals
+                                           // wrongly, then outputting
+                                           // some will be ok, I guess
+          if (global_face++ % 17 == 0)
+            deallog << "Cell " << cell << ", face " << f
+                    << " n=" << fe_face_values1.normal_vector(0)
+                    << std::endl;
+
+                                           // normal vectors should be
+                                           // in opposite directions,
+                                           // so their sum should be
+                                           // close to zero
+          Assert ((fe_face_values1.normal_vector(0) +
+                  fe_face_values2.normal_vector(0)).square()
+                  < 1e-20,
                   ExcInternalError());
         }          
 }
index 4e35cf2c1f157cd4a1ed52b2ad8541f7abef15ce..9d5433033a0e30ee525df649b420fd073bfb4cd5 100644 (file)
@@ -43,6 +43,8 @@ void check_this (Triangulation<3> &tria)
   DoFHandler<3> dof_handler (tria);
   dof_handler.distribute_dofs (fe);
 
+  unsigned int global_datum = 0;
+  
                                    // look at all faces, not only
                                    // active ones
   for (DoFHandler<3>::cell_iterator cell=dof_handler.begin();
@@ -60,16 +62,30 @@ void check_this (Triangulation<3> &tria)
 
           for (unsigned int q=0; q<quadrature.n_quadrature_points; ++q)
             {
-              deallog << "  " << fe_face_values1.quadrature_point(q)
-                      << ", " << fe_face_values1.JxW(q)
-                      << std::endl;
+                                               // in order to reduce
+                                               // output file size,
+                                               // only write every
+                                               // 289th datum. if the
+                                               // values differ
+                                               // anyway, then the
+                                               // assertion below will
+                                               // catch this, and if
+                                               // we compute _all_
+                                               // values wrongly, then
+                                               // outputting some will
+                                               // be ok, I guess
+              if (global_datum++ % 17*17 == 0)
+                deallog << "  " << fe_face_values1.quadrature_point(q)
+                        << ", " << fe_face_values1.JxW(q)
+                        << std::endl;
               
-              Assert (fe_face_values1.quadrature_point(q) ==
-                      fe_face_values2.quadrature_point(q),
+              Assert ((fe_face_values1.quadrature_point(q)-
+                       fe_face_values2.quadrature_point(q)).square()
+                      < 1e-20,
                       ExcInternalError());
 
-              Assert (fe_face_values1.JxW(q) ==
-                      fe_face_values2.JxW(q),
+              Assert (std::fabs(fe_face_values1.JxW(q)-
+                                fe_face_values2.JxW(q)) < 1e-15,
                       ExcInternalError());
             }
         }
index 9b7be4a7c51ab578b9a0fb9c34efd31ac842f5b9..4117f882846af25a66cc399941dd421c7da4298b 100644 (file)
@@ -38,17 +38,15 @@ void check_this (Triangulation<3> &tria)
   for (Triangulation<3>::cell_iterator cell=tria.begin();
        cell != tria.end(); ++cell)
     {
-      deallog << "  Cell=" << cell << std::endl;
-      
       std::set<Triangulation<3>::line_iterator> lines;
       for (unsigned int l=0; l<GeometryInfo<3>::lines_per_cell; ++l)
         {
           Assert (lines.find (cell->line(l)) == lines.end(),
                   ExcInternalError());
           lines.insert (cell->line(l));
-          deallog << "    line(" << l << ")=" << cell->line(l) << std::endl;
         }
     }
+  deallog << "    ok." << 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.