]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add test. 12106/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 27 Apr 2021 21:48:03 +0000 (15:48 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 28 Apr 2021 03:14:24 +0000 (21:14 -0600)
tests/simplex/get_boundary_ids_01.cc [new file with mode: 0644]
tests/simplex/get_boundary_ids_01.with_simplex_support=on.output [new file with mode: 0644]

diff --git a/tests/simplex/get_boundary_ids_01.cc b/tests/simplex/get_boundary_ids_01.cc
new file mode 100644 (file)
index 0000000..b4c1180
--- /dev/null
@@ -0,0 +1,54 @@
+// Copyright (C) 2020 by the deal.II authors
+//
+// This file is part of the deal.II library.
+//
+// The deal.II library is free software; you can use it, redistribute
+// it, and/or modify it under the terms of the GNU Lesser General
+// Public License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// The full text of the license can be found in the file LICENSE.md at
+// the top level directory of deal.II.
+//
+// ---------------------------------------------------------------------
+
+#include <deal.II/base/quadrature_lib.h>
+
+#include <deal.II/fe/fe_pyramid_p.h>
+#include <deal.II/fe/fe_simplex_p.h>
+#include <deal.II/fe/fe_simplex_p_bubbles.h>
+#include <deal.II/fe/fe_tools.h>
+#include <deal.II/fe/fe_values.h>
+#include <deal.II/fe/fe_wedge_p.h>
+#include <deal.II/fe/mapping_fe.h>
+
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/grid/grid_tools.h>
+#include <deal.II/grid/grid_tools_cache.h>
+
+#include "../tests.h"
+
+// Check that Triangulation::get_boundary_ids() works for
+// simplices. This used to crash.
+
+using namespace dealii;
+
+template <int dim>
+void
+test_in_unit_cube()
+{
+  Triangulation<dim> tria;
+  GridGenerator::subdivided_hyper_cube_with_simplices(tria, 1);
+
+  for (const auto b : tria.get_boundary_ids())
+    deallog << b << ' ';
+  deallog << std::endl;
+}
+
+int
+main()
+{
+  initlog();
+
+  test_in_unit_cube<2>();
+  test_in_unit_cube<3>();
+}
diff --git a/tests/simplex/get_boundary_ids_01.with_simplex_support=on.output b/tests/simplex/get_boundary_ids_01.with_simplex_support=on.output
new file mode 100644 (file)
index 0000000..faa88a9
--- /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.