]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make sure it is possible to create default-constructed objects of type Triangulation...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 9 Apr 2013 19:11:58 +0000 (19:11 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 9 Apr 2013 19:11:58 +0000 (19:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@29228 0785d39b-7218-0410-832d-ea1e28bc413d

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

diff --git a/tests/deal.II/vertex_as_face_12.cc b/tests/deal.II/vertex_as_face_12.cc
new file mode 100644 (file)
index 0000000..ec6b512
--- /dev/null
@@ -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 (file)
index 0000000..10dc3e2
--- /dev/null
@@ -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 (file)
index 0000000..579e3ce
--- /dev/null
@@ -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 (file)
index 0000000..10dc3e2
--- /dev/null
@@ -0,0 +1,3 @@
+
+DEAL::0
+DEAL::0

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.