]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Tests for the previous commit.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 14 Jul 2014 22:20:47 +0000 (22:20 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 14 Jul 2014 22:20:47 +0000 (22:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@33173 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/grid_out_06.cc [new file with mode: 0644]
tests/deal.II/grid_out_06.output [new file with mode: 0644]

diff --git a/tests/deal.II/grid_out_06.cc b/tests/deal.II/grid_out_06.cc
new file mode 100644 (file)
index 0000000..97f712a
--- /dev/null
@@ -0,0 +1,65 @@
+// ---------------------------------------------------------------------
+// $Id$
+//
+// Copyright (C) 2002 - 2014 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE at
+// the top level of the deal.II distribution.
+//
+// ---------------------------------------------------------------------
+
+
+// test GridOut::write_vtk
+
+#include "../tests.h"
+#include <deal.II/base/geometry_info.h>
+#include <deal.II/dofs/dof_handler.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_boundary.h>
+#include <deal.II/grid/tria_boundary_lib.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/base/logstream.h>
+
+#include <fstream>
+#include <iomanip>
+
+
+std::ofstream logfile("output");
+
+
+template <int dim, int spacedim>
+void test ()
+{
+  Triangulation<dim,spacedim> tria;
+  GridGenerator::hyper_cube (tria);
+  tria.refine_global (1);
+
+  GridOut grid_out;
+  grid_out.write_vtk (tria, logfile);
+}
+
+
+int main ()
+{
+  deallog << std::setprecision (2);
+  logfile << std::setprecision (2);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test<1,1> ();
+  test<1,2> ();
+  test<2,2> ();
+  test<2,3> ();
+  test<3,3> ();
+}
+
diff --git a/tests/deal.II/grid_out_06.output b/tests/deal.II/grid_out_06.output
new file mode 100644 (file)
index 0000000..13bdc06
--- /dev/null
@@ -0,0 +1,185 @@
+
+# vtk DataFile Version 3.0
+#This file was generated 
+ASCII
+DATASET UNSTRUCTURED_GRID
+
+POINTS 4 double
+0.0 0 0
+0.50 0 0
+0.50 0 0
+1.0 0 0
+
+CELLS 2 6
+2      0       1
+2      2       3
+
+CELL_TYPES 2
+ 3 3
+POINT_DATA 4
+# vtk DataFile Version 3.0
+#This file was generated 
+ASCII
+DATASET UNSTRUCTURED_GRID
+
+POINTS 4 double
+0.0 0.0 0
+0.50 0.0 0
+0.50 0.0 0
+1.0 0.0 0
+
+CELLS 2 6
+2      0       1
+2      2       3
+
+CELL_TYPES 2
+ 3 3
+POINT_DATA 4
+# vtk DataFile Version 3.0
+#This file was generated 
+ASCII
+DATASET UNSTRUCTURED_GRID
+
+POINTS 16 double
+0.0 0.0 0
+0.50 0.0 0
+0.0 0.50 0
+0.50 0.50 0
+0.50 0.0 0
+1.0 0.0 0
+0.50 0.50 0
+1.0 0.50 0
+0.0 0.50 0
+0.50 0.50 0
+0.0 1.0 0
+0.50 1.0 0
+0.50 0.50 0
+1.0 0.50 0
+0.50 1.0 0
+1.0 1.0 0
+
+CELLS 4 20
+4      0       1       3       2
+4      4       5       7       6
+4      8       9       11      10
+4      12      13      15      14
+
+CELL_TYPES 4
+ 9 9 9 9
+POINT_DATA 16
+# vtk DataFile Version 3.0
+#This file was generated 
+ASCII
+DATASET UNSTRUCTURED_GRID
+
+POINTS 16 double
+0.0 0.0 0.0
+0.50 0.0 0.0
+0.0 0.50 0.0
+0.50 0.50 0.0
+0.50 0.0 0.0
+1.0 0.0 0.0
+0.50 0.50 0.0
+1.0 0.50 0.0
+0.0 0.50 0.0
+0.50 0.50 0.0
+0.0 1.0 0.0
+0.50 1.0 0.0
+0.50 0.50 0.0
+1.0 0.50 0.0
+0.50 1.0 0.0
+1.0 1.0 0.0
+
+CELLS 4 20
+4      0       1       3       2
+4      4       5       7       6
+4      8       9       11      10
+4      12      13      15      14
+
+CELL_TYPES 4
+ 9 9 9 9
+POINT_DATA 16
+# vtk DataFile Version 3.0
+#This file was generated 
+ASCII
+DATASET UNSTRUCTURED_GRID
+
+POINTS 64 double
+0.0 0.0 0.0
+0.50 0.0 0.0
+0.0 0.50 0.0
+0.50 0.50 0.0
+0.0 0.0 0.50
+0.50 0.0 0.50
+0.0 0.50 0.50
+0.50 0.50 0.50
+0.50 0.0 0.0
+1.0 0.0 0.0
+0.50 0.50 0.0
+1.0 0.50 0.0
+0.50 0.0 0.50
+1.0 0.0 0.50
+0.50 0.50 0.50
+1.0 0.50 0.50
+0.0 0.50 0.0
+0.50 0.50 0.0
+0.0 1.0 0.0
+0.50 1.0 0.0
+0.0 0.50 0.50
+0.50 0.50 0.50
+0.0 1.0 0.50
+0.50 1.0 0.50
+0.50 0.50 0.0
+1.0 0.50 0.0
+0.50 1.0 0.0
+1.0 1.0 0.0
+0.50 0.50 0.50
+1.0 0.50 0.50
+0.50 1.0 0.50
+1.0 1.0 0.50
+0.0 0.0 0.50
+0.50 0.0 0.50
+0.0 0.50 0.50
+0.50 0.50 0.50
+0.0 0.0 1.0
+0.50 0.0 1.0
+0.0 0.50 1.0
+0.50 0.50 1.0
+0.50 0.0 0.50
+1.0 0.0 0.50
+0.50 0.50 0.50
+1.0 0.50 0.50
+0.50 0.0 1.0
+1.0 0.0 1.0
+0.50 0.50 1.0
+1.0 0.50 1.0
+0.0 0.50 0.50
+0.50 0.50 0.50
+0.0 1.0 0.50
+0.50 1.0 0.50
+0.0 0.50 1.0
+0.50 0.50 1.0
+0.0 1.0 1.0
+0.50 1.0 1.0
+0.50 0.50 0.50
+1.0 0.50 0.50
+0.50 1.0 0.50
+1.0 1.0 0.50
+0.50 0.50 1.0
+1.0 0.50 1.0
+0.50 1.0 1.0
+1.0 1.0 1.0
+
+CELLS 8 72
+8      0       1       3       2       4       5       7       6
+8      8       9       11      10      12      13      15      14
+8      16      17      19      18      20      21      23      22
+8      24      25      27      26      28      29      31      30
+8      32      33      35      34      36      37      39      38
+8      40      41      43      42      44      45      47      46
+8      48      49      51      50      52      53      55      54
+8      56      57      59      58      60      61      63      62
+
+CELL_TYPES 8
+ 12 12 12 12 12 12 12 12
+POINT_DATA 64

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.