From 55685d25b37ee91ab0b8e96b27bfad6fff9027ad Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 27 Apr 2021 15:48:03 -0600 Subject: [PATCH] Add test. --- tests/simplex/get_boundary_ids_01.cc | 54 +++++++++++++++++++ ...dary_ids_01.with_simplex_support=on.output | 3 ++ 2 files changed, 57 insertions(+) create mode 100644 tests/simplex/get_boundary_ids_01.cc create mode 100644 tests/simplex/get_boundary_ids_01.with_simplex_support=on.output diff --git a/tests/simplex/get_boundary_ids_01.cc b/tests/simplex/get_boundary_ids_01.cc new file mode 100644 index 0000000000..b4c118001f --- /dev/null +++ b/tests/simplex/get_boundary_ids_01.cc @@ -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 + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "../tests.h" + +// Check that Triangulation::get_boundary_ids() works for +// simplices. This used to crash. + +using namespace dealii; + +template +void +test_in_unit_cube() +{ + Triangulation 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 index 0000000000..faa88a9cc1 --- /dev/null +++ b/tests/simplex/get_boundary_ids_01.with_simplex_support=on.output @@ -0,0 +1,3 @@ + +DEAL::0 +DEAL::0 -- 2.39.5