From: bangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Date: Tue, 9 Apr 2013 19:11:58 +0000 (+0000)
Subject: Make sure it is possible to create default-constructed objects of type Triangulation... 
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0dd31f99a77df4308831b9b7ac84727161f4354;p=dealii-svn.git

Make sure it is possible to create default-constructed objects of type Triangulation<1>::face_iterator.

git-svn-id: https://svn.dealii.org/trunk@29228 0785d39b-7218-0410-832d-ea1e28bc413d
---

diff --git a/tests/deal.II/vertex_as_face_12.cc b/tests/deal.II/vertex_as_face_12.cc
new file mode 100644
index 0000000000..ec6b5122a9
--- /dev/null
+++ b/tests/deal.II/vertex_as_face_12.cc
@@ -0,0 +1,51 @@
+//----------------------------  vertex_as_face_12.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2010, 2012, 2013 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.
+//
+//----------------------------  vertex_as_face_12.cc  ---------------------------
+
+// verify that we can do things like cell->face() in 1d as well. here:
+// check that we can assign iterators using the copy constructor
+
+
+#include "../tests.h"
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/grid_generator.h>
+
+#include <fstream>
+
+
+template <int spacedim>
+void test ()
+{
+  Triangulation<1,spacedim> tria;
+  GridGenerator::hyper_cube (tria);
+
+  typename Triangulation<1,spacedim>::face_iterator
+    face = tria.begin_active()->face(0);
+
+  deallog << face << std::endl;
+}
+
+
+
+int main ()
+{
+  std::ofstream logfile("vertex_as_face_12/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  test<1> ();
+  test<2> ();
+
+  return 0;
+}
diff --git a/tests/deal.II/vertex_as_face_12/cmp/generic b/tests/deal.II/vertex_as_face_12/cmp/generic
new file mode 100644
index 0000000000..10dc3e2251
--- /dev/null
+++ b/tests/deal.II/vertex_as_face_12/cmp/generic
@@ -0,0 +1,3 @@
+
+DEAL::0
+DEAL::0
diff --git a/tests/deal.II/vertex_as_face_13.cc b/tests/deal.II/vertex_as_face_13.cc
new file mode 100644
index 0000000000..579e3ce544
--- /dev/null
+++ b/tests/deal.II/vertex_as_face_13.cc
@@ -0,0 +1,52 @@
+//----------------------------  vertex_as_face_11.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2010, 2011, 2013 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.
+//
+//----------------------------  vertex_as_face_11.cc  ---------------------------
+
+// verify that we can do things like cell->face() in 1d as well. here:
+// check that we can default construct such an iterator and then
+// assign to it using operator= (default construction did not work originally)
+
+
+#include "../tests.h"
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/tria_iterator.h>
+#include <deal.II/grid/tria_accessor.h>
+#include <deal.II/grid/grid_generator.h>
+
+#include <fstream>
+
+
+template <int spacedim>
+void test ()
+{
+  Triangulation<1,spacedim> tria;
+  GridGenerator::hyper_cube (tria);
+
+  typename Triangulation<1,spacedim>::face_iterator face;
+  face = tria.begin_active()->face(0);
+
+  deallog << face << std::endl;
+}
+
+
+
+int main ()
+{
+  std::ofstream logfile("vertex_as_face_13/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+
+  test<1> ();
+  test<2> ();
+
+  return 0;
+}
diff --git a/tests/deal.II/vertex_as_face_13/cmp/generic b/tests/deal.II/vertex_as_face_13/cmp/generic
new file mode 100644
index 0000000000..10dc3e2251
--- /dev/null
+++ b/tests/deal.II/vertex_as_face_13/cmp/generic
@@ -0,0 +1,3 @@
+
+DEAL::0
+DEAL::0