]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add yet another test that is a further reduced version of the previous two.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 10 Jun 2008 21:07:41 +0000 (21:07 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 10 Jun 2008 21:07:41 +0000 (21:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@16291 0785d39b-7218-0410-832d-ea1e28bc413d

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

index dca693db26bf53ed8cbc98abd40bef0066d9df09..1666f74dfa61a6e34e08f5f0f9439ec5d9044f73 100644 (file)
@@ -80,18 +80,5 @@ int main ()
   data_out.build_patches(mapping, 3);
 
   data_out.write_gnuplot (deallog.get_file_stream());
-
-/*
-  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;
-
-      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_24.cc b/tests/fail/mesh_3d_24.cc
new file mode 100644 (file)
index 0000000..eed2ff4
--- /dev/null
@@ -0,0 +1,98 @@
+//----------------------------  mesh_3d_24.cc  ---------------------------
+//    $Id: mesh_3d_24.cc 15662 2008-01-24 05:31:14Z kanschat $
+//    Version: $Name$ 
+//
+//    Copyright (C) 2006, 2008 by Timo Heister and 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.
+//
+//----------------------------  mesh_3d_24.cc  ---------------------------
+
+
+// like mesh_3d_22, but even further reduced: take a few points on a
+// line in reference space and see where they are transformed to real
+// space using a MappingQ(3) on a cell with a flipped face. the cell
+// is a cube, so the points should also be mapped to a straight line,
+// but they are not, unfortunately, when this test was written.
+
+#include "../tests.h"
+
+#include <grid/tria.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+#include <grid/grid_generator.h>
+#include <grid/tria_boundary_lib.h>
+#include <grid/grid_out.h>
+#include <grid/grid_in.h>
+#include <lac/vector.h>
+#include <numerics/data_out.h>
+#include <base/quadrature_lib.h>
+#include <fe/mapping_q.h>
+#include <fe/fe_q.h>
+#include <fstream>
+#include <cmath>
+#include <base/function.h>
+#include <base/logstream.h>
+#include <base/quadrature_lib.h>
+#include <lac/vector.h>
+
+#include <grid/tria.h>
+#include <dofs/dof_handler.h>
+#include <grid/grid_generator.h>
+#include <grid/grid_refinement.h>
+#include <grid/tria_accessor.h>
+#include <grid/tria_iterator.h>
+#include <grid/tria_boundary_lib.h>
+#include <dofs/dof_accessor.h>
+#include <dofs/dof_tools.h>
+#include <numerics/vectors.h>
+#include <fe/fe_q.h>
+
+#include <fstream>
+#include <vector>
+
+
+int main ()
+{
+  std::ofstream logfile ("mesh_3d_24/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  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.msh");
+  grid_in.read_msh (inputStream);
+
+  MappingQ<3> mapping(3);
+
+  Triangulation<3>::active_cell_iterator cell;
+  cell = triangulation.begin_active();
+  ++cell;
+
+  for (unsigned int f=0; f<6; ++f)
+    deallog << "face: " << f
+           << std::endl
+           << "  Face orientation status: "
+           << cell->face_orientation (f)
+           << std::endl
+           << "  On boundary: " << cell->at_boundary(f)
+           << std::endl
+           << "  Neighbor: "
+           << (cell->at_boundary(f) ? triangulation.end() : cell->neighbor(f))
+           << std::endl;
+  
+  for (double x=0; x<=1; x+=1.0/3.0)
+    {
+      const Point<3> p(x, 1./3., 0);
+      deallog << p
+             << " in unit coordinates maps to real coordinates "
+             << mapping.transform_unit_to_real_cell(cell,p)
+             << std::endl;
+    }
+}
+
diff --git a/tests/fail/mesh_3d_24/mesh.msh b/tests/fail/mesh_3d_24/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.