]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Found a nasty bug in grid_out. It shows up also in DataOut
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Nov 2011 19:12:18 +0000 (19:12 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 21 Nov 2011 19:12:18 +0000 (19:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@24755 0785d39b-7218-0410-832d-ea1e28bc413d

tests/codim_one/mesh_bug.cc [new file with mode: 0644]
tests/codim_one/mesh_bug/cmp/generic [new file with mode: 0644]

diff --git a/tests/codim_one/mesh_bug.cc b/tests/codim_one/mesh_bug.cc
new file mode 100644 (file)
index 0000000..e067de3
--- /dev/null
@@ -0,0 +1,56 @@
+
+//----------------------------  mesh_bug.cc  ---------------------------
+//    $Id: testsuite.html 13373 2006-07-13 13:12:08Z kanschat $
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005 by 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_bug.cc  ---------------------------
+
+
+// a short (a few lines) description of what the program does
+
+#include "../tests.h"
+#include <fstream>
+#include <base/logstream.h>
+
+// all include files you need here
+
+
+#include <grid/tria.h>
+#include <grid/tria_accessor.h>
+#include <grid/grid_out.h>
+#include <grid/grid_in.h>
+#include <grid/tria_iterator.h>
+#include <grid/grid_generator.h>
+#include <grid/tria_boundary_lib.h>
+
+
+int main () 
+{
+  std::ofstream logfile("mesh_bug/output");
+
+  Triangulation<2,3> tria;
+  GridIn<2,3> gi;
+  gi.attach_triangulation(tria);
+  std::ifstream infile("mesh_bug/cmp/generic");
+  gi.read(infile);
+
+  const std::vector<Point<3> > &vertices = tria.get_vertices();
+
+  for(unsigned int i=0; i<vertices.size(); ++i)
+    if(vertices[i](2)>1e-7)
+      std::cout << "Error!" << std::endl;
+  
+  
+  GridOut go;
+  go.write_ucd(tria, logfile);
+
+  return 0;
+}
+                  
diff --git a/tests/codim_one/mesh_bug/cmp/generic b/tests/codim_one/mesh_bug/cmp/generic
new file mode 100644 (file)
index 0000000..32a2042
--- /dev/null
@@ -0,0 +1,6 @@
+4 1 0 0 0
+1  -1.25 0 -0.0195312
+2  -1.25 0 -0.00976562
+3  -1.09375 0.0288444 -0.0195312
+4  -1.09375 0.0291878 -0.00976562
+1 10 quad    3 1 2 4 

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.