]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add test for extrude_triangulation
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 17 Feb 2013 05:45:49 +0000 (05:45 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 17 Feb 2013 05:45:49 +0000 (05:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@28433 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/grid_generator_06.cc [new file with mode: 0644]
tests/bits/grid_generator_06/cmp/generic [new file with mode: 0644]

diff --git a/tests/bits/grid_generator_06.cc b/tests/bits/grid_generator_06.cc
new file mode 100644 (file)
index 0000000..b4f4ecb
--- /dev/null
@@ -0,0 +1,51 @@
+//---------------------------------------------------------------------------
+//    $Id: grid_generator_05.cc 23710 2011-05-17 04:50:10Z bangerth $
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005, 2006, 2007 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.
+//
+//---------------------------------------------------------------------------
+
+
+// Test GridGenerator::moebius
+
+#include "../tests.h"
+#include <deal.II/base/logstream.h>
+#include <deal.II/base/tensor.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_out.h>
+#include <deal.II/fe/fe_q.h>
+
+#include <fstream>
+#include <iomanip>
+
+
+template<int dim>
+void test(std::ostream& out)
+{
+  Triangulation<2> triangulation;
+  Triangulation<3> tr;
+  GridGenerator::hyper_rectangle (triangulation, Point<2>(0,0), Point<2>(1,1), true);
+
+  GridGenerator::extrude_triangulation(triangulation, 3, 2.0, tr);
+  GridOut go;
+  go.set_flags (GridOutFlags::Ucd(true));
+  go.write_ucd(tr, out);
+}
+
+
+int main()
+{
+  std::ofstream logfile("grid_generator_06/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+  
+  test<3>(logfile);
+}
diff --git a/tests/bits/grid_generator_06/cmp/generic b/tests/bits/grid_generator_06/cmp/generic
new file mode 100644 (file)
index 0000000..e6227e0
--- /dev/null
@@ -0,0 +1,22 @@
+
+# This file was generated by the deal.II library.
+
+
+#
+# For a description of the UCD format see the AVS Developer's guide.
+#
+12 2 0 0 0
+1  0.00000 0.00000 0.00000
+2  1.00000 0.00000 0.00000
+3  0.00000 1.00000 0.00000
+4  1.00000 1.00000 0.00000
+5  0.00000 0.00000 1.00000
+6  1.00000 0.00000 1.00000
+7  0.00000 1.00000 1.00000
+8  1.00000 1.00000 1.00000
+9  0.00000 0.00000 2.00000
+10  1.00000 0.00000 2.00000
+11  0.00000 1.00000 2.00000
+12  1.00000 1.00000 2.00000
+1 0 hex     1 2 6 5 3 4 8 7 
+2 0 hex     5 6 10 9 7 8 12 11 

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.