From b0dd31f99a77df4308831b9b7ac84727161f4354 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 9 Apr 2013 19:11:58 +0000 Subject: [PATCH] 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 --- tests/deal.II/vertex_as_face_12.cc | 51 ++++++++++++++++++++ tests/deal.II/vertex_as_face_12/cmp/generic | 3 ++ tests/deal.II/vertex_as_face_13.cc | 52 +++++++++++++++++++++ tests/deal.II/vertex_as_face_13/cmp/generic | 3 ++ 4 files changed, 109 insertions(+) create mode 100644 tests/deal.II/vertex_as_face_12.cc create mode 100644 tests/deal.II/vertex_as_face_12/cmp/generic create mode 100644 tests/deal.II/vertex_as_face_13.cc create mode 100644 tests/deal.II/vertex_as_face_13/cmp/generic 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 +#include +#include +#include + +#include + + +template +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 +#include +#include +#include + +#include + + +template +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 -- 2.39.5