]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New test.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 May 2012 10:19:14 +0000 (10:19 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 22 May 2012 10:19:14 +0000 (10:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@25536 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/tria_iterator_with_one_header.cc [new file with mode: 0644]
tests/deal.II/tria_iterator_with_one_header/cmp/generic [new file with mode: 0644]

diff --git a/tests/deal.II/tria_iterator_with_one_header.cc b/tests/deal.II/tria_iterator_with_one_header.cc
new file mode 100644 (file)
index 0000000..145c193
--- /dev/null
@@ -0,0 +1,55 @@
+//----------------------------  tria_iterator_with_one_header.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2012 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.
+//
+//----------------------------  tria_iterator_with_one_header.cc  ---------------------------
+
+// It used to be that if you wanted to use
+// Triangulation::active_cell_iterator in a context where that type
+// was actually used, you also had to #include
+// <deal.II/grid/tria_iterator.h> and <deal.II/grid/tria_accessor.h>.
+// This was changed in r25531 in such a way that these types are now
+// no longer only forward declared. test that this continues to work
+
+#include "../tests.h"
+#include <deal.II/base/logstream.h>
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+
+#include <fstream>
+#include <iomanip>
+
+std::ofstream logfile("tria_iterator_with_one_header/output");
+
+
+template <int dim>
+void test ()
+{
+  Triangulation<dim> tria;
+  GridGenerator::hyper_cube(tria);
+  deallog << tria.begin_active()->center() << std::endl;
+}
+
+
+int main ()
+{
+  deallog << std::setprecision(4);
+  logfile << std::setprecision(4);
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test<1> ();
+  test<2> ();
+  test<3> ();
+
+  return 0;
+}
+
diff --git a/tests/deal.II/tria_iterator_with_one_header/cmp/generic b/tests/deal.II/tria_iterator_with_one_header/cmp/generic
new file mode 100644 (file)
index 0000000..12ed162
--- /dev/null
@@ -0,0 +1,4 @@
+
+DEAL::0.5000
+DEAL::0.5000 0.5000
+DEAL::0.5000 0.5000 0.5000

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.