]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Finish test. It doesn't work right now, of course...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 10 Jun 2008 20:48:46 +0000 (20:48 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 10 Jun 2008 20:48:46 +0000 (20:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@16288 0785d39b-7218-0410-832d-ea1e28bc413d

tests/fail/mesh_3d_22.cc
tests/fail/mesh_3d_22/mesh.msh [new file with mode: 0644]

index e0cdfd3ee41a88047db1ed291d98db179ccdecec..a6b0be6654accc5e2c4db9de91976466d521113c 100644 (file)
@@ -104,10 +104,9 @@ void test (Triangulation<dim>& triangulation)
                                             error,
                                             QGauss<dim>(q+2),
                                             VectorTools::L2_norm);
-         std::cout << fe.get_name() << ", P_" << q
-                   << ", rel. error=" << error.l2_norm() / interpolant.l2_norm()
-                   << " " << (((q<=p)&&!(error.l2_norm() < 1e-12*interpolant.l2_norm()))?"ASSERT":"")
-                   << std::endl;
+         deallog << fe.get_name() << ", P_" << q
+                 << ", rel. error=" << error.l2_norm() / interpolant.l2_norm()
+                 << std::endl;
          if (q<=p)
            Assert (error.l2_norm() < 1e-12*interpolant.l2_norm(),
                    ExcInternalError());
@@ -120,27 +119,29 @@ void test (Triangulation<dim>& triangulation)
 
 int main ()
 {
+  std::ofstream logfile ("mesh_3d_22/output");
+  deallog.attach(logfile);
   deallog.depth_console(0);
-  deallog.threshold_double(1.e-10);
+  deallog.threshold_double(1.0e-10);
 
   Triangulation<3> triangulation;
   GridIn<3> grid_in;
   grid_in.attach_triangulation(triangulation);
-  std::ifstream inputStream("mesh_3d_22/mesh");
-  grid_in.read(inputStream);
+  std::ifstream inputStream("mesh_3d_22/mesh.msh");
+  grid_in.read_msh (inputStream);
   test<3>(triangulation);
 
 
 /*  
-  MappingQ<3> mapping(3);
+    MappingQ<3> mapping(3);
 
-  FE_Q<3> fe(3);
-  DoFHandler<3> dofh(triangulation);
+    FE_Q<3> fe(3);
+    DoFHandler<3> dofh(triangulation);
 
 
-  dofh.distribute_dofs(fe);
+    dofh.distribute_dofs(fe);
 
-  {
+    {
     Vector<double> x(dofh.n_dofs());
     DataOut<3> data_out;
 
@@ -150,17 +151,17 @@ int main ()
 
     std::ofstream output("out.gpl");
     data_out.write(output, data_out.parse_output_format("gnuplot"));
-  }
+    }
 
-  Point<3> p;
-  for (double x=0;x<=1;x+=1.0/3.0)
+    Point<3> p;
+    for (double x=0;x<=1;x+=1.0/3.0)
     {
-      p(0)=x;
-      p(1)=1.0/3.0;
-      p(2)=0.0;
+    p(0)=x;
+    p(1)=1.0/3.0;
+    p(2)=0.0;
 
-      Point<3> r=mapping.transform_unit_to_real_cell(++triangulation.begin_active(),p);
-      std::cout << p << " > " << r << std::endl;
+    Point<3> r=mapping.transform_unit_to_real_cell(++triangulation.begin_active(),p);
+    deallog << p << " > " << r << std::endl;
     }
 */
 }
diff --git a/tests/fail/mesh_3d_22/mesh.msh b/tests/fail/mesh_3d_22/mesh.msh
new file mode 100644 (file)
index 0000000..1720c7a
--- /dev/null
@@ -0,0 +1,20 @@
+$NOD
+12
+1 1.5 0.2 0
+2 1.5 0.4 0
+3 1.5 0.6 0
+4 2.0 0.2 0
+5 2.0 0.4 0
+6 2.0 0.6 0
+7 1.5 0.2 0.205
+8 1.5 0.4 0.205
+9 1.5 0.6 0.205
+10 2.0 0.2 0.205
+11 2.0 0.4 0.205
+12 2.0 0.6 0.205
+$ENDNOD
+$ELM
+2
+1 5 30 1 8 5 6 3 2 11 12 9 8
+2 5 30 1 8 5 2 1 4 11 8 7 10
+$ENDELM

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.